Skip to main content
Glama
trustxai

amazing-binance-mcp

by trustxai

binance_get_algo_order_history

Read-onlyIdempotent

List finished spot TWAP algo orders (filled, cancelled, expired) with optional filters to audit execution and reconcile historical trading activity.

Instructions

List finished spot TWAP algo orders — filled, cancelled or expired.

Calls GET /sapi/v1/algo/spot/historicalOrders (SIGNED, IP weight 1). Every filter is optional: symbol, side, start_time, end_time. Binance's older reference marks symbol and side as mandatory; the current per-endpoint page makes both optional, which is what this tool follows — omit them for the whole account.

No maximum window is documented for this endpoint, so none is enforced here.

When to Use:

  • Reviewing how a TWAP actually executed once it is no longer open.

  • Reconciling a period: what algo orders ran, on what symbols, for how much.

When NOT to Use:

  • For orders still working — binance_get_open_algo_orders.

  • For the individual fills and fees of one order — binance_get_algo_sub_orders; a row here only carries the aggregate.

  • For ordinary spot order history — binance_get_all_orders (spot_orders.py).

Returns: A markdown table (bookTime, algoId, symbol, side, algoStatus, algoType, totalQty, executedQty, executedAmt, avgPrice, urgency, endTime) capped at 50 rows, or the raw {total, orders[]} payload with response_format="json" (which also carries clientAlgoId).

Pagination: page (1-based) and page_size (1-100, default 100) map to Binance's page / pageSize. Only 50 rows are rendered, so a full 100-row page hides rows 51-100: lower page_size to 50, or use response_format="json", for the rest.

Examples: params = {} params = {"symbol": "BTCUSDT", "side": "BUY", "page_size": 20} params = {"start_time": "2026-09-01", "end_time": "2026-09-23T23:59:59Z"}

Error Handling: start_time / end_time accept epoch ms or ISO-8601; anything else fails locally with a readable message. -2015 means the key lacks Reading permission or this IP is not allowlisted. /sapi does not exist on the spot testnet.

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?

Beyond the readOnlyHint/idempotentHint annotations, the description discloses the signed endpoint, IP weight, optional-filter semantics, absence of a maximum window, the 50-row render cap, pagination behavior, error code -2015 meaning, and testnet unavailability. This gives the agent far more behavioral context than annotations alone.

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 tightly organized with clearly labeled sections: endpoint, filters, when to use, when not to use, returns, pagination, examples, and error handling. Every section earns its place, and the core purpose is front-loaded in the first line.

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?

For a paginated read-only endpoint with seven parameters, this description is essentially complete: it defines scope, alternatives, return shapes, pagination caveats, parameter formats, error meanings, and example calls. An agent has everything needed to select and invoke the tool correctly without additional inference.

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 context signal reports 0% schema coverage, the nested schema actually contains property descriptions, and the tool description goes well beyond them: it clarifies every filter is optional, explains ISO-8601 vs epoch ms, documents page/page_size mapping and limits, and describes response_format effects. The description fully compensates for any schema ambiguity.

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 opens with a specific verb and resource: 'List finished spot TWAP algo orders — filled, cancelled or expired.' This immediately distinguishes it from open-order tools and clearly states scope. It also names the endpoint, further pinning down exactly what the tool does.

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 dedicated 'When to Use' and 'When NOT to Use' sections explicitly route agents to sibling tools: binance_get_open_algo_orders for working orders, binance_get_algo_sub_orders for per-order fills, and binance_get_all_orders for ordinary spot history. This is model guidance for when to invoke this tool versus alternatives.

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