Skip to main content
Glama
trustxai

amazing-binance-mcp

by trustxai

binance_get_pay_history

Read-onlyIdempotent

Walk up to 18 months of Binance Pay history without hitting 90-day or 100-row limits. Get deduplicated transactions newest-first and a resume cursor for large or interrupted pulls.

Instructions

Walk up to 18 months of Binance Pay history, past the 90-day / 100-row API caps.

Repeatedly calls GET /sapi/v1/pay/transactions (UID weight 3000 per call) in <=89-day windows, newest-first, from since (default: Binance's 18-month lookback plus a two-day margin; an older since is clamped to it) up to now, or up to a resume_before cursor from a previous truncated call. A window that comes back with exactly 100 rows (the page limit) is bisected — split at its midpoint and re-walked — so a dense period is not silently dropped; if bisection reaches its 1 ms floor and STILL gets a full page, those extra rows are dropped and the response says so (possibly_incomplete). Spends at most max_calls requests (default 30 = 90,000 UID) before stopping; the returned resume_before cursor always marks the boundary of the next unfetched range (never derived from which rows happened to come back), and is omitted (no_progress) on the rare case the budget ran out before even the newest window could make any progress — resuming then would just repeat the same calls, so raise max_calls instead.

Binance Card spending is NOT available via API; card-funded Pay payments appear here with walletType 4 or 6 ("card").

When to Use:

  • To pull a full Pay history for reconciliation without hand-rolling the 90-day windowing or the 100-row-per-window cap.

  • To resume a previous run that stopped early — pass the same since plus its resume_before back in.

When NOT to Use:

  • For a single recent window — binance_get_pay_transactions is one call and cheaper.

Returns: Markdown (or JSON) list of transactions deduped by transactionId (scoped to this one call — not a persistent cross-call dedupe) sorted newest-first, the number of API calls spent, and — when the budget ran out before reaching since — a resume_before cursor to pass back on the next call alongside the same since. Markdown display is capped at 50 rows; response_format="json" always carries the full set collected by this call (only clip_response's byte cap applies).

Pagination/Windows: since accepts an ms epoch, a >=12-digit epoch-ms string, or an ISO-8601 string, default now minus 18 months (+2 days); anything older is clamped to that floor and reported as since_clamped. Each top-level window is at most 89 days (under Binance's 90-day cap); a window may cost more than one call if it has to be bisected, so max_calls bounds total calls, not windows. resume_before is always the boundary of the next unfetched range, so a resumed call never re-walks already-collected ranges (aside from harmless dedupe-caught edge overlaps).

Examples: params = {} # last 18 months, up to 30 calls params = {"since": "2026-01-01", "resume_before": 1700000000000, "max_calls": 10}

Error Handling: A request failure mid-walk does NOT discard what was already fetched: the rows collected so far come back with resume_before (the boundary of the next unfetched range) and the failure itself in stop_error — fix the cause, then call again with the same since and that resume_before. no_progress: true with no cursor means nothing was collected before the failure — clear the cause and repeat the same call. A range that ends before Binance's 18-month lookback is refused locally (nothing in it is retrievable). -2015 means the key lacks permission or the IP is not on the key's allowlist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds enormous behavioral detail beyond the annotations (readOnlyHint, idempotentHint, destructiveHint=false): UID weight 3000 per call, bisection with a 1ms floor, row-dropping with possibly_incomplete flag, max_calls budget semantics, resume_before cursor contract, no_progress case, partial-fetch preservation on failure with stop_error, and the -2015 permission/allowlist meaning. No contradiction with the annotations — the description's read-only, idempotent framing aligns with them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but extremely well organized into labeled sections (When to Use, When NOT to Use, Returns, Pagination/Windows, Examples, Error Handling) and front-loads the core purpose. Every section earns its place given the algorithm's complexity; the length is justified, though it could be trimmed slightly without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Exceptionally complete for a complex paginated windowing tool. It covers return format and dedup semantics, output schema expectations, pagination/window mechanics, cursor resumption, clamping, error handling with recovery guidance, code examples, and the card-walletType caveat. Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even though the schema already carries descriptions for since, max_calls, and resume_before, the tool description amplifies them: exact accepted formats (ms epoch, >=12-digit epoch-ms string, ISO-8601), the clamping-to-lookback behavior reported as since_clamped, the default 30 calls = 90,000 UID budget, and the precise resume_before boundary contract. It fully compensates for any schema ambiguity and goes well beyond what the schema states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: walks up to 18 months of Binance Pay history, repeatedly calling GET /sapi/v1/pay/transactions with windowing and bisection to bypass the 90-day/100-row caps. It explicitly distinguishes itself from binance_get_pay_transactions in the 'When NOT to Use' section, so an agent can tell them apart immediately.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Has dedicated 'When to Use' and 'When NOT to Use' sections. It names the cheaper alternative (binance_get_pay_transactions for a single recent window) and gives the reconciliation/resume scenarios where this tool is the right choice. Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools