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?accountCode=FUNDING&ledger=USDT&range=1d&subaccountId=45LUmqjT' \ --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 balances as decimal strings in asset units with at most 7 decimal places, for example '1.2345678'. 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 | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| unauthenticated | 401 | unauthenticated | Unauthenticated | Authentication required. |
| permission-denied | 403 | permission_denied | Permission Denied | Permission denied. |
| invalid-argument | 400 | invalid_argument | Invalid Argument | Invalid argument. |
| not-found | 404 | not_found | Not Found | Not found. |
| unavailable | 503 | unavailable | Unavailable | Service unavailable. |