Skip to main content
Glama

Get OHLC Data

get_ohlc
Read-only

Get raw OHLC (Open, High, Low, Close) candlestick data as numerical arrays for a trading symbol and timeframe. Returns exact price values — use it for anything that needs precise numbers: exact support/resistance levels, indicator calculations, swing highs/lows, and entry, stop loss and take profit placement. For visual reading (structure, trend, chart patterns, liquidity sweeps) look at get_chart first: patterns are easier to see in the image, then confirm the exact levels here. Data comes from the TraderWAI market feed, updated every minute: it is the same for every user and can differ slightly from the prices of the user's broker. For the exact current price at a broker (bid/ask), use get_quote.

Input Schema

NameRequiredDescriptionDefault
toNoEnd of time range. ISO 8601 (e.g. "2026-04-19T00:00:00Z") or unix seconds. Only candles at or before this time are included.
fromNoStart of time range. ISO 8601 (e.g. "2026-04-01T00:00:00Z") or unix seconds. Only candles at or after this time are included. How far back you can go depends on the plan (Free: last 14 days, Plus: 6 months, Trader: 1 year, Max: all history, 2 years); the latest candles (without from/to) are available on every plan.
limitNoNumber of candles to return (default 100, max 500). Returns the most recent candles within the time range.
symbolYesTrading symbol (e.g. EUR_USD, XAU_USD, BTC_USD, NAS100_USD).
timeframeYesCandle timeframe: M1, M5, M15, M30, H1, H2, H4, H6, H8, H12, or D.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / from / description
      Previous value: -"Start of time range. ISO 8601 (e.g. \"2026-04-01T00:00:00Z\") or unix seconds. Only candles at or after this time are included. How far back you can go depends on the plan (Free: last 7 days, Trader: 90 days, Max: all history); the latest candles (without from/to) are available on every plan."New value: +"Start of time range. ISO 8601 (e.g. \"2026-04-01T00:00:00Z\") or unix seconds. Only candles at or after this time are included. How far back you can go depends on the plan (Free: last 14 days, Plus: 6 months, Trader: 1 year, Max: all history, 2 years); the latest candles (without from/to) are available on every plan."
  2. Changed2 schema fields changed
    • changedInput schema / properties / from / description
      Previous value: -"Start of time range. ISO 8601 (e.g. \"2026-04-01T00:00:00Z\") or unix seconds. Only candles at or after this time are included. How far back you can go depends on the plan (Free: last 7 days, Trader: 90 days, Max: all history); the latest candles without from/to are never limited."New value: +"Start of time range. ISO 8601 (e.g. \"2026-04-01T00:00:00Z\") or unix seconds. Only candles at or after this time are included. How far back you can go depends on the plan (Free: last 7 days, Trader: 90 days, Max: all history); the latest candles (without from/to) are available on every plan."
    • changedInput schema / properties / symbol / description
      Previous value: -"Trading symbol (e.g. EUR_USD, XAU_USD, BTC_USD, NAS100_USD). Use list_symbols to see all available."New value: +"Trading symbol (e.g. EUR_USD, XAU_USD, BTC_USD, NAS100_USD)."
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the readOnly/destructive annotations, it discloses the data source (TraderWAI market feed), the one-minute refresh cadence, that data is identical for all users, and that it may differ from the user's broker prices — real operational context that prevents misuse. It stops short of describing the returned array structure or ordering, which matters since there is no output schema.

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?

Front-loaded with the core definition, then routing guidance, then data provenance — a logical order with no filler. The use-case sentence is a slightly long list and 'Returns exact price values' overlaps with 'use it for anything that needs precise numbers', costing a little tightness.

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?

For a parameterless-in-prose read tool with full schema coverage and no output schema, the description covers purpose, alternatives, provenance, freshness, and the broker-vs-feed caveat. The only residual gap, exact array shape, is minor and partly implied by 'numerical arrays'.

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 100%, so symbol, timeframe, from, to and limit are already fully documented, including plan-based history limits and the 500-candle cap. The description adds no parameter-level detail beyond naming symbol and timeframe, so the baseline 3 applies.

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 (raw OHLC candlestick data as numerical arrays) plus the scope (symbol + timeframe), and explicitly separates itself from get_chart and get_quote. An agent can identify the tool and its niche from the description alone.

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 use-case rule — anything needing precise numbers (levels, indicator math, swing points, stop/target placement) — and names the two alternatives with their conditions: get_chart for visual/pattern reading, get_quote for broker bid/ask. Also documents plan-dependent history limits in the schema, so an agent knows when it may fail.

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