Skip to main content
Glama

info_marketdetail_get_orderbook

Read-onlyIdempotent

Read-only Gate order book depth (bids/asks as price/size) for a trading pair or contract. Inputs: symbol (required), market_type spot|futures|delivery|options (default spot), depth 1–100 (default 20; over-limit rejected), settle for futures (usdt|btc) or delivery (usdt). Spot/options reject settle. Does not place orders. Read-only public research data. No account access, no order placement or fund transfers. Not investment advice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoOrder book depth levels; omit for default 20; minimum 1, maximum 100. Values above max are rejected.
settleNoSettlement for futures/delivery; default usdt; omit for options.
symbolYesTrading pair e.g. BTC_USDT.
market_typeNoMarket venue; default spot when omitted. Allowed: spot|futures|delivery|options.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
depthYes
itemsYesUsually one OrderBookItem with bids/asks as {price,size} levels.
totalYes
settleNo
symbolYesEcho input. Item timestamps are UTC (+00:00); convert for local display.
cex_toolNoUpstream route label (omitted on open surface).
duration_msNoServer timing (omitted on open surface).
market_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / items / items / properties / current / description
      Previous value: -"Response time (Unix ms or sec, upstream)."New value: +"Book response time from upstream. Spot often Unix ms; futures/delivery often Unix seconds (may be fractional). Prefer current_utc."
    • changedOutput schema / properties / items / items / properties / update / description
      Previous value: -"Last book change time (upstream)."New value: +"Last book change time from upstream (same unit rules as current). Prefer update_utc."
  2. Changed4 schema fields changed
    • changedOutput schema / properties / items / description
      Previous value: -"Usually one object with bids and asks arrays; each level is [price, size] (strings). Timestamps UTC (+00:00)."New value: +"Usually one OrderBookItem with bids/asks as {price,size} levels."
    • changedOutput schema / properties / items / items / additionalProperties
      Previous value: -trueNew value: +false
    • addedOutput schema / properties / items / items / properties
      Added value: +{
      +  "asks": {
      +    "description": "Ask levels, best first; each level has price then size.",
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "price": {
      +          "description": "Price (quote currency), string.",
      +          "type": "string"
      +        },
      +        "size": {
      +          "description": "Size/quantity, string.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "price",
      +        "size"
      +      ],
      +      "type": "object"
      +    },
      +    "type": [
      +      "null",
      +      "array"
      +    ]
      +  },
      +  "bids": {
      +    "description": "Bid levels, best first; each level has price then size.",
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "price": {
      +          "description": "Price (quote currency), string.",
      +          "type": "string"
      +        },
      +        "size": {
      +          "description": "Size/quantity, string.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "price",
      +        "size"
      +      ],
      +      "type": "object"
      +    },
      +    "type": [
      +      "null",
      +      "array"
      +    ]
      +  },
      +  "current": {
      +    "description": "Response time (Unix ms or sec, upstream).",
      +    "type": "string"
      +  },
      +  "current_utc": {
      +    "description": "RFC3339 UTC (+00:00).",
      +    "type": "string"
      +  },
      +  "id": {
      +    "description": "Order book id when provided by upstream.",
      +    "type": "string"
      +  },
      +  "update": {
      +    "description": "Last book change time (upstream).",
      +    "type": "string"
      +  },
      +  "update_utc": {
      +    "description": "RFC3339 UTC (+00:00).",
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / items / items / required
      Added value: +[
      +  "bids",
      +  "asks"
      +]
  3. Changed8 schema fields changed
    • addedInput schema / properties / depth / default
      Added value: +20
    • changedInput schema / properties / depth / description
      Previous value: -"Order book depth levels; default 20, max 100. Values above max are rejected."New value: +"Order book depth levels; omit for default 20; minimum 1, maximum 100. Values above max are rejected."
    • addedInput schema / properties / depth / maximum
      Added value: +100
    • addedInput schema / properties / depth / minimum
      Added value: +1
    • changedInput schema / properties / market_type / description
      Previous value: -"spot (default)|futures|delivery|options."New value: +"Market venue; default spot when omitted. Allowed: spot|futures|delivery|options."
    • addedInput schema / properties / market_type / enum
      Added value: +[
      +  "spot",
      +  "futures",
      +  "delivery",
      +  "options"
      +]
    • addedInput schema / properties / symbol / minLength
      Added value: +1
    • addedOutput schema / properties / items / description
      Added value: +"Usually one object with bids and asks arrays; each level is [price, size] (strings). Timestamps UTC (+00:00)."
  4. Changed6 schema fields changed
    • changedInput schema / properties / depth / description
      Previous value: -"Order book depth; default 20, max 100."New value: +"Order book depth levels; default 20, max 100. Values above max are rejected."
    • removedInput schema / properties / extra
      Removed value: -{
      -  "additionalProperties": true,
      -  "description": "Extra Gate API params merged into request.",
      -  "type": "object"
      -}
    • changedInput schema / properties / symbol / description
      Previous value: -"Pair e.g. BTC_USDT."New value: +"Trading pair e.g. BTC_USDT."
    • addedOutput schema / properties / cex_tool / description
      Added value: +"Upstream route label (omitted on open surface)."
    • addedOutput schema / properties / duration_ms / description
      Added value: +"Server timing (omitted on open surface)."
    • changedOutput schema / required
      Previous value: -[
      -  "symbol",
      -  "market_type",
      -  "depth",
      -  "cex_tool",
      -  "total",
      -  "count",
      -  "items",
      -  "duration_ms"
      -]New value: +[
      +  "symbol",
      +  "market_type",
      +  "depth",
      +  "total",
      +  "count",
      +  "items"
      +]
  5. Changed5 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / extra / additionalProperties
      Added value: +true
    • addedOutput schema / additionalProperties
      Added value: +false
    • addedOutput schema / properties / items / items / additionalProperties
      Added value: +true
    • changedOutput schema / properties / items / type
      Previous value: -"array"New value: +[
      +  "null",
      +  "array"
      +]
  6. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds behavioral details beyond the schema: it states explicitly it does not place orders, has no account access, and that over-limit depth values are rejected. This provides meaningful operational context.

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 a compact paragraph that front-loads the core purpose and then efficiently lists parameters, constraints, defaults, and read-only assurances. It is dense but not verbose, with no redundant statements, although the last sentence about no investment advice could be considered slightly tangential.

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?

An output schema exists, so return value details are covered externally. The description adequately covers purpose, parameters, market types, settle rules, depth limits, and safety. The only minor gap is lack of explicit differentiation from the similar-sounding info_platformmetrics_get_cex_orderbook_depth, but the scope (pair-specific depth vs platform-level metrics) is implicitly clear.

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 100%, so the param basics are in the schema. The description adds extra constraints beyond the schema: it explains that over-limit depth is rejected, settle applies only to futures/delivery, and spot/options reject settle. These enrich understanding of parameter relationships and defaults.

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 precisely states it returns read-only order book depth (bids/asks) for a trading pair or contract, naming the resource and operation clearly. It distinguishes from sibling tools like get_kline and get_recent_trades by focusing on order book depth, and the read-only nature is explicit.

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?

The description provides clear usage context: it specifies market_type options (spot|futures|delivery|options), the depth range with default and limit rejection, and the settle parameter restrictions for futures/delivery while noting spot/options reject it. It doesn't explicitly compare against alternatives, but the constraints are enough to guide correct invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.