Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

getOrderbook

Read-only

Retrieve order book depth for a trading pair, including bids and asks across all supported product types. Use it to inspect current liquidity and best bid/ask prices before placing an order.

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
limitNo
symbolYes
categoryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.11

TDQS

A4.6/5.0
Behavior5/5

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

Annotations provide readOnlyHint and openWorldHint, and the description adds substantial behavioral context: per-product level limits (500 derivatives, 200 spot, 25 option), bid/ask sorting order, limit=1 behavior, no authentication requirement, and exclusion of RPI orders. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with headings and bullets, but it is wordy and repeats content: the RPI exclusion, ticker exclusion, and limit guidance appear in both the main body and the 'Agent hint' section. Redundancy makes it longer than necessary, though key information is front-loaded.

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?

The description covers supported products, level limits, sorting, auth, and exclusions, which is strong for a no-output-schema tool. It mentions correlation via `u` and `seq` fields but does not fully describe the response shape or all symbol-related details. Overall, it is complete enough for correct selection and invocation.

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 description coverage is 0%, so the description carries the burden. It explains the `limit` parameter semantics (limit=1 for best bid/ask, deeper levels for analysis) and maps categories to supported product types (spot, linear, inverse, option). It does not explicitly describe `symbol` format, but it gives enough context for correct invocation.

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?

Description states a specific verb and resource: 'Retrieve orderbook depth data for a trading pair. Returns a snapshot of bids and asks.' It clearly differentiates from siblings by explicitly naming what it is not (RPI orders, tickers), helping the agent distinguish it from 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?

Provides explicit use cases ('Inspect current bid/ask depth before placing an order', 'Retrieve the best bid/ask price', 'Correlate with the WebSocket orderbook stream') and explicit exclusions with named alternatives ('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').

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