Returns a nice array of latest closed orders. Helper method for: getClosedOrders
import { getClosedOrders } from 'ts-kraken'; // Fetch latest closed orders and logs them getClosedOrders() .then(lastClosedOrdersArr => { const closedOrders = lastClosedOrdersArr .map(({ orderid, descr: { order } }) => ({ orderid, order })); console.table(closedOrders); }); Copy
import { getClosedOrders } from 'ts-kraken'; // Fetch latest closed orders and logs them getClosedOrders() .then(lastClosedOrdersArr => { const closedOrders = lastClosedOrdersArr .map(({ orderid, descr: { order } }) => ({ orderid, order })); console.table(closedOrders); });
Returns a nice array of latest closed orders. Helper method for: getClosedOrders
Example