Saltar al contenido principal

Ledger

GET /v2/ledger

List ledger entries

The double-entry record of how a balance changed, for one asset. Every entry carries a source back-pointer to the withdrawal, deposit or fill that caused it; filter by sourceId to fetch exactly those entries, or by orderId to fetch every entry an order produced across all of its fills.

Parámetros

ParámetroEnTipoRequeridoDescripción
pagequeryintegernoDefault: 1.
limitqueryintegernoDefault: 25.
assetSymbolquerystringAsset to list entries for. Required.
typequeryBUY | SELL | DEPOSIT | WITHDRAWALnoFilter by entry type.
sourceIdquerystringnoReturn only the entries caused by this resource. Accepts a withdrawal, deposit or fill id — the same value the resource publishes as id and the entry echoes as source.id.
orderIdquerystringnoReturn every entry produced by an order, across all of its fills. The ledger does not store an order id, so this resolves the order to its fills first — one extra internal hop. Note an order settles in two assets, and assetSymbol selects which leg you see.
startDatequerystringnoISO-8601 start date.
endDatequerystringnoISO-8601 end date.

Respuestas

CódigoDescripciónCuerpo
200Éxito.LedgerEntriesResponse
401application/problem+json (RFC 9457) — branch on code, not on the status: unauthorized (not retryable), key_expired (not retryable), key_revoked (not retryable).
403application/problem+json (RFC 9457) — branch on code, not on the status: insufficient_scope (not retryable), ip_not_allowed (not retryable), api_access_disabled (not retryable).
429application/problem+json (RFC 9457) — branch on code, not on the status: rate_limited (retryable).
500application/problem+json (RFC 9457) — branch on code, not on the status: internal_error (retryable).
502application/problem+json (RFC 9457) — branch on code, not on the status: downstream_unavailable (retryable).
503application/problem+json (RFC 9457) — branch on code, not on the status: maintenance (retryable).

GET /v2/ledger/{id}

Get a ledger entry by id

Parámetros

ParámetroEnTipoRequeridoDescripción
idpathstring

Respuestas

CódigoDescripciónCuerpo
200Éxito.LedgerEntry
401application/problem+json (RFC 9457) — branch on code, not on the status: unauthorized (not retryable), key_expired (not retryable), key_revoked (not retryable).
403application/problem+json (RFC 9457) — branch on code, not on the status: insufficient_scope (not retryable), ip_not_allowed (not retryable), api_access_disabled (not retryable).
404application/problem+json (RFC 9457) — branch on code, not on the status: not_found (not retryable).
429application/problem+json (RFC 9457) — branch on code, not on the status: rate_limited (retryable).
500application/problem+json (RFC 9457) — branch on code, not on the status: internal_error (retryable).
502application/problem+json (RFC 9457) — branch on code, not on the status: downstream_unavailable (retryable).
503application/problem+json (RFC 9457) — branch on code, not on the status: maintenance (retryable).

Esquemas

LedgerEntriesResponse

CampoTipoDescripción
startDatestring | null
endDatestring | null
dataLedgerEntry[]
paginationPaginationMeta

LedgerEntry

CampoTipoDescripción
idstringId of this ledger entry.
sourceanyThe resource that caused this entry.
typestringEj.: DEPOSIT.
subTypestring | nullWhat KIND of entry this is within its type. Without it a DEPOSIT booked by an earn distribution is indistinguishable from a customer deposit. Ej.: INTERNAL_EARN_DISTRIBUTION.
assetSymbolstringEj.: BTC.
detailstring
amountstringPositive magnitude; direction is given by type. Ej.: 500.
feestringPositive magnitude. Ej.: 0.
totalstringPositive magnitude. Ej.: 500.
balancestringRunning balance after this entry. Signed — this is a state, not a movement. Ej.: 500.62.
createdAtstring

LedgerEntrySource

CampoTipoDescripción
typewithdrawal | deposit | fill | otherEj.: withdrawal.
idstringId of the causing resource. Matches that resource’s id.

PaginationMeta

CampoTipoDescripción
pagenumberEj.: 1.
limitnumberEj.: 25.
totalItemsnumberEj.: 100.
totalPagesnumberEj.: 4.

Problem

CampoTipoDescripción
typestringStable problem-type URI. Resolves to docs for this error. Ej.: https://docs.skipo.com/errors/rate_limited.
titlestringShort, human-readable summary (stable, English). Ej.: Rate limit exceeded.
statusnumberHTTP status code. Ej.: 429.
codestringStable machine-readable error code (equals the last path segment of type). Ej.: rate_limited.
retryablebooleanWhether retrying the identical request may succeed. Ej.: true.
detail (opcional)stringHuman-readable, possibly localized detail.
instance (opcional)stringThe request path that produced the error.
traceId (opcional)stringTrace id — joins BigQuery api_request and Cloud Logging.

Volver a la referencia de endpoints. Ver también: Paginación · Errores · Ids y correlación.