Skip to main content
Glama

True Markets Market Data

get_candles

Read-onlyIdempotent

Get OHLC candles for a symbol. Returns open/high/low/close buckets for an asset over a configurable lookback window, sampled at a configurable resolution. Use for candlestick charts and volatility measures that need the intra-bucket range rather than a single close.

Only sources that store individual ticks can produce OHLC. Requesting candles for an asset priced from a derived or snapshot source returns 400.

See the Time Window & Resolution section for the format of window and resolution.

Input Schema

NameRequiredDescriptionDefault
as_ofNoEnds the window at this instant instead of now, so a past period can be read. RFC3339, and not the zero time. A future instant bounds a window that is still filling. Absent reads live data.
symbolNoAsset symbol to fetch candles for (e.g. `SOL`, `BTC`).
windowNoLookback period (e.g. `1h`, `4h`, `1d`, `7d`, `1M`).
asset_idNoBackend asset ID. Mutually exclusive with `symbol`: exactly one of the two is required, and naming both is a 400.
resolutionNoCandle size (e.g. `1m`, `5m`, `1h`).
asset_classNoAsset class to resolve the symbol in. Defaults to `spot` (one of: spot, perp)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already establish that this is a safe, idempotent read, so the description's main added value is the failure mode: requesting candles for a derived or snapshot source returns 400. That is real behavioral context an agent would not get from the annotations. It does not say anything about result limits or how many candles come back.

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 front-loaded with purpose and return shape, then adds constraints and a doc pointer in short paragraphs. The external documentation references are the only mild bloat; nothing else is wasted.

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?

There is no output schema, but the description explains the return shape (OHLC buckets) and the main failure condition. The only gap is the absence of any detail about result size or pagination, which an agent might need before calling.

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 coverage is 100%, and each parameter already has a description, so the schema does most of the work. The description defers the `window` and `resolution` formats to an external doc section rather than explaining them inline. This sits at the baseline for a fully documented schema.

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 ('Get OHLC candles for a symbol') and spells out the return shape: open/high/low/close buckets sampled at a resolution, plus an asset-class caveat. It distinguishes the tool from single-close siblings by saying it is for cases that 'need the intra-bucket range rather than a single close.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives concrete use cases (candlestick charts, volatility measures) and an explicit precondition: sources that are derived or snapshot-based return 400, so only tick-storing assets qualify. It does not name a specific sibling tool as an alternative, which keeps it below a 5.

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