Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

getSpreadTradeHistory

Read-only

Fetch spread trade execution history, including per-leg fills and fees, to audit and reconcile both legs of completed spread orders over a 7-day window.

Instructions

Query spread trading execution (trade) history, including individual leg execution details.

Usage Scenarios:

  • Review fills and execution prices for completed spread trades.

  • Audit fees per leg (use execFeeV2 for spot legs, execFee for futures legs).

  • Reconcile execution data across both legs of a spread order.

  • Query executions within a specific time range (max 7-day window).

Time Range Logic:

  • Neither startTime nor endTime: returns last 7 days of history.

  • startTime only: returns data from startTime to startTime + 7 days.

  • endTime only: returns data from endTime - 7 days to endTime.

  • Both provided: endTime - startTime must be <= 7 days.

Important:

  • In self-trade cases, both maker and taker single-leg trades are returned.

  • For spot legs, use execFeeV2 instead of execFee (which is deprecated for spot).

Agent hint: GET endpoint requiring authentication. All parameters are optional. Time range limited to 7 days max. Response includes a nested legs array with per-leg execution details. For spot legs use execFeeV2 (execFee is deprecated for spot). Self-trade cases return both maker and taker legs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
cursorNo
symbolNo
endTimeNo
orderIdNo
startTimeNo
orderLinkIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.11

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint. The description adds rich behavioral context: max 7-day window with exact start/end fallback behavior, self-trade returning both maker and taker legs, deprecated execFee for spot legs in favor of execFeeV2, and authentication requirement. These go well beyond the structured annotation data.

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?

Well-structured Markdown with clear sections and bullet points. The main purpose is front-loaded, and every section earns its place. Minor repetition of the execFeeV2 caveat appears in both the Important section and the agent hint, but this is acceptable reinforcement rather than bloat.

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

Completeness3/5

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

The description fully covers time-range constraints, self-trade behavior, fee-field choice, and usage scenarios, which is substantial. However, it does not explain the meaning of five parameters (limit, cursor, symbol, orderId, orderLinkId) nor describe response structure beyond mentioning a nested legs array. Given no output schema and 0% schema parameter coverage, this leaves gaps for an agent invoking the tool correctly.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It thoroughly explains startTime and endTime semantics, but ignores symbol, orderId, orderLinkId, cursor, and limit. With 7 parameters and only 2 documented, an agent cannot confidently construct a correct request beyond the time-range aspects.

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+resource: 'Query spread trading execution (trade) history, including individual leg execution details.' It clearly differentiates from sibling tools like getSpreadOrderHistory (order-level) and getTradeHistory (general trades) by focusing on execution history with per-leg detail.

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 explicit 'Usage Scenarios' (review fills, audit fees, reconcile executions) and detailed 'Time Range Logic' rules. It lacks direct comparison to alternatives like getSpreadOrderHistory, but the scenarios and leg-detail focus make the intended use clear enough. The agent hint adds practical invocation context.

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