0Bit Documentation

Retrieve a 0Pools trade

GET /pools/trades/{transactId} - Retrieve one partner-scoped trade.

0Pools API pages are for approved headless partners. They cover the partner-visible quote, transact, status, trade, and balance lifecycle only.

Endpoint

FieldValue
MethodGET
Path/pools/trades/{transactId}
AreaTrades
Operation idgetTrade
Auth boundarySecret key from your server.

Use it for

Retrieve one partner-scoped trade by its transactId. This is a pure, read-only lookup of a single trade record: it returns the latest persisted state of the trade and nothing else.

Use it for support lookups, reconciliation, and audit trails where you already hold a transactId and want the current snapshot of a known trade.

This read does not advance settlement

GET /pools/trades/{transactId} is a passive read. It never moves a reserved trade forward and never triggers delivery or payout. To drive a reserved trade toward a terminal state, poll GET /pools/transactions/{quoteId}, which is the intended, idempotent way to progress settlement. Use this trade read for snapshots and reconciliation, not as the engine that completes a trade.

Read versus poll

Both endpoints return the same trade fields, but they do different work. Choose by intent.

ConcernGET /pools/trades/{transactId}GET /pools/transactions/{quoteId}
Lookup keytransactIdquoteId
Advances settlementNo (pure read)Yes (idempotent progression)
Typical useSupport, audit, reconciliation snapshotsDriving a reserved trade to a terminal state
Safe to call oftenYesYes (idempotent), and use it to make progress

Request

curl -X GET https://pools-api.0bit.app/v1/pools/trades/txn_test_0000000000abc \
  -H "Authorization: Bearer sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
ParameterInRequiredDescription
transactIdpathYesThe trade id returned by POST /pools/{id}/transact.

The secret key scopes the lookup to your partner. A transactId that belongs to another partner is treated as not found; see Errors.

Trade fields

The response is a single trade object. Money and rate values are decimal strings; basis-point values are integers.

FieldTypeDescription
transactIdstringStable id of this trade. Use it to join your records.
quoteIdstringThe quote this trade was executed against. Use it to poll status and link back to the quote.
poolIdstringThe pool this trade ran against (pair-shaped, for example EUR-USDT).
pairstringThe pool's trading pair, for example EUR-USDT.
sidestringon_ramp (fiat in, crypto delivered) or off_ramp (crypto in, fiat paid out).
statusstringCurrent lifecycle state. See Trade status.
fiatCurrencystringFiat currency of the trade, for example EUR.
cryptoCurrencystringCrypto asset of the trade, for example USDT.
cryptoNetworkstringThe chain the trade transacted on, locked on the quote: tron, ethereum, bsc, polygon, or solana.
fiatAmountdecimal stringFiat leg of the trade (paid in for on_ramp, received for off_ramp).
cryptoAmountdecimal stringCrypto leg of the trade (delivered for on_ramp, sold for off_ramp).
quotedRatedecimal stringThe all-in quoted rate locked from the quote (rate direction is unspecified).
spreadBpsintegerSpread component, in basis points.
feeBpsintegerFee component, in basis points.
totalBpsintegerTotal cost in basis points, equal to spreadBps + feeBps.
engineFillTxIdstring | nullSettlement fill reference for the trade; null until the trade has filled.
createdAtstring (ISO 8601)When the trade was created (at transact).
settledAtstring (ISO 8601) | nullWhen the trade reached settled; null until then.

Treat money as strings

Never parse fiatAmount, cryptoAmount, or quotedRate as floating-point numbers. Keep them as decimal strings through your pipeline to avoid rounding drift, and branch logic on status, feeBps, and spreadBps.

Trade status

statusMeaning
quotedA quote exists; no reservation has been made yet.
reservedThe trade was created at transact and is awaiting settlement. Poll the transactions endpoint to progress it.
settledThe trade completed; the delivery or payout leg was carried out. settledAt is populated.
failedThe trade did not complete. Inspect status and reconcile.
releasedThe reservation was released without settling.
returnedA previously settled trade was later reversed (for example, a payout returned by the receiving bank, or a delivery that failed downstream). An idempotent auto-refund returns the amount to your partner balance. Monitor for this flip via the status poll, GET /pools/transactions/{quoteId}.

Monitor a returned flip via the status poll

A settled trade can later flip to returned. There is no webhook for returned; the canonical way to watch for it is the status poll, GET /pools/transactions/{quoteId}, together with your partner ledger (the auto-refund posts with reason buy_refund). This trade read merely reflects whatever the current status is, so it will show returned once set, but it is not where you watch for the flip. If you depend on terminal webhooks alone, you will miss a returned flip, so reconcile periodically against the status poll and ledger.

Example response

{
  "transactId": "txn_test_0000000000abc",
  "quoteId": "quote_test_0000000000xyz",
  "poolId": "EUR-USDT",
  "pair": "EUR-USDT",
  "side": "on_ramp",
  "status": "settled",
  "fiatCurrency": "EUR",
  "cryptoCurrency": "USDT",
  "cryptoNetwork": "tron",
  "fiatAmount": "100.00",
  "cryptoAmount": "107.412300",
  "quotedRate": "1.0741230",
  "spreadBps": 40,
  "feeBps": 25,
  "totalBps": 65,
  "engineFillTxId": "fill_test_0000000000def",
  "createdAt": "2026-01-15T10:32:04.000Z",
  "settledAt": "2026-01-15T10:33:11.000Z"
}

Every response also carries an X-Request-Id header that mirrors the request_id in error bodies. Capture it for support.

Errors

Errors use the unified envelope { type, code, message, request_id, doc_url, statusCode }. Branch on code and statusCode, never on the free-form message.

StatustypeWhenWhat to do
401unauthorizedMissing or invalid secret key.Fix credentials; do not retry unchanged.
403forbiddenWrong key mode for this secret-only route (key_mode_mismatch); for example a pk_* publishable key. This read runs no entitlement check, so the pool-access denial codes do not apply here.Call with your secret key; do not retry unchanged.
404not_foundUnknown transactId, or a trade owned by another partner.Check the id; never surface foreign ids. Cross-tenant lookups return 404, not 403.
429rate_limitedThrottle limit reached.Back off and retry.
5xxserver_errorServer or upstream failure.Retry with bounded backoff.

Cross-tenant reads return 404

A transactId outside your partner scope returns 404, not 403. The API never confirms the existence of objects you do not own. Do not infer ownership from the status, and do not log or surface foreign ids.

Production rules

  • Keep secret keys on your server.
  • Use this endpoint for snapshots and reconciliation; use the transactions poll to advance a reserved trade.
  • Store your own reference id, the transactId, the quoteId, the request_id, the current status, and timestamps.
  • Branch on machine-readable status, error code, object id, and request id.
  • Reconcile periodically against the status poll and your ledger to catch a returned flip, which has no webhook.
  • Treat examples and placeholder ids as fake data only.

Public boundary

This reference covers partner-visible discovery, quote, transact, status, trade, and balance behavior. Liquidity operations, routing internals, provider details, reserve logic, and runbooks are outside the public API contract.

On this page