Reference: Get OHLC Data
import { publicRestRequest } from 'ts-kraken'; publicRestRequest({ url: 'OHLC', params: { pair: 'BTCUSD' } }) .then(rawData => { const [pairKey] = Object.keys(rawData); const [, open, high, low, close] = rawData[pairKey].pop(); console.log({ open, high, low, close }); }); Copy
import { publicRestRequest } from 'ts-kraken'; publicRestRequest({ url: 'OHLC', params: { pair: 'BTCUSD' } }) .then(rawData => { const [pairKey] = Object.keys(rawData); const [, open, high, low, close] = rawData[pairKey].pop(); console.log({ open, high, low, close }); });
Reference: Get OHLC Data
Example