get_candles
Retrieve OHLCV candlestick data for a trading pair to analyze price trends, create charts, compute indicators, or backtest strategies.
Instructions
Return OHLCV candlestick data for a trading pair. Each candle contains timestamp (ms), open, high, low, close, and base-currency volume. Public endpoint, no auth required. Use for charts, indicators, or backtesting; not for live order-book state (use get_order_book) or trade-by-trade flow (use list_trades).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| duration | Yes | Candle duration in seconds. Common values: 60 (1m), 300 (5m), 900 (15m), 1800 (30m), 3600 (1h), 10800 (3h), 14400 (4h), 28800 (8h), 86400 (1d), 259200 (3d), 604800 (1w). The Luno API only accepts a fixed set of durations; passing an unsupported value will return an error. | |
| pair | Yes | Trading pair using Luno's symbol convention (e.g. XBTZAR for BTC/ZAR, ETHZAR, XBTEUR). BTC is automatically rewritten to XBT. | |
| since | No | Start of the window as Unix epoch milliseconds (UTC). Defaults to 24 hours ago when omitted or 0. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| candles | Yes | ||
| duration | Yes | ||
| pair | Yes |