Skip to main content
Glama
trustxai

amazing-binance-mcp

by trustxai

binance_get_klines

Read-onlyIdempotent

Fetch OHLCV candlestick data for a trading pair to analyze price history and technical indicators over a chosen interval and time window.

Instructions

Fetch OHLCV candlestick data for a symbol.

Calls GET /api/v3/klines (weight 2).

When to Use:

  • For price history / technical analysis over a chosen interval and window.

When NOT to Use:

  • For presentation-smoothed candles matching Binance's own chart UI — use binance_get_ui_klines instead.

  • For the single latest price — use binance_get_ticker_price.

Returns: Markdown: a table of up to 100 candles (open time, OHLC, volume, close time). JSON: the raw array-of-arrays Binance returns (up to limit), uncapped.

Pagination: Walk forward with start_time set to the previous page's last close time + 1ms; start_time/end_time are always interpreted in UTC even when time_zone is set.

Examples: params = {"symbol": "BTCUSDT", "interval": "1h", "limit": 200}

Error Handling: An unknown symbol raises Binance -1121 Invalid symbol; an invalid interval is rejected locally by the KlineInterval enum.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover readOnlyHint, openWorldHint, idempotentHint, and destructiveHint, so the safety profile is known. The description adds valuable context: API weight (2), pagination mechanics (walking forward with close time +1ms), UTC interpretation of time_zone, and error handling for invalid symbols/intervals. These go beyond annotations and materially aid correct invocation.

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 well-structured with clear headers (When to Use, When NOT to Use, Returns, Pagination, Examples, Error Handling) and front-loads the core purpose. It is slightly verbose but every section adds actionable information; nothing is wasted. A tight 4.

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 output schema exists, the description need not explain return values in depth, yet it does describe Markdown vs JSON formats. Combined with detailed pagination, error handling, and usage exclusions, the agent has everything needed to call correctly. No critical gaps.

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 reported at 0%, so the description must compensate. It explains start_time/end_time semantics (UTC even with time_zone) and pagination using close time, and provides a concrete example with limit. It does not explicitly describe limit bounds or response_format, but the example and return section partially cover them. This is strong compensation but not exhaustive.

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: 'Fetch OHLCV candlestick data for a symbol.' It clearly distinguishes from sibling tools by naming alternatives like binance_get_ui_klines and binance_get_ticker_price, so an agent can select correctly without inspecting other schemas.

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?

Explicit 'When to Use' and 'When NOT to Use' sections name the exact alternative tools and the conditions that route to them. This is textbook-level guidance that leaves no ambiguity about selection.

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

Deploy Server

Other Tools