Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

getSpreadOrderbook

Retrieve real-time bid and ask depth for a spread symbol to evaluate liquidity before placing a spread order. Returns up to 25 price levels with update IDs for WebSocket stream correlation.

Instructions

Retrieve spread orderbook depth data for a specific spread combination symbol. Returns a snapshot of bid and ask price levels, along with sequence and timestamp fields for correlation with WebSocket streams.

Use this endpoint when you need to:

  • Inspect current bid/ask depth before placing a spread order

  • Fetch the best bid/ask price and available size at each level

  • Correlate with the WebSocket orderbook stream using the u (update ID) field

Returns up to 25 price levels per side. Use limit=1 (default) for best bid/ask only; increase limit for deeper analysis.

Do not use this endpoint for 24h stats or last traded price — use getSpreadTickers instead.

Notes:

  • Bids are sorted in descending order by price

  • Asks are sorted in ascending order by price

  • The u field correlates with the WebSocket orderbook stream update ID

  • No authentication required

Agent hint: Use this endpoint to get current bid/ask depth for a spread symbol. The symbol must be a valid spread combination — obtain it from getSpreadInstrumentsInfo if unknown. Use limit=1 (default) for best bid/ask only; increase limit for deeper order book analysis. Do not use this for 24h stats or last price — use getSpreadTickers for that.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
limitNo
Behavior5/5

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

Given no annotations, the description fully explains behavior: returns up to 25 levels per side, bid/ask sorting, u field for correlation, no auth required. It also explains default limit behavior and return fields.

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 intro, bullet points, notes, and agent hint. However, some repetition exists between usage points and agent hint. Still concise overall with no fluff.

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?

Without output schema, the description explains return fields (bid/ask levels, sequence, timestamp) and ordering. It also covers correlation with WebSocket and default limit. Sufficient for an AI agent to use correctly.

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

Parameters5/5

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

Schema has 0% description coverage, so the description compensates fully. It explains symbol must be valid spread combination (with reference to getSpreadInstrumentsInfo) and limit default=1 for best bid/ask, with range up to 25.

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 retrieves spread orderbook depth data for a specific spread symbol, with specific verb 'Retrieve'. It distinguishes from siblings like getSpreadTickers by explicitly stating what not to use it for.

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 usage scenarios are listed ('when you need to... inspect current bid/ask depth, fetch best bid/ask, correlate with WebSocket'). Also includes explicit 'Do not use' with alternative tool (getSpreadTickers). Agent hint provides additional guidance on symbol and limit.

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