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ámetro | En | Tipo | Requerido | Descripción |
|---|
page | query | integer | no | Default: 1. |
limit | query | integer | no | Default: 25. |
assetSymbol | query | string | sí | Asset to list entries for. Required. |
type | query | BUY | SELL | DEPOSIT | WITHDRAWAL | no | Filter by entry type. |
sourceId | query | string | no | Return 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. |
orderId | query | string | no | Return 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. |
startDate | query | string | no | ISO-8601 start date. |
endDate | query | string | no | ISO-8601 end date. |
Respuestas
| Código | Descripción | Cuerpo |
|---|
200 | Éxito. | LedgerEntriesResponse |
401 | application/problem+json (RFC 9457) — branch on code, not on the status: unauthorized (not retryable), key_expired (not retryable), key_revoked (not retryable). | — |
403 | application/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). | — |
429 | application/problem+json (RFC 9457) — branch on code, not on the status: rate_limited (retryable). | — |
500 | application/problem+json (RFC 9457) — branch on code, not on the status: internal_error (retryable). | — |
502 | application/problem+json (RFC 9457) — branch on code, not on the status: downstream_unavailable (retryable). | — |
503 | application/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ámetro | En | Tipo | Requerido | Descripción |
|---|
id | path | string | sí | |
Respuestas
| Código | Descripción | Cuerpo |
|---|
200 | Éxito. | LedgerEntry |
401 | application/problem+json (RFC 9457) — branch on code, not on the status: unauthorized (not retryable), key_expired (not retryable), key_revoked (not retryable). | — |
403 | application/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). | — |
404 | application/problem+json (RFC 9457) — branch on code, not on the status: not_found (not retryable). | — |
429 | application/problem+json (RFC 9457) — branch on code, not on the status: rate_limited (retryable). | — |
500 | application/problem+json (RFC 9457) — branch on code, not on the status: internal_error (retryable). | — |
502 | application/problem+json (RFC 9457) — branch on code, not on the status: downstream_unavailable (retryable). | — |
503 | application/problem+json (RFC 9457) — branch on code, not on the status: maintenance (retryable). | — |
Esquemas
LedgerEntriesResponse
LedgerEntry
| Campo | Tipo | Descripción |
|---|
id | string | Id of this ledger entry. |
source | any | The resource that caused this entry. |
type | string | Ej.: DEPOSIT. |
subType | string | null | What 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. |
assetSymbol | string | Ej.: BTC. |
detail | string | |
amount | string | Positive magnitude; direction is given by type. Ej.: 500. |
fee | string | Positive magnitude. Ej.: 0. |
total | string | Positive magnitude. Ej.: 500. |
balance | string | Running balance after this entry. Signed — this is a state, not a movement. Ej.: 500.62. |
createdAt | string | |
LedgerEntrySource
| Campo | Tipo | Descripción |
|---|
type | withdrawal | deposit | fill | other | Ej.: withdrawal. |
id | string | Id of the causing resource. Matches that resource’s id. |
| Campo | Tipo | Descripción |
|---|
page | number | Ej.: 1. |
limit | number | Ej.: 25. |
totalItems | number | Ej.: 100. |
totalPages | number | Ej.: 4. |
Problem
| Campo | Tipo | Descripción |
|---|
type | string | Stable problem-type URI. Resolves to docs for this error. Ej.: https://docs.skipo.com/errors/rate_limited. |
title | string | Short, human-readable summary (stable, English). Ej.: Rate limit exceeded. |
status | number | HTTP status code. Ej.: 429. |
code | string | Stable machine-readable error code (equals the last path segment of type). Ej.: rate_limited. |
retryable | boolean | Whether retrying the identical request may succeed. Ej.: true. |
detail (opcional) | string | Human-readable, possibly localized detail. |
instance (opcional) | string | The request path that produced the error. |
traceId (opcional) | string | Trace id — joins BigQuery api_request and Cloud Logging. |
Volver a la referencia de endpoints. Ver también: Paginación · Errores · Ids y correlación.