Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

getOrderHistory

Query completed, cancelled, or expired orders from the past two years. Supports filtering by order type and status, with pagination for up to 7 days per request.

Instructions

Query historical order records. Supports up to 2 years of data.

  • Max time span between startTime and endTime is 7 days

  • If both time params omitted, returns last 7 days

  • Pagination via cursor token

  • Use orderFilter to target specific order types

  • Use orderStatus to filter by terminal status

Agent hint: Use this endpoint to query completed/cancelled/expired orders. For currently active orders, use getOpenOrders instead. TradFi: use category=spot for xStock order history, category=linear for equity/commodity perpetual order history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYes
symbolNo
baseCoinNo
settleCoinNo
orderIdNo
orderLinkIdNo
orderFilterNo
orderStatusNo
startTimeNo
endTimeNo
limitNo
cursorNo
Behavior4/5

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

Discloses key behaviors: 2-year data limit, 7-day max span, default period, pagination via cursor, and filter options. No annotations provided, so description carries full burden; lacks mention of rate limits or response format but sufficient for safe read operation.

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?

Concise, well-structured with bullet points and agent hint. Every sentence adds value, no fluff. Front-loaded with core purpose.

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 12 parameters, no annotations, and no output schema, the description covers purpose, usage, key filters, and sibling distinction. Missing details on some parameters (symbol, coin) and return format, but overall sufficient for an agent to select and invoke correctly.

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?

With 0% schema description coverage, the description adds meaning for critical parameters: startTime/endTime (limits), cursor (pagination), orderFilter (type filter), orderStatus (status filter), category (TradFi mapping). Does not cover symbol, baseCoin, etc., but these are inferable from names. Adds significant value over schema.

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 order records, specifying verb and resource. It differentiates from siblings like getOpenOrders via the agent hint, and provides context like TradFi category mapping.

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?

Explicit guidance on when to use (completed/cancelled/expired orders) and when not (active orders, recommending getOpenOrders). Includes max time span, pagination, and filter usage.

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