Get Klines (Candles)
AI-generatedSummary
Fetches historical kline (OHLC candlestick) data for a trading pair from the Bitcoin API via GET /prices/klines, at a chosen interval and optional time range.
Inputs
- symbol (required) — Trading pair symbol, e.g. btcusdt (default btcusdt). Sent as the
symbolquery parameter. - interval (required) — Candle size: 1m, 5m, 15m, 30m, 1h, 4h, 6h, 12h or 1d (default 1d).
- limit — Number of candles to request (default 100). Sent as
limit. - from — Start date/time. Converted to an ISO 8601 string and sent as
from; omitted if empty. - to — End date/time. Converted to an ISO 8601 string and sent as
to; omitted if empty. - requestOptions — Node settings for batching (items per batch, interval in ms), ignoring SSL certificate issues, HTTP proxy, and request timeout (default 10000 ms).
Output shape
The JSON response from the Bitcoin API's klines endpoint, returned as n8n output items for each input item.
The source defines no custom response handling or post-processing, so the exact fields and structure of each candle depend on the API. Requires the bitcoinApiApi credential. Requests go to https://bitcoin-api.net/api/v1.
Examples
Example 1: Pull the last 100 daily BTC/USDT candles for charting or analysis.
Symbol: btcusdt, Interval: 1d, Limit: 100, leave From/To empty.
Example 2: Fetch hourly candles for a specific day to compute intraday volatility.
Symbol: btcusdt, Interval: 1h, From: 2026-09-01T00:00, To: 2026-09-02T00:00, Limit: 24.