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.
Parameters
| Parameter | In | Type | Required | Description |
|---|
page | query | integer | no | Default: 1. |
limit | query | integer | no | Default: 25. |
assetSymbol | query | string | yes | 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. |
Responses
| Code | Description | Body |
|---|
200 | Success. | 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
Parameters
| Parameter | In | Type | Required | Description |
|---|
id | path | string | yes | |
Responses
| Code | Description | Body |
|---|
200 | Success. | 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). | — |
Schemas
LedgerEntriesResponse
LedgerEntry
| Field | Type | Description |
|---|
id | string | Id of this ledger entry. |
source | any | The resource that caused this entry. |
type | string | e.g. 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. e.g. INTERNAL_EARN_DISTRIBUTION. |
assetSymbol | string | e.g. BTC. |
detail | string | |
amount | string | Positive magnitude; direction is given by type. e.g. 500. |
fee | string | Positive magnitude. e.g. 0. |
total | string | Positive magnitude. e.g. 500. |
balance | string | Running balance after this entry. Signed — this is a state, not a movement. e.g. 500.62. |
createdAt | string | |
LedgerEntrySource
| Field | Type | Description |
|---|
type | withdrawal | deposit | fill | other | e.g. withdrawal. |
id | string | Id of the causing resource. Matches that resource’s id. |
| Field | Type | Description |
|---|
page | number | e.g. 1. |
limit | number | e.g. 25. |
totalItems | number | e.g. 100. |
totalPages | number | e.g. 4. |
Problem
| Field | Type | Description |
|---|
type | string | Stable problem-type URI. Resolves to docs for this error. e.g. https://docs.skipo.com/errors/rate_limited. |
title | string | Short, human-readable summary (stable, English). e.g. Rate limit exceeded. |
status | number | HTTP status code. e.g. 429. |
code | string | Stable machine-readable error code (equals the last path segment of type). e.g. rate_limited. |
retryable | boolean | Whether retrying the identical request may succeed. e.g. true. |
detail (optional) | string | Human-readable, possibly localized detail. |
instance (optional) | string | The request path that produced the error. |
traceId (optional) | string | Trace id — joins BigQuery api_request and Cloud Logging. |
Back to the endpoint reference. See also: Pagination · Errors · Ids and correlation.