binance_get_all_deposits
Fetch complete deposit history from Binance, automatically walking 90-day API windows with pagination and resume support.
Instructions
Every crypto deposit since since — the 90-day cap walked for you.
Binance only answers 90 days at a time, so this walks until → since in 89-day
windows, newest first, paging offset by 1000 inside each window until a short page
proves it is drained. Rows are deduped by their Binance id, so overlapping
windows (and a resumed run) can never double-count.
since defaults to 2017-07-01, Binance's launch: there is no API that reports
when an account was created — apiRestrictions.createTime is the API KEY's date,
not the account's — so "everything" means "since the exchange existed". Windows
before the account opened simply return nothing.
Cost: GET /sapi/v1/capital/deposit/hisrec is IP weight 1, so the default
max_calls=60 (≈ 15 years of windows) is cheap. The budget is checked BEFORE every
request and the reported call count is the real one.
When to Use:
"Show me every deposit I have ever made" — the headline question.
Reconstructing cost basis or an audit trail of money coming IN.
When NOT to Use:
For one recent window —
binance_get_deposit_historyis one call.For withdrawals — use
binance_get_all_withdrawals.For fiat on-ramps (card/bank) — use
binance_get_fiat_orders/binance_get_fiat_payments(fiat.py); they are a different rail.
Returns:
Rows sorted newest-first with per-coin totals (count + summed amount). Markdown
displays at most 50 rows; response_format="json" returns
{count, truncated, no_progress, since, until, resume_before, calls_made, totals, items} with the full set. truncated is true exactly when the walk did not reach
since; no_progress is true when it did not finish even the first window, and
then resume_before is null on purpose — see Pagination.
Pagination:
If the walk stops before since — budget exhausted, or an error — it returns the
rows it already has PLUS resume_before, the boundary of the next UNFETCHED range.
Call again with the same since and that resume_before to continue. A stop in
the middle of a window re-fetches that window, which the dedupe makes harmless.
If it stopped without completing even the FIRST window there is no cursor to give:
resume_before comes back null with no_progress: true, because repeating the run
with resume_before = until would re-issue the identical calls forever. Raise
max_calls (or fix the error) and re-run the same range instead.
Examples: params = {} params = {"since": "2024-01-01", "coin": "USDT"} params = {"since": "2017-07-01", "resume_before": 1717200000000, "response_format": "json"}
Error Handling: An over-wide-window error from Binance is tolerated: the window is halved and retried. Anything else — auth (-2015), rate limits (429/418), a Binance envelope failure — stops the walk immediately and is reported alongside the rows already collected and the resume cursor, so nothing fetched is ever thrown away.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |