Reference: Batch Add
import { privateWsRequest } from 'ts-kraken'; privateWsRequest({ method: 'batch_add', params: { symbol: 'BTC/EUR', orders: [{ order_type: 'limit', side: 'buy', order_qty: 0.0002, limit_price: 50000 },{ order_type: 'limit', side: 'sell', order_qty: 0.0002, limit_price: 70000 }] } }).then(([{ order_id: order1 }, { order_id: order2 }]) => { console.log({ order1, order2 }); }).catch(error => { console.error({ error }); }); Copy
import { privateWsRequest } from 'ts-kraken'; privateWsRequest({ method: 'batch_add', params: { symbol: 'BTC/EUR', orders: [{ order_type: 'limit', side: 'buy', order_qty: 0.0002, limit_price: 50000 },{ order_type: 'limit', side: 'sell', order_qty: 0.0002, limit_price: 70000 }] } }).then(([{ order_id: order1 }, { order_id: order2 }]) => { console.log({ order1, order2 }); }).catch(error => { console.error({ error }); });
Reference: Batch Add
Example