Skip to main content
Glama

Token OHLCV candles

get_token_ohlcv
Read-only

Open/high/low/close/volume candles for one Solana token, for technical analysis (RSI, moving averages, returns). Series is newest-first. Prices are USD. Candle size: interval (1m, 5m, 15m, 1h, 4h, 1d; wins over timeframe / aggregate; default 15m). An unsupported size is rejected; the response echoes interval and candle_seconds. t is Unix MILLISECONDS; time arguments take seconds or milliseconds. 🔴 NEWEST-FIRST, unlike TradingView: c[0] is the LATEST close and c[-1] the OLDEST, so a return is (c[0] - c[-1]) / c[-1] (the other way round flips the sign; order says so). Every candle is CLOSED: the forming one is dropped unless include_in_progress_candle is true (then it is index 0). 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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "token_address": "<token_address>"
    },
    "name": "get_token_ohlcv"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoHow many candles to return.
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_addressYesSolana token mint address (base58). Get it from search_tokens or a leaderboard row.
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. Changed10 schema fields changed
    • removedInput schema / properties / aggregate / title
      Removed value: -"Aggregate"
    • removedInput schema / properties / before_timestamp / title
      Removed value: -"Before Timestamp"
    • removedInput schema / properties / include_in_progress_candle / title
      Removed value: -"Include In Progress Candle"
    • removedInput schema / properties / interval / title
      Removed value: -"Interval"
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • removedInput schema / properties / time_from / title
      Removed value: -"Time From"
    • removedInput schema / properties / time_to / title
      Removed value: -"Time To"
    • removedInput schema / properties / timeframe / title
      Removed value: -"Timeframe"
    • removedInput schema / properties / token_address / title
      Removed value: -"Token Address"
    • removedInput schema / title
      Removed value: -"get_token_ohlcvArguments"
  2. Changed2 schema fields changed
    • removedInput schema / properties / network
      Removed value: -{
      -  "const": "solana",
      -  "default": "solana",
      -  "title": "Network",
      -  "type": "string"
      -}
    • addedInput schema / properties / token_address / description
      Added value: +"Solana token mint address (base58). Get it from search_tokens or a leaderboard row."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, non-destructive, openWorld), and the description adds substantial behavior beyond them: newest-first ordering with the exact return formula, closed-candle semantics, the include_in_progress_candle exception at index 0, rejection of unsupported sizes, and the echoed interval/candle_seconds. The newest-first warning is exactly the kind of trap that would silently flip a computed sign.

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?

Dense and front-loaded: the ordering warning and the sibling comparison come early, and every sentence carries operational content. It is on the long side and repeats the interval enum values already in the schema, which is the only real waste.

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 return values need not be explained, and the description instead covers the things the schema cannot: timestamp units in the response, array ordering, and which candle is dropped. For a 9-parameter analytical tool this is complete enough to call correctly on the first attempt.

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 100%, so the baseline is 3; the description earns above that by adding precedence semantics ('interval wins over timeframe/aggregate'), the seconds-or-milliseconds tolerance for time arguments, and the paging pattern of feeding a prior `t` back into before_timestamp. It largely restates the interval enum list, which the schema already carries, keeping it from a 5.

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?

States a specific verb and resource ('Open/high/low/close/volume candles for one Solana token') and immediately names the sibling it is not, get_token_chart, with the distinction spelled out (ready-to-read price line vs raw per-candle numbers). An agent can route between the two without opening either schema.

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?

Gives an explicit selection rule: 'Prefer the chart unless you need per-candle numbers,' plus the intended use case (RSI, moving averages, returns). It also states precedence among interval/timeframe/aggregate and the default of 15m, so the agent knows how to configure rather than guess.

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