Reference: Trades
import { publicWsSubscription } from 'ts-kraken'; publicWsSubscription({ channel: 'trade', params: { symbol: ['BTC/USD'] } }) .subscribe(({ data: [{ side, symbol, price, timestamp }] }) => { console.log({ side, symbol, price, timestamp }); }); Copy
import { publicWsSubscription } from 'ts-kraken'; publicWsSubscription({ channel: 'trade', params: { symbol: ['BTC/USD'] } }) .subscribe(({ data: [{ side, symbol, price, timestamp }] }) => { console.log({ side, symbol, price, timestamp }); });
Reference: Trades
Example