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
| Method | Path | Operation id | Purpose |
|---|---|---|---|
POST | /quotes/preview | previewQuotes | Return indicative quotes across applicable methods. |
POST | /quotes | lockQuote | Lock a signed, one-time-redeemable quote. |
GET | /quotes/{id} | retrieveSignedQuote | Retrieve a partner-scoped signed quote. |
POST | /rails/pay_ins | createPayIn | Redeem a signed quote into a fiat pay-in for the session user. |
GET | /rails/pay_ins/{id} | retrievePayIn | Retrieve pay-in record. |
POST | /rails/pay_outs | createPayOut | Redeem a signed quote into a fiat pay-out for the session user. |
GET | /rails/pay_outs/{id} | retrievePayOut | Retrieve pay-out record. |
Quote lifecycle
Signed quote fields
| Field | Use it for |
|---|---|
id | Quote lookup and redemption. |
status | Active, expired, consumed, or equivalent quote state. |
side | Buy, sell, swap, pay-in, pay-out, or equivalent product side. |
currency | Fiat currency. |
asset | Crypto asset, such as USDT. |
payment_method | Approved payment method category. |
fiat_amount / crypto_amount | Amounts to reconcile. |
exchange_rate | Partner-visible rate. |
fees | Approved fee context. |
signature | Quote 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
| Condition | Partner behavior |
|---|---|
| Quote expired | Request a new quote and require the user/system to accept the new terms. |
| Missing rails entitlement | Stop and request product access; do not loop retries. |
409 conflict | Retrieve quote/rail state and branch. |
| Timeout after write | Retry with the same idempotency key. |
| User/session mismatch | Treat 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.