binance_get_all_my_trades
Get a complete history of every executed trade across all Binance symbols in one call. Handles Binance's per-symbol API limit by walking each traded symbol and returning a resumable cursor for large exports.
Instructions
Collect every fill across every symbol this account traded — the "all my trades" answer.
Binance has no such endpoint (myTrades needs a symbol; staff confirm the gap on
dev.binance.vision threads 4810 and 4329), so this tool does the only thing that
works over REST: take a symbol list — yours, or one from
binance_discover_traded_symbols — and walk each symbol by fromId at 1000 fills a
page until a short page says that symbol is exhausted.
Two brakes keep it inside the 6000/min IP budget. max_weight (default 3000 = 150
pages) is checked before every request, and the walk also stops when Binance's own
reported used weight passes weight_ceiling (default 5000). When either fires — or
when a request errors mid-walk — the fills collected so far are returned together
with a cursor, so nothing is lost and the next run resumes exactly there.
Cost, so nobody is surprised: 20 IP weight per page per symbol. 150 symbols with no trades still costs 3000 weight. Walking all 1370 TRADING symbols would cost 27,400 — about five minutes of full budget — which is why discovery narrows the list first.
When to Use:
"Show me every trade I have ever made", tax/portfolio reconstruction, a full export.
Incremental top-ups: keep the returned
cursorand pass it back next time.
When NOT to Use:
For one pair —
binance_get_my_tradesis one call.For orders that never filled, deposits, withdrawals, converts or Pay/Card spending: those are different endpoints (spot_orders, wallet_capital, convert, pay).
Returns:
Markdown: the walk status (symbols finished, calls, weight), a time-sorted table of up
to 200 fills, per-symbol totals (fills, bought/sold base and quote, fees by asset) and
the next cursor as a JSON block to paste back. JSON: the same data with every fill.
Pagination:
cursor maps symbol → the last trade id already collected; the walk restarts each
symbol at that id + 1, so re-running is cheap and never duplicates a fill. Symbols the
budget never reached keep whatever position the cursor already held. A symbol that
returns no trades gets no cursor entry, so every incremental run re-checks it from
scratch at 20 weight a time — drop the empties from symbols once you know them.
Examples: params = {} params = {"symbols": ["BTCUSDT", "ETHUSDT"], "max_weight": 200} params = {"symbols": ["BTCUSDT"], "cursor": {"BTCUSDT": 4211999}}
Error Handling:
An error mid-walk never discards work: the partial fills plus the cursor come back
alongside the error text. -2015 means the key lacks Reading or the IP is not
allowlisted; a 429/418 means the budget was already spent elsewhere — lower
weight_ceiling and wait a minute.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |