LedgerReadService
Get Balance History
Retrieve balance history buckets for an account. Supports optional subaccount, range, asset, and account-bucket filters.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/balances/history?account_code=FUNDING&ledger=1&range=1d&subaccount_id=6789012345678' \ --header 'Accept: */*' \ --header 'X-API-KEY-ID: YOUR_API_KEY_ID' \ --header 'X-API-TIMESTAMP: YOUR_API_TIMESTAMP' \ --header 'X-API-SIGNATURE: YOUR_API_SIGNATURE'
Responses
{
"bucket": "1m",
"endTsSec": 1735689600,
"points": 1,
"range": "1d",
"series": [
{
"account": "FUNDING",
"asset": "USDT",
"balance": [
"0.0000001"
]
}
],
"startTsSec": 1735689600
}Optional account bucket filter (comma-separated codes or names: funding, trading).
Optional public asset filter.
History window (defaults to 1d).
Optional subaccount public id (base58).
Sampling interval between points, such as "5m" or "1h".
1mLast point timestamp in seconds since epoch (UTC).
1735689600Number of aligned points in each returned series.
1Resolved history window.
1daccount bucket
FUNDINGpublic unified asset id
USDTChart balance in asset units scaled by 1e7 (7 decimals). Values are downscaled from 18-decimal ledger balances for compact charting and align 1:1 with implicit timestamps.
["0.0000001"]First point timestamp in seconds since epoch (UTC).
1735689600| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |