Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

getSpreadTradeHistory

Retrieve spread trade execution history with per-leg details for fee audits and reconciliation. Supports time range queries up to 7 days.

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
symbolNo
orderIdNo
orderLinkIdNo
startTimeNo
endTimeNo
limitNo
cursorNo
Behavior5/5

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

Discloses key behavioral traits: max 7-day window, self-trade behavior (both maker/taker), deprecation of execFee for spot legs, and nested leg array. With no annotations, the description fully carries the transparency burden and excels.

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?

Well-structured with headers, bullet points, and a summary. Slightly verbose, but every sentence adds value. Could be trimmed slightly for conciseness, but overall efficient.

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 7 parameters, no output schema, and no annotations, the description covers time range, self-trade, fee fields, and authentication hint. Missing explicit pagination details for cursor/limit, but hinted via 'nested legs array' and 'max 50'. Adequate for a query tool.

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 0%, but description compensates by explaining time range logic for startTime/endTime, default behavior, and constraints. It does not detail symbol, orderId, orderLinkId, limit, or cursor semantics, but the time range explanation adds significant value.

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 'Query spread trading execution (trade) history, including individual leg execution details.' It uses a specific verb ('query'), identifies the resource ('spread trading execution history'), and distinguishes from sibling tools like getSpreadOrderHistory by focusing on executions.

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 data), time range logic, and important notes (self-trade, fee handling). It does not explicitly state when not to use, but the context is clear enough with the sibling list.

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/bybit-exchange/trading-mcp'

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