Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

getMarketKline

Read-only

Retrieve OHLCV candlestick data for spot, linear, and inverse contracts to build charts or perform technical analysis. Specify symbol, interval, start, and end for targeted historical data.

Instructions

Query historical klines (OHLCV candlestick data) including open, high, low, close, volume, and turnover.

Use this endpoint when you need to:

  • Build price charts with open/high/low/close/volume/turnover data

  • Perform technical analysis on historical market prices

  • Retrieve data for a specific time range using start and end parameters

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

Each kline entry is a 7-element array: [startTime, open, high, low, close, volume, turnover]. Data is returned in reverse chronological order (most recent first). Returns up to 1000 records per request.

Do not use this endpoint for mark price candles — use getMarkPriceKline instead. Do not use this endpoint for index price candles — use getIndexPriceKline instead.

Notes:

  • Data is returned in reverse chronological order (most recent first)

  • No authentication required

Agent hint: Use this endpoint to retrieve OHLCV candlestick data for charting or technical analysis. Provide start and end timestamps (milliseconds) to query a specific time range. For mark price candles use getMarkPriceKline; for index price candles use getIndexPriceKline. For premium index (funding basis) candles use getPremiumIndexPriceKline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
limitNo
startNo
symbolYes
categoryNolinear
intervalYes

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 already declare readOnlyHint and openWorldHint, and the description adds valuable non-obvious behaviors: no authentication required, the exact 7-element array format, reverse chronological ordering, and a 1000-record limit. These details go well beyond the structured annotations and inform agent expectations about response format and limitations.

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 headers and bullets, but it contains redundancy: 'Data is returned in reverse chronological order (most recent first)' appears twice, and the 'Agent hint' largely repeats the earlier usage guidance and sibling exclusions. It could be tightened without losing information.

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 tool has 6 parameters and no output schema, the description covers the critical context: return format, ordering, limit, supported products, authentication, and alternatives. It stops short of fully explaining all parameter units and exact category-to-product mappings, but the enum values in the schema and the supported products list cover most practical needs.

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 must compensate. It does explain that start and end are timestamps in milliseconds and mentions the 1000-record limit, which aligns with the limit parameter. It also maps supported products to the category concept. However, it does not explain interval value units (e.g., '1' meaning 1 minute) or the meaning of turnover, leaving some inference to the agent.

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 opens with a specific verb and resource: 'Query historical klines (OHLCV candlestick data)' and lists the data fields included. It explicitly distinguishes itself from sibling tools by stating 'Do not use this endpoint for mark price candles — use getMarkPriceKline instead' and similarly for index price candles, leaving no ambiguity about its purpose.

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?

The description provides explicit 'Use this endpoint when you need to' scenarios: building price charts, technical analysis, and retrieving specific time ranges. It also gives clear when-not-to-use guidance with named alternatives for mark, index, and premium index klines, both in the main body and the agent hint.

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