Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

getOrderbook

Retrieve orderbook depth for a trading pair. Inspect current bid/ask levels before placing orders, or get the best bid/ask price with limit=1.

Instructions

Retrieve orderbook depth data for a trading pair. Returns a snapshot of bids and asks across all supported product types.

Use this endpoint when you need to:

  • Inspect current bid/ask depth before placing an order

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

  • Correlate with the WebSocket orderbook stream using the u (update ID) and seq fields

Supported Products: Spot, USDT contract, USDC contract, Inverse contract, Option

Returns up to 500 levels per side for derivatives (spot: up to 200; option: up to 25). Use limit=1 for best bid/ask only.

Do not use this endpoint for RPI orders — use getRpiOrderbook instead. Do not use this endpoint for 24h stats or last price — use getTickers instead.

Notes:

  • RPI orders are not included; use getRpiOrderbook for RPI-inclusive depth

  • Bids are sorted in descending order by price

  • Asks are sorted in ascending order by price

  • No authentication required

Agent hint: Use this endpoint to get current bid/ask depth for a trading pair. Use limit=1 (default for spot/option) for best bid/ask only; increase limit for deeper analysis. RPI orders are excluded — use getRpiOrderbook if RPI depth is needed. Do not use for 24h stats or last price — use getTickers for that.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYes
symbolYes
limitNo
Behavior4/5

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

Without annotations, the description discloses key behaviors: level limits per product (derivatives 500, spot 200, option 25), sorting order, and no authentication. However, it does not describe the exact response structure or any potential delays, which would improve transparency.

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-organized with sections and bullet points, but slightly verbose (e.g., 'Agent hint' repeats earlier info). Still, it's easy to scan and front-loaded with key 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 the absence of annotations and output schema, the description covers purpose, usage, parameter guidance, and behavioral constraints well. Missing details on the exact response fields, but overall sufficient for an informed tool selection.

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?

The input schema has 3 parameters with 0% coverage, but the description adds significant meaning for 'limit' (use=1 for best bid/ask) and 'category' by listing supported products. 'Symbol' is minimally explained, so some gap remains.

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 retrieves orderbook depth data for a trading pair, returning bids and asks. It specifies support for multiple product types, distinguishing it from siblings like getRpiOrderbook and getTickers.

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?

Explicitly lists use cases (e.g., inspecting depth before order, best bid/ask) and provides strong when-not-to-use guidance, naming alternative tools (getRpiOrderbook, getTickers). This helps an agent decide between similar tools.

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