Get OHLC Data
get_ohlcGet 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
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End of time range. ISO 8601 (e.g. "2026-04-19T00:00:00Z") or unix seconds. Only candles at or before this time are included. | |
| from | No | 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. | |
| limit | No | Number of candles to return (default 100, max 500). Returns the most recent candles within the time range. | |
| symbol | Yes | Trading symbol (e.g. EUR_USD, XAU_USD, BTC_USD, NAS100_USD). | |
| timeframe | Yes | Candle timeframe: M1, M5, M15, M30, H1, H2, H4, H6, H8, H12, or D. |