Skip to main content
Glama

info_marketdetail_get_kline

Read-onlyIdempotent

Read-only Gate candlesticks for a trading pair or contract. Inputs: symbol (required), timeframe (validated per market_type; delivery excludes 1s|3d), market_type spot|futures|delivery|options (default spot), limit 1–400 (default 100; over-limit rejected) for latest N only, optional paired start_time/end_time Unix seconds (mutually exclusive with limit; range returns up to 400 latest candles and may set truncated/actual_start_time/actual_end_time), settle for futures/delivery. Each candle includes t, open, high, low, close; volume and quote_volume only when upstream provides them. Invalid timeframe or unknown symbol returns an error. Read-only public research data. No account access, no order placement or fund transfers. Not investment advice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax candles when no time range; omit for default 100; minimum 1, maximum 400. Over-limit rejected. Cannot combine with start_time/end_time.
settleNofutures/delivery settlement; default usdt.
symbolYesPair or contract e.g. BTC_USDT.
end_timeNoEnd Unix seconds; must be paired with start_time. Range queries return up to 400 latest candles and may set truncated.
timeframeYesCandle interval. start_time/end_time are Unix seconds.
start_timeNoStart Unix seconds; must be paired with end_time. Omit both with limit for latest N candles. Mutually exclusive with explicit limit.
market_typeNoMarket venue; default spot when omitted. Allowed: spot|futures|delivery|options.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
itemsYesCandles with t, open, high, low, close required; volume/quote_volume when upstream provides them; times UTC.
totalYes
settleNo
symbolYesEcho input. Candle times are UTC (+00:00); convert for local display.
cex_toolNoUpstream route label (omitted on open surface).
end_timeNoEchoed range end when start_time/end_time were provided.
timeframeYes
truncatedNoTrue when a range query returned only the latest MaxKlineLimit candles.
start_timeNoEchoed range start when start_time/end_time were provided.
duration_msNoServer timing (omitted on open surface).
market_typeYes
actual_end_timeNoLatest candle t in items (Unix seconds) after truncation.
actual_start_timeNoEarliest candle t in items (Unix seconds) after truncation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / items / items / properties / is_candle_closed / description
      Previous value: -"Whether the candle is closed (spot)."New value: +"Whether the candle is closed (spot); boolean when upstream provides it."
    • changedOutput schema / properties / items / items / properties / is_candle_closed / type
      Previous value: -"string"New value: +[
      +  "null",
      +  "boolean"
      +]
  2. Changed8 schema fields changed
    • changedInput schema / properties / end_time / description
      Previous value: -"End Unix seconds."New value: +"End Unix seconds; must be paired with start_time. Range queries return up to 400 latest candles and may set truncated."
    • changedInput schema / properties / limit / description
      Previous value: -"Max candles; omit for default 100; minimum 1, maximum 400. Over-limit rejected. Without range = latest N newest-first."New value: +"Max candles when no time range; omit for default 100; minimum 1, maximum 400. Over-limit rejected. Cannot combine with start_time/end_time."
    • changedInput schema / properties / start_time / description
      Previous value: -"Start Unix seconds; with end_time for range; omit with limit = latest N candles newest-first."New value: +"Start Unix seconds; must be paired with end_time. Omit both with limit for latest N candles. Mutually exclusive with explicit limit."
    • addedOutput schema / properties / actual_end_time
      Added value: +{
      +  "description": "Latest candle t in items (Unix seconds) after truncation.",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / actual_start_time
      Added value: +{
      +  "description": "Earliest candle t in items (Unix seconds) after truncation.",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / end_time
      Added value: +{
      +  "description": "Echoed range end when start_time/end_time were provided.",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / start_time
      Added value: +{
      +  "description": "Echoed range start when start_time/end_time were provided.",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when a range query returned only the latest MaxKlineLimit candles.",
      +  "type": "boolean"
      +}
  3. Changed3 schema fields changed
    • changedOutput schema / properties / items / description
      Previous value: -"Candles with t, open, high, low, close, volume, quote_volume; times UTC."New value: +"Candles with t, open, high, low, close required; volume/quote_volume when upstream provides them; times UTC."
    • changedOutput schema / properties / items / items / properties / quote_volume / description
      Previous value: -"Quote-currency volume when available."New value: +"Quote-currency volume when upstream provides it (optional)."
    • changedOutput schema / properties / items / items / properties / volume / description
      Previous value: -"Base asset or contract volume."New value: +"Base asset or contract volume when upstream provides it (optional; may be absent for some options candles)."
  4. Changed12 schema fields changed
    • addedInput schema / properties / limit / default
      Added value: +100
    • changedInput schema / properties / limit / description
      Previous value: -"Max candles; default 100, max 400. Over-limit rejected. Without range = latest N newest-first."New value: +"Max candles; omit for default 100; minimum 1, maximum 400. Over-limit rejected. Without range = latest N newest-first."
    • addedInput schema / properties / limit / maximum
      Added value: +400
    • addedInput schema / properties / limit / 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
    • changedInput schema / properties / timeframe / description
      Previous value: -"Candle interval: 1s|10s|1m|3m|5m|15m|30m|1h|2h|4h|6h|8h|12h|1d|3d|7d|30d|1w."New value: +"Candle interval. start_time/end_time are Unix seconds."
    • addedInput schema / properties / timeframe / enum
      Added value: +[
      +  "1s",
      +  "10s",
      +  "1m",
      +  "3m",
      +  "5m",
      +  "15m",
      +  "30m",
      +  "1h",
      +  "2h",
      +  "4h",
      +  "6h",
      +  "8h",
      +  "12h",
      +  "1d",
      +  "3d",
      +  "7d",
      +  "30d",
      +  "1w"
      +]
    • changedOutput schema / properties / items / items / additionalProperties
      Previous value: -trueNew value: +false
    • addedOutput schema / properties / items / items / properties
      Added value: +{
      +  "close": {
      +    "description": "Close price (quote).",
      +    "type": "string"
      +  },
      +  "high": {
      +    "description": "High price (quote).",
      +    "type": "string"
      +  },
      +  "is_candle_closed": {
      +    "description": "Whether the candle is closed (spot).",
      +    "type": "string"
      +  },
      +  "low": {
      +    "description": "Low price (quote).",
      +    "type": "string"
      +  },
      +  "open": {
      +    "description": "Open price (quote).",
      +    "type": "string"
      +  },
      +  "quote_volume": {
      +    "description": "Quote-currency volume when available.",
      +    "type": "string"
      +  },
      +  "t": {
      +    "description": "Candle open time as Unix seconds (string). Times are UTC.",
      +    "type": "string"
      +  },
      +  "t_utc": {
      +    "description": "RFC3339 UTC with explicit +00:00.",
      +    "type": "string"
      +  },
      +  "volume": {
      +    "description": "Base asset or contract volume.",
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / items / items / required
      Added value: +[
      +  "t",
      +  "open",
      +  "high",
      +  "low",
      +  "close"
      +]
  5. Changed9 schema fields changed
    • removedInput schema / properties / extra
      Removed value: -{
      -  "additionalProperties": true,
      -  "description": "Passthrough e.g. interval overrides.",
      -  "type": "object"
      -}
    • changedInput schema / properties / limit / description
      Previous value: -"Max candles; default 100, max 400; without range = latest N desc."New value: +"Max candles; default 100, max 400. Over-limit rejected. Without range = latest N newest-first."
    • changedInput schema / properties / start_time / description
      Previous value: -"Start Unix seconds; with end_time for range; omit = last limit candles desc."New value: +"Start Unix seconds; with end_time for range; omit with limit = latest N candles newest-first."
    • changedInput schema / properties / symbol / description
      Previous value: -"Pair or contract."New value: +"Pair or contract e.g. BTC_USDT."
    • changedInput schema / properties / timeframe / description
      Previous value: -"Candle interval e.g. 1s, 1m, 5m."New value: +"Candle interval: 1s|10s|1m|3m|5m|15m|30m|1h|2h|4h|6h|8h|12h|1d|3d|7d|30d|1w."
    • 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)."
    • addedOutput schema / properties / items / description
      Added value: +"Candles with t, open, high, low, close, volume, quote_volume; times UTC."
    • changedOutput schema / required
      Previous value: -[
      -  "symbol",
      -  "market_type",
      -  "timeframe",
      -  "cex_tool",
      -  "total",
      -  "count",
      -  "items",
      -  "duration_ms"
      -]New value: +[
      +  "symbol",
      +  "market_type",
      +  "timeframe",
      +  "total",
      +  "count",
      +  "items"
      +]
  6. 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"
      +]
  7. 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, idempotentHint, and destructiveHint, covering safety. The description adds valuable behavioral context beyond annotations: it states 'No account access, no order placement or fund transfers' and 'Not investment advice,' and describes error conditions (invalid timeframe/symbol returns error), range-query truncation flags, and conditional volume fields. This enriches the agent's understanding without contradicting annotations.

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 information-dense but somewhat long, covering many constraints in a single paragraph. It front-loads the core purpose and then details inputs, which is helpful, but it could be more scannable with bullet points. Each sentence contributes value, so it earns a 4 rather than a 3.

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?

Given the tool's complexity (7 params, output schema present), the description covers all essential aspects: required and optional inputs, constraints, return behavior, error handling, and safety disclaimers. It does not need to restate the output schema since that is provided separately, and it gives enough context for an agent to call the tool 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 coverage is 100%, so baseline is 3, but the description adds substantial meaning: it notes timeframe validation per market_type (delivery excludes 1s|3d), limit constraints and rejection, mutual exclusivity of limit and time range, range-return limits (up to 400) and truncated flags, settle for futures/delivery, and the conditional presence of volume/quote_volume. These details go far beyond the schema's parameter descriptions.

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's purpose: 'Read-only Gate candlesticks for a trading pair or contract.' It specifies the verb (get), the resource (candlesticks/kline), and distinguishes it from sibling tools like orderbook and recent trades by focusing on candle data. It also enumerates supported market types, making its scope explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by detailing inputs and behavior, but it does not explicitly mention when to prefer this tool over alternatives such as info_markettrend_get_kline, which also deals with kline data. There are no explicit exclusions or alternative routing guidance, leaving the agent to infer based on context.

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.