Function findClosedOrder

Bonus method! - Returns the first closed order (single object) to satisfy the filter. Helper method for: Get Closed Orders

   import { findClosedOrder } from 'ts-kraken';

findClosedOrder({
restData: { extra: { numOrders: 50 } },
orderFilter: ({ userref }) => (userref?.toString() ?? '').startsWith('100033')
}).then(lastCanceledOrder => {
console.log({ lastCanceledOrder });
});

This method might run extremely slow for accounts with many past orders