Skip to main content
Glama

Token candles

get_token_ohlcv
Read-only

Raw OHLCV candles for one token — open, high, low, close and volume per interval — for calculation, technical analysis, or computing a return over a specific window. Prices are always USD (the response says so in denomination). Pick the candle size with interval (1m, 5m, 15m, 1h, 4h, 1d); it wins over timeframe and aggregate. With none of the three the default is 15-minute candles; timeframe alone means 1 unit (hour = 1h). An unsupported size is rejected, never silently swapped, and the response echoes the interval and candle_seconds actually served. t is Unix MILLISECONDS. All three time arguments accept SECONDS or MILLISECONDS, so a t value from a previous response can be fed straight back.

🔴 READ BEFORE COMPUTING A RETURN — the s/t/o/h/l/c/v shape looks like TradingView's, and it differs from it in two ways that will silently corrupt the answer:

  • THE SERIES IS NEWEST-FIRST (descending t), not oldest-first. c[0] is the LATEST close and c[-1] is the OLDEST. A return over the window is (c[0] - c[-1]) / c[-1]; doing it the other way round returns the right magnitude with the WRONG SIGN. The response states this in order.

  • EVERY CANDLE RETURNED IS CLOSED. The current, still-forming interval is removed by default, because its close is a mid-bucket tick rather than a close and including it makes 'the return over the last N candles' wrong. Set include_in_progress_candle only if you specifically want the live, unfinished bucket — it will then be at index 0 and includes_in_progress_candle will be true.

Choosing between the two price tools: get_token_chart returns a ready-to-read price line for describing a trend; get_token_ohlcv returns raw open/high/low/close/volume candles for calculation and technical analysis. Prefer the chart unless you need per-candle numbers. This is public market data about the whole market — it is NOT about the user's own wallet or holdings. Tools whose names start with get_my_ are the ones that return the user's own data.

Input Schema

NameRequiredDescriptionDefault
limitNoHow many candles to return.
networkNosolana
time_toNoWindow end, Unix timestamp in SECONDS or MILLISECONDS — either is accepted. Requires `time_from` as well.
intervalNoCandle size. Wins over `timeframe`/`aggregate`. Omit all three for 15m.
aggregateNoHow many `timeframe` units per candle. 1 when only `timeframe` is given.
time_fromNoWindow start, Unix timestamp in SECONDS or MILLISECONDS — either is accepted. Requires `time_to` as well.
timeframeNoCandle unit. Candle size is `aggregate` × this (`aggregate` defaults to 1 when only this is given). Only the sizes listed under `interval` are served; anything else is rejected.
token_addressYes
before_timestampNoReturn candles before this Unix timestamp, in seconds or milliseconds. Use to page further back in history — a `t` value from a previous response can be passed straight back.
include_in_progress_candleNoTrue keeps the current, still-forming candle at index 0. Leave false for any calculation — its close is not a close.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

The annotations already cover safety, but the description adds critical behavioral details beyond them: newest-first series ordering, closed-candle default, the effect of including the in-progress candle, unsupported interval rejection, and echoed response fields. These are exactly the traits likely to cause silent calculation errors if omitted.

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 long but well structured, with the purpose first, interval behavior next, and a clearly marked warning about return-calculation pitfalls. Some interval and timestamp details repeat schema text, but the length is mostly justified by the complexity and risk of silent misuse.

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?

An output schema exists, so the description does not need to enumerate return fields, but it still adds the output orientation an agent needs for correct calculation: descending time order, closed candles by default, and USD denomination. It also clarifies the tool's public-market scope relative to wallet-scoped siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is high at 80%, and much of the description's parameter guidance is already present in the schema, especially for `interval`, `timeframe`, `aggregate`, `time_from`, `time_to`, and `before_timestamp`. The description reinforces precedence and seconds/milliseconds handling, but adds limited meaning beyond the structured 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 states a specific verb and resource: raw OHLCV candles for one token, with open/high/low/close/volume per interval. It explicitly distinguishes this tool from its closest sibling, `get_token_chart`, and clarifies that it is public market data rather than `get_my_` user data.

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?

It gives explicit selection guidance between `get_token_chart` and `get_token_ohlcv`, including when to prefer the chart and when raw candles are needed. It also specifies interval precedence, defaults, and when to use `include_in_progress_candle`, leaving little to inference.

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.

Resources