get_candles
Retrieve historical candlestick data for any OANDA instrument, with options to customize granularity, time range, and price type.
Instructions
Get historical candlestick data for an instrument.
Args: instrument: OANDA instrument name, e.g. "USD_JPY". granularity: Candle size: S5,S10,S15,S30,M1,M2,M4,M5,M10,M15,M30, H1,H2,H3,H4,H6,H8,H12,D,W,M. Default "H1". count: Number of candles (max 5000). Ignored when both from_time and to_time are given. Default 100. price: "M" (mid), "B" (bid), "A" (ask), or combinations like "MBA". from_time: RFC3339 start time, e.g. "2026-07-01T00:00:00Z" (optional). to_time: RFC3339 end time (optional).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| price | No | M | |
| to_time | No | ||
| from_time | No | ||
| instrument | Yes | ||
| granularity | No | H1 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |