Reference: Get Order Book
import { publicRestRequest } from 'ts-kraken'; publicRestRequest({ url: 'Depth', params: { pair: 'BTCUSD'}}) .then(rawData => { const [pairKey] = Object.keys(rawData); const { asks, bids } = rawData[pairKey]; console.log({ asks, bids }) }); Copy
import { publicRestRequest } from 'ts-kraken'; publicRestRequest({ url: 'Depth', params: { pair: 'BTCUSD'}}) .then(rawData => { const [pairKey] = Object.keys(rawData); const { asks, bids } = rawData[pairKey]; console.log({ asks, bids }) });
Reference: Get Order Book
Example