Skip to main content
Glama
kydlikebtc

binance-mcp-server

by kydlikebtc

binance_futures_order_history

Query historical futures order records for a single symbol with time range, limit, and pagination filters. Retrieve order status, fill details, and realized PnL for trade analysis and performance review.

Instructions

【合约历史订单】查询合约市场的历史订单记录

📋 功能说明

  • 查询所有历史订单:已成交、已取消、被拒绝、已过期

  • 支持时间范围筛选(最大7天)

  • 支持分页查询和数量限制

  • 包含订单详细状态、成交信息和实现盈亏

⚠️ 重要提醒

  • 每次查询只能指定一个合约

  • 时间范围不能超过7天

  • 默认按时间倒序返回(最新的在前)

  • 数据量大时建议使用limit参数限制

🎯 适用场景

  • 查看历史交易记录和盈亏情况

  • 分析交易策略效果和成功率

  • 核对账户盈亏和手续费

  • 导出合约交易数据进行分析

📊 输出示例 查询成功后将返回:

📈 合约历史订单查询结果

📊 查询概况
查询期间:2022-01-01 至 2022-01-07 (7天)
合约类型:BTCUSDT 永续合约
找到订单:8 个历史记录

📈 执行统计
✅ 成交订单:5 个 (62.5%)
❌ 撤销订单:3 个 (37.5%)
📊 整体成功率:62.5%

📋 订单详情

✅ 订单 #123456789 [已完成]
交易方向:买入开多仓 (看涨)
订单类型:限价单
委托数量:0.001 BTC
委托价格:45,000 USDT
实际成交:0.001 BTC (100%)
成交金额:45 USDT
实现盈亏:+2.5 USDT
下单时间:2022-01-01 08:00:00
完成时间:2022-01-01 08:05:30
执行时长:5分30秒

💡 交易总结
本期间合约交易较为活跃,成交率良好。
建议继续关注市场趋势,优化入场时机。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo返回订单数量限制。默认500,最大1000。
symbolYes必填。要查询的合约,如"BTCUSDT"。每次查询只能指定一个合约。
endTimeNo查询结束时间,13位时间戳(毫秒)。必须大于startTime,最大查询范围7天。
orderIdNo指定订单ID,返回该订单ID及之后的订单。可用于分页查询。
startTimeNo查询开始时间,13位时间戳(毫秒)。与endTime配合使用,最大查询范围7天。
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses important behavioral traits: returns all order statuses, enforces a 7-day time window, defaults to descending order, and supports pagination via orderId. It includes a detailed output example showing the expected result format and derived statistics (e.g., success rate). It does not mention error handling or rate limits, but for a read-only query tool this is sufficient context.

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 well-structured with clear sections (功能说明, 重要提醒, 适用场景, 输出示例). It front-loads the core purpose and important constraints. The output example is long but serves as a useful concrete illustration for an agent. Some redundancy exists (7-day limit appears in both features and reminders), but the overall size is appropriate for a tool with 5 parameters and no output schema.

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

Completeness4/5

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

Given the tool's complexity (5 params, no output schema, no annotations), the description covers key aspects: query scope, time constraints, pagination, sorting, and expected output through the example. It lacks details on API authentication, rate limiting, or possible error responses, but those are less critical for an agent choosing to invoke the tool. The provided example compensates for the missing output schema.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds value beyond the schema by emphasizing key usage constraints: '每次查询只能指定一个合约' (one symbol per query), '默认按时间倒序返回' (default descending sort), and advising to use limit for large datasets. It also clarifies the optionality and behavior of startTime/endTime, which the schema already documents but the description reinforces with practical context.

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 clearly states the tool queries historical contract orders ('查询合约市场的历史订单记录') and lists the specific statuses included (已成交、已取消、被拒绝、已过期). It distinguishes itself from sibling tools like binance_futures_open_orders by explicitly covering all historical orders, not currently open ones. The verb '查询' is specific and resource-bound.

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

Usage Guidelines4/5

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

Provides a dedicated '适用场景' section listing concrete use cases (viewing history/PnL, analyzing strategy success, verifying fees, exporting data). It also gives practical constraints (one contract per query, 7-day max range, use limit for large data). However, it does not explicitly contrast with sibling tools like binance_futures_trade_history or mention when NOT to use this tool, so it lacks explicit exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kydlikebtc/binance-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server