Reference: Candles (OHLC)
import { publicWsSubscription } from 'ts-kraken'; publicWsSubscription({ channel: 'ohlc', params: { symbol: ['BTC/USD'] , interval: 1, } }).subscribe(({ data: [{ symbol, open, high, low, close }] }) => { console.log({ symbol, open, high, low, close }); }); Copy
import { publicWsSubscription } from 'ts-kraken'; publicWsSubscription({ channel: 'ohlc', params: { symbol: ['BTC/USD'] , interval: 1, } }).subscribe(({ data: [{ symbol, open, high, low, close }] }) => { console.log({ symbol, open, high, low, close }); });
Reference: Candles (OHLC)
Example