Reference: Book (Level 2)

   import { publicWsSubscription } from 'ts-kraken';

publicWsSubscription({ channel: 'book', params: {
symbol: ['BTC/USD'] ,
depth: 10,

} }).subscribe(({ data: [{ symbol, bids, asks }] }) => {
console.log({ symbol, lastBid: bids[0]?.price, lastAsk: asks[0]?.price });
});

Index

Type Aliases