Skip to main content
Glama
kydlikebtc

binance-mcp-server

by kydlikebtc

binance_futures_trade_history

Retrieve detailed futures trade history including price, quantity, fees, and realized profit/loss. Filter by symbol and time range to audit trading costs and net returns.

Instructions

【合约成交记录】查询合约市场的实际成交明细

📋 功能说明

  • 查询每笔实际成交的详细信息

  • 包含成交价格、数量、手续费、实现盈亏

  • 支持时间范围和分页查询

  • 可用于精确核对交易成本和实际收益

⚠️ 重要提醒

  • 只显示实际成交的交易,不包含未成交订单

  • 每次查询限定一个合约

  • 时间范围不能超过7天

  • 包含正负盈亏和资金费用信息

🎯 适用场景

  • 精确计算合约交易成本和净收益

  • 核对账户盈亏变动明细

  • 分析成交价格和市场时机

  • 导出合约交易数据用于税务申报

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

💰 合约成交记录查询结果

📊 成交概况
查询期间:最近7天
合约类型:BTCUSDT 永续合约
成交笔数:5 笔实际交易
总成交额:225 USDT
总手续费:0.45 USDT
实现盈亏:+12.3 USDT
平均价格:45,000 USDT

📋 成交明细

💵 成交 #987654321
关联订单:#123456789
成交时间:2022-01-01 08:05:30
交易角色:买方 (Taker)
成交价格:45,000 USDT
成交数量:0.001 BTC
成交金额:45 USDT
手续费:0.09 USDT (0.2%)
实现盈亏:+2.5 USDT
持仓变化:+0.001 BTC (多头)

💵 成交 #987654322
关联订单:#123456790
成交时间:2022-01-01 10:15:20
交易角色:卖方 (Maker)
成交价格:46,000 USDT
成交数量:0.001 BTC
成交金额:46 USDT
手续费:0.046 USDT (0.1%)
实现盈亏:+3.8 USDT
持仓变化:-0.001 BTC (平多)

📈 盈亏分析
总买入:0.003 BTC (花费 135.27 USDT)
总卖出:0.002 BTC (收入 91.95 USDT)
当前持仓:0.001 BTC (多头)
实现盈亏:+12.3 USDT
未实现盈亏:+1.0 USDT
总盈亏:+13.3 USDT
收益率:+9.8%

💡 交易提示
合约成交记录完整,盈亏计算准确。
建议定期核对成交数据与账户余额。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo返回交易记录数量限制。默认500,最大1000。
fromIdNo从指定交易ID开始返回记录。可用于分页查询,获取该ID之后的交易记录。
symbolYes必填。要查询的合约,如"BTCUSDT"。每次查询只能指定一个合约。
endTimeNo查询结束时间,13位时间戳(毫秒)。必须大于startTime,最大查询范围7天。
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 and does well. It discloses that only actual filled trades are returned, not open orders, that each query is limited to one contract, and that the time range cannot exceed 7 days. The output example also reveals the response structure, including fee and PnL fields. Missing explicit error/edge-case behavior prevents a 5.

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 headings, bullet lists, and a comprehensive output example. While it is quite long, every section adds value, especially the detailed example that compensates for the lack of an output schema. It is more verbose than ideal but not 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?

For a 5-parameter tool with no output schema and no annotations, the description is remarkably complete. It explains the return format via a detailed example, covers key constraints, and provides real-world use cases. The output example alone gives the agent a clear picture of what to expect, so no critical information is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters. The description adds only general mentions of time range and pagination ('支持时间范围和分页查询'), but does not provide additional semantics beyond the schema. Baseline 3 is appropriate.

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 it queries actual futures market trade details ('查询合约市场的实际成交明细'). It distinguishes itself from order history by emphasizing it only shows filled trades, not unfilled orders, and from spot tools by explicitly saying '合约' (futures). This is 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 Guidelines4/5

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

The '适用场景' section provides clear use cases (cost calculation, PnL reconciliation, tax reporting), and constraints like '每次查询限定一个合约' and time range limits inform when it's appropriate. However, it does not explicitly name sibling tools as alternatives or state when not to use it, so it stops short of a 5.

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