Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

getMarketKline

Retrieve historical OHLCV candlestick data including open, high, low, close, volume, and turnover for spot and derivatives markets. Supports time range queries with start and end timestamps.

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
categoryNolinear
symbolYes
intervalYes
startNo
endNo
limitNo
Behavior5/5

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

With no annotations, description fully discloses behavioral traits: data returned in reverse chronological order, up to 1000 records per request, no authentication required, and the 7-element array format. Provides comprehensive transparency beyond what annotations would typically convey.

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?

Well-structured with sections and bullet points, but slightly redundant (reverse chronological mentioned twice). Still concise for the information provided, with front-loaded key purpose.

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 6 parameters, no output schema, and no annotations, the description covers purpose, usage, data format, limitations, and alternatives thoroughly. It provides enough context for an agent to invoke the tool correctly without additional information.

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 coverage is 0%, but description adds context: start/end timestamps in milliseconds, supported categories (spot, linear, inverse), and limit max 1000. While not detailing every parameter, it compensates with useful semantics that the schema lacks, though slightly verbose.

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 explicitly states it queries historical klines (OHLCV candlestick data) and lists the fields. It distinguishes from sibling tools by stating 'Do not use this endpoint for mark price candles — use getMarkPriceKline instead' and similarly for index price, clarifying its specific resource and scope.

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 when-to-use scenarios: building price charts, technical analysis, data for time range. Also gives clear when-not-to-use with named alternative tools (getMarkPriceKline, getIndexPriceKline, getPremiumIndexPriceKline), offering strong guidance for tool selection.

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