Skip to main content
Glama
trustxai

amazing-binance-mcp

by trustxai

binance_get_agg_trades

Read-onlyIdempotent

Fetch aggregated historical trades for a symbol, merging same-price/same-taker/same-timestamp trades. Use from_id for paging or a ≤1h time window to reconstruct trade flow.

Instructions

Fetch compressed/aggregate trades (same price, same taker order, same timestamp merged).

Calls GET /api/v3/aggTrades (weight 4). Filter with from_id for a stable cursor walk, or start_time/end_time for a time window — Binance rejects a start/end window wider than 1 hour on this endpoint; slice a longer range into ≤ 1h calls.

When to Use:

  • To page through historical trades by id (from_id), which binance_get_recent_trades cannot do.

  • To reconstruct a short time window of trade flow cheaply (weight 4 vs 25).

When NOT to Use:

  • For the very latest trades with no filter — binance_get_recent_trades is simpler.

Returns: Markdown: a table of up to 100 aggregate trades (id, time, price, qty, first/last trade ids, side). JSON: the full requested page (up to limit), uncapped.

Windows: start_time/end_time together must not span more than 1 hour (per Binance's own docs); omit both, or use from_id, for a wider walk.

Examples: params = {"symbol": "BTCUSDT", "from_id": 123456} params = {"symbol": "BTCUSDT", "start_time": "2024-01-01T00:00:00Z", "end_time": "2024-01-01T00:45:00Z"}

Error Handling: A window wider than 1 hour raises Binance -1127 More than 1 hours between startTime and endTime; combining from_id with the time window is rejected locally.

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

A5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds critical behavioral context beyond that: the 1-hour window limit with error code -1127, local rejection of combining `from_id` with time filters, the weight of 4, and the exact return formats (Markdown table vs JSON). This is rich, non-redundant disclosure.

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

Conciseness5/5

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

The description is long but every section earns its place. It is front-loaded with the core purpose and the most critical constraint (1-hour window). Sections for use cases, returns, windows, examples, and error handling are clearly labeled and free of fluff. The structure makes it easy to scan, and no sentence is redundant.

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?

The tool has real complexity: multiple filtering modes, a hard time-window limit, weight/rate-limit implications, and two output formats. The description covers all of it, including error handling and examples. The output schema exists, but the description still explains return structure. Nothing an agent needs to invoke this 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?

Although the schema itself has some property descriptions, the signal reports 0% coverage, so the description must carry the semantic burden. It does so thoroughly: it explains `from_id` for cursor walking, `start_time`/`end_time` for time windows, the 1-hour constraint on the window, the limit default and max, and the `response_format` options. It even provides example parameter sets. This adds far more meaning than the bare schema.

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 the exact purpose: 'Fetch compressed/aggregate trades (same price, same taker order, same timestamp merged)' and names the endpoint and weight. It explicitly differentiates from sibling `binance_get_recent_trades` by noting that paging by `from_id` is unique to this tool. The verb, resource, and scope are all specific and unambiguous.

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?

The description contains dedicated 'When to Use' and 'When NOT to Use' sections. It tells the agent exactly when to prefer this tool over `binance_get_recent_trades` (paging by id, cheap time-window reconstruction) and when not to (latest trades without filters). It also explains the 1-hour window constraint and how to slice longer ranges, leaving no inference to the agent.

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