Skip to main content

GET /v1/transactions

Returns every on-chain transaction associated with your account — deposits, sweeps, gas top-ups, and withdrawals — newest first. Cursor-paginated.

Method & pathGET /v1/transactions
Required permissionlist_transactions
AuthHMAC — see Authentication

Query parameters

NameTypeRequiredDefaultDescription
directionstringoptionalFilter by direction. One of deposit, withdrawal, sweep, gas_topup.
currencystringoptionalFilter by currency symbol.
networkstringoptionalFilter by network code.
statusstringoptionalFilter by status (see status table below).
cursorintegeroptionalPagination cursor. Pass the previous response's next_cursor value. Omit for the first page.
limitintegeroptional50Page size, 1–200.

Response

{
"success": true,
"message": "OK",
"data": [
{
"id": 99,
"tx_hash": "0x9a8...",
"direction": "deposit",
"status": "confirmed",
"currency": "USDT",
"network": "ETH",
"from_address": "0xsender...",
"to_address": "0xabc...def",
"amount_decimal": "100.000000",
"confirmations": 12,
"block_number": 21345678,
"created_at": "2026-05-16T19:30:00+00:00",
"confirmed_at": "2026-05-16T19:35:30+00:00"
}
],
"data_count": 1,
"next_cursor": null,
"has_more": false
}

The single-row example above is a terminal page — has_more is false, so next_cursor is null. On a full page (data_count equal to your limit), has_more is true and next_cursor is the id of the last (oldest) row, which you pass back as cursor.

Top-level fields

FieldTypeDescription
dataarrayUp to limit transactions, newest first.
data_countintegerNumber of rows in data.
next_cursorinteger | nullPass on the next call as cursor=… to fetch the next page. null when no more pages.
has_morebooleantrue while more pages remain. When false, next_cursor is null.

Row fields

FieldTypeDescription
idintegerChain transaction ID. Stable; safe to use as a primary key in your store.
tx_hashstringOn-chain transaction hash.
directionstringdeposit (inbound to one of your deposit addresses), sweep (an internal move from a deposit address to your receiving wallet), gas_topup (an internal transfer that funds a token sweep), or withdrawal (outbound to a destination you supplied).
statusstringSee status table below.
currencystringCurrency symbol.
networkstringNetwork code.
from_addressstringOn-chain sender.
to_addressstringOn-chain recipient.
amount_decimalstringAmount in human units (decimal string).
confirmationsintegerLatest known confirmation count.
block_numberintegerBlock in which this tx was first seen. 0 for transactions the gateway has initiated but not yet observed on-chain.
created_atISO-8601 UTCWhen the row was inserted (detected or initiated).
confirmed_atISO-8601 UTC | nullWhen confirmations crossed network.min_confirmations. null while still pending.

status by direction

DirectionPossible statuses
depositdetectedconfirmedsweep_pendingswept, or failed at any step.
sweepdetectedconfirmed, or failed.
gas_topupdetectedconfirmed, or failed.
withdrawaldetectedconfirmed, or failed.

Errors

Standard middleware errors, plus schema validation on the query parameters.

StatusCause
401 / 403 / 429See Errors page.
422Invalid direction (must be one of deposit / withdrawal / sweep / gas_topup) or limit outside 1–200. message names the offending field.

Code samples

Examples assume sign_request(...) from the Authentication page.

METHOD="GET"
ENDPOINT="/v1/transactions"
QUERY="direction=deposit&limit=50"
BODY=""

# ... sign as on the Authentication page ...

curl -sS "${BASE_URL}${ENDPOINT}?${QUERY}" \
-H "X-CPG-Key: ${API_KEY}" \
-H "X-CPG-Timestamp: ${TS}" \
-H "X-CPG-Signature: ${SIG}"

Notes

  • Cursor pagination, not offset. The cursor is the id of the oldest row in the previous page; the server returns rows with id < cursor. New rows inserted during pagination won't shift your pages — you'll just see them on a fresh first-page call. Don't try to "go back" — there's no previous_cursor. If you need to re-read recent history, start a fresh walk from cursor=null.
  • Sign every page separately. The canonical string includes the query string, so a request with cursor=99 has a different signature than one with cursor=42. The loops above re-call sign_request() on every iteration — don't try to cache headers.
  • Combine filters freely. ?direction=withdrawal&status=failed&currency=USDT is a valid combination and applied as AND.
  • Sweep and gas_topup rows are operational telemetry. Most integrators only care about direction=deposit and direction=withdrawal. The other two are useful for debugging stuck balances or unexplained dust at deposit addresses.