binance_get_account_snapshot
Retrieve daily balance snapshots for SPOT, MARGIN, or FUTURES wallets to reconstruct historical holdings over the past month.
Instructions
Return daily balance snapshots for the SPOT, MARGIN or FUTURES wallet.
Calls GET /sapi/v1/accountSnapshot (SIGNED, IP weight 2400 — a fifth of the
12000/min /sapi IP budget in a single call; call this sparingly, never in a tight
loop). Binance only retains roughly the last month of snapshots and rejects windows
of 30 days or more, so start_time/end_time are validated locally before the
call to fail fast with a clear message.
When to Use:
To reconstruct a historical balance curve ("what was I holding a week ago").
As an occasional, deliberate call — not for polling the current balance.
When NOT to Use:
For the current live balance — use
binance_get_spot_account(spot_account.py), which is far cheaper (IP weight 20) and reflects right now, not yesterday.
Returns:
A markdown block per snapshot day (UTC date, totalAssetOfBtc, and a table of
non-zero balances sorted largest-first, capped at 50 rows per day), or raw JSON
with response_format="json".
Windows:
start_time/end_time (int ms or ISO-8601) together must span less than 30 days;
with only start_time given, end_time defaults to now and the same 30-day span
check applies. Either way, start_time itself must be within the last 30 days —
Binance does not retain snapshots older than that, regardless of window width.
Omit both to get the most recent limit days. limit is 7-30 (Binance default 7).
Examples: params = {"type": "SPOT"} params = {"type": "SPOT", "start_time": "2026-09-01", "end_time": "2026-09-10", "limit": 10}
Error Handling:
A window of 30 days or more, or a start_time more than 30 days ago, is rejected
locally instead of round-tripping to Binance's "Support query within the last one
month only". This endpoint answers HTTP 200 with {code, msg, snapshotVos} on
failure (no success field, so the client's envelope check does not catch it) — a
non-200 code is surfaced as an Error: here. -2015 means the key lacks Reading
permission or this IP is not allowlisted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |