0Bit Documentation

0Gate quotes and rails

Preview quotes, lock signed quotes, and redeem entitled pay-in or pay-out rail operations from server-side code.

0Gate quote and rail operations are more sensitive than a standard hosted session. Quote preview can be used as an indicative planning step. Signed quotes and rail pay-in/pay-out operations are entitlement-gated and should be documented as server-side, reviewed integration paths.

Rails require entitlement

Do not present quote-locking or rail operations as broadly available. They require the appropriate product access, review, idempotency, and operational controls.

Endpoints

MethodPathOperation idPurpose
POST/quotes/previewpreviewQuotesReturn indicative quotes across applicable methods.
POST/quoteslockQuoteLock a signed, one-time-redeemable quote.
GET/quotes/{id}retrieveSignedQuoteRetrieve a partner-scoped signed quote.
POST/rails/pay_inscreatePayInRedeem a signed quote into a fiat pay-in for the session user.
GET/rails/pay_ins/{id}retrievePayInRetrieve pay-in record.
POST/rails/pay_outscreatePayOutRedeem a signed quote into a fiat pay-out for the session user.
GET/rails/pay_outs/{id}retrievePayOutRetrieve pay-out record.

Quote lifecycle

Signed quote fields

FieldUse it for
idQuote lookup and redemption.
statusActive, expired, consumed, or equivalent quote state.
sideBuy, sell, swap, pay-in, pay-out, or equivalent product side.
currencyFiat currency.
assetCrypto asset, such as USDT.
payment_methodApproved payment method category.
fiat_amount / crypto_amountAmounts to reconcile.
exchange_ratePartner-visible rate.
feesApproved fee context.
signatureQuote integrity signal; do not forge or alter.

Pay-in and pay-out

Rail operations redeem a signed quote for the KYC-approved 0Bit user tied to the session. Partner code should not inject bank or payout details directly from public docs.

curl -X POST https://gate-api-sandbox.0bit.app/v1/rails/pay_ins \
  -H "Authorization: Bearer sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 00000000-0000-4000-8000-000000000123" \
  -d '{
    "gate_session_id": "gs_test_123",
    "quote_id": "quote_test_123",
    "reference": "order_test_123",
    "metadata": {}
  }'

Failure handling

ConditionPartner behavior
Quote expiredRequest a new quote and require the user/system to accept the new terms.
Missing rails entitlementStop and request product access; do not loop retries.
409 conflictRetrieve quote/rail state and branch.
Timeout after writeRetry with the same idempotency key.
User/session mismatchTreat as hard failure and investigate.

Public boundary

Public docs may describe the shape and server-side lifecycle. They must not publish provider names, bank details, risk thresholds, treasury routing, market-maker terms, or private operational procedures.

On this page