Get Current Kline (Candle)
AI-generatedSummary
Fetches the current, still-open kline (candle) for a trading pair at a chosen interval from the Bitcoin API via GET /prices/klines/current.
Inputs
- Symbol (required) — Trading pair symbol, e.g. btcusdt (default btcusdt). Sent as the
symbolquery parameter. - Interval (required) — Candle length: 1m, 5m, 15m, 30m, 1h, 4h, 6h, 12h or 1d (default 1d). Sent as the
intervalquery parameter. - Request Options — Optional node settings: batching (items per batch, batch interval in ms), ignore SSL issues, HTTP proxy, and timeout in ms (default 10000).
Output shape
The JSON response from https://bitcoin-api.net/api/v1/prices/klines/current, returned as n8n output items (one request per input item).
The response fields aren't defined in the node source, so the exact candle structure depends on the API. Requires the bitcoinApiApi credential. The candle is still open, so its values may change until the interval closes.
Examples
Example 1: Monitor the current hourly BTC/USDT candle on a schedule.
Symbol: btcusdt, Interval: 1h, triggered by a Schedule node.
Example 2: Check the live daily candle for another pair before sending an alert.
Symbol: ethusdt, Interval: 1d, followed by an IF node on the returned values.