Reference: Cancel on Disconnect
import { privateWsRequest } from 'ts-kraken'; privateWsRequest({ method: 'cancel_all_orders_after', params: { timeout: 5 } }).then(({ currentTime, triggerTime, warnings }) => { console.log({ currentTime, triggerTime, warnings }); }).catch(error => { console.error({ error }); }); Copy
import { privateWsRequest } from 'ts-kraken'; privateWsRequest({ method: 'cancel_all_orders_after', params: { timeout: 5 } }).then(({ currentTime, triggerTime, warnings }) => { console.log({ currentTime, triggerTime, warnings }); }).catch(error => { console.error({ error }); });
Reference: Cancel on Disconnect
Example