0Bit Documentation

List 0Gate transactions

GET /transactions - List partner transaction records for support and reconciliation.

0Gate is the primary public integration path for hosted payment, ramp, and swap experiences. Keep secret-key operations on your server and hand only browser-safe values to the widget.

This endpoint returns the partner-scoped PartnerTransaction records behind your sessions, newest first, as a cursor-paginated list. Use it to reconcile orders against your own ledger and to power support tooling — never depend on browser callbacks alone for the source of truth.

Endpoint

FieldValue
MethodGET
Path/v1/transactions
AreaTransactions
Operation idlistTransactions
Auth boundarySecret key from your server.

Use it for

List partner transaction records for support and reconciliation. The list is scoped to the authenticated partner: records that belong to another partner are never returned and are not distinguishable from records that do not exist.

Use this endpoint only for the partner-scoped resource it describes. Store your own reference id, the returned refid, the request id, timestamps, and the current status so support and reconciliation do not depend on browser callbacks alone.

For local payment or payout rails, transaction records can include local_rail_transaction_id. Use that generic field for rail-side reconciliation; facilita_transaction_id may still appear as a deprecated compatibility alias on older records.

Production rules

  • Keep secret keys on your server. This endpoint requires an sk_* key.
  • Page with the cursor. Loop on has_more until it is false — do not stop because a page returned fewer rows than limit (see below).
  • Filter server-side with status and session_id rather than pulling everything and filtering in your app.
  • Branch on machine-readable status, error code, object id, and request id.
  • Treat examples and placeholder ids as fake data only.

Request

This is a GET with no request body. All inputs are query parameters.

ParameterInRequiredTypeUse it for
limitqueryNointegerPage size, 1100. Defaults to 10. A page may return fewer rows than limit (see callout).
starting_afterqueryNostringCursor. Pass the refid of the last item from the previous page to fetch the next page.
statusqueryNostringFilter to one transaction status (for example completed). Free-form string; match what the API returns.
session_idqueryNostringFilter to transactions linked to one 0Gate session id.

Loop on has_more, not on page length

A returned page can contain fewer than limit records while has_more is still true. This happens because records are filtered for partner scope after the cursor window is read. Always keep requesting the next page while has_more is true — never treat a short (or empty) page as the end of the list.

Response

The response is a standard list envelope whose data array holds PartnerTransaction objects.

FieldTypeUse it for
objectstringAlways list.
dataarray of PartnerTransactionThe page of transaction records. May be shorter than limit.
has_morebooleantrue when more records exist beyond this page. Keep paging while true.
urlstringThe list path (/v1/transactions).

The PartnerTransaction object

This is the REST shape returned by both list and retrieve. Every monetary and amount value is a decimal string, never a float.

FieldTypeUse it for
objectstringAlways transaction.
refidstringStable reference id for the transaction. Use it as the key in your ledger and to retrieve the record.
session_idstring or nullThe 0Gate session this transaction belongs to, or null if not linked to a session.
actionstringBUY, SELL, or SWAP. See Action values.
statusstringCurrent transaction status (free-form string, for example completed). Branch on the exact value.
tokenstringCrypto asset symbol, for example USDT.
networkstringSettlement network for the token.
currencystringFiat currency (ISO 4217), for example EUR.
payment_methodstringThe payment method used for the fiat leg.
fiat_amountstring (decimal)The fiat amount of the transaction.
token_amountstring (decimal)The crypto amount of the transaction.
total_pay_or_receivestring (decimal)All-in total the user pays (buy) or receives (sell), inclusive of fees.
exchange_ratestring or nullRate applied, as a decimal string, or null before it is known.
total_feesstring or nullTotal fees, as a decimal string, or null before they are known.
created_atstring (ISO 8601) or nullWhen the transaction record was created, or null if not yet set.
updated_atstring (ISO 8601) or nullWhen the record last changed, or null if not yet set.
status_timelinearrayOrdered status checkpoints, each { "status": string, "at": ISO 8601 string }.

Money and amount values are strings

fiat_amount, token_amount, total_pay_or_receive, exchange_rate, and total_fees are decimal strings. Parse them with a decimal-safe type; never with a binary float.

Action values

actionMeaning
BUYFiat → crypto (on-ramp).
SELLCrypto → fiat (off-ramp).
SWAPCrypto → crypto conversion.

Document all three actions

Treat action as one of BUY, SELL, or SWAP. SWAP is a valid value on live records even though it is not always enumerated alongside BUY and SELL — handle it explicitly so swap orders are not dropped during reconciliation.

This is the REST shape — not the webhook shape

The transaction object embedded in session webhooks uses different field names (for example crypto_amount and total_paid_or_received). Do not map webhook fields onto this REST object or vice versa. Use the fields documented here for GET /transactions and GET /transactions/{refid}.

Examples

curl 'https://gate-api.0bit.app/v1/transactions?limit=10&status=completed' \
  -H "Authorization: Bearer sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Add &starting_after=0g_txn_abc123 to fetch the page after a known refid, or &session_id=gs_test_000000000123 to scope to one session.

{
  "object": "list",
  "data": [
    {
      "object": "transaction",
      "refid": "0g_txn_abc123",
      "session_id": "gs_test_000000000123",
      "action": "BUY",
      "status": "completed",
      "token": "USDT",
      "network": "tron",
      "currency": "EUR",
      "payment_method": "sepa_credit_transfer",
      "fiat_amount": "100.00",
      "token_amount": "93.20",
      "total_pay_or_receive": "100.00",
      "exchange_rate": "1.0731",
      "total_fees": "1.20",
      "created_at": "2026-01-01T00:00:00Z",
      "updated_at": "2026-01-01T00:02:15Z",
      "status_timeline": [
        { "status": "CREATED", "at": "2026-01-01T00:00:00Z" },
        { "status": "completed", "at": "2026-01-01T00:02:15Z" }
      ]
    }
  ],
  "has_more": true,
  "url": "/v1/transactions"
}

has_more is true, so request the next page even though only one record was returned.

async function listAll() {
  const out = [];
  let cursor = null;
  do {
    const params = new URLSearchParams({ limit: '100' });
    if (cursor) params.set('starting_after', cursor);
    const res = await fetch(
      `https://gate-api.0bit.app/v1/transactions?${params}`,
      { headers: { Authorization: 'Bearer sk_test_...' } },
    );
    const { data, has_more } = await res.json();
    out.push(...data);
    // Advance the cursor only when the page is non-empty.
    if (data.length) cursor = data[data.length - 1].refid;
    // Keep going while has_more is true — even on a short/empty page.
    if (!has_more) break;
  } while (true);
  return out;
}

Errors

All errors use the unified envelope and carry an X-Request-Id response header. Branch on code/type/statusCode, not on the free-form message.

{
  "type": "unauthorized",
  "code": "unauthorized",
  "message": "Example error using fake data.",
  "request_id": "req_test_000000000123",
  "doc_url": null,
  "statusCode": 401
}
StatustypeWhen it happens
400invalid_requestBad query parameter, for example a limit outside 1100.
401unauthorizedMissing or invalid secret key.
403forbiddenCredential rejected — revoked key or mode mismatch.
429rate_limitedRequest throttled. Back off and retry.
5xxserver_errorTransient server or upstream failure. Retry with bounded backoff.

Public boundary

This reference covers partner-scoped endpoint behavior, authentication, idempotency, webhook verification, and support-safe records. Internal operations, settlement venues, rail providers, administrative routes, and unsupported availability claims are outside the public API contract.

On this page