Walk a cursor-paged endpoint as an async iterable, yielding one page of items at a time.
for await (const page of paginate((cursor) => client.paged(() => client.mt4.getUserRecordsRequest('my-tp', { cursor })))) { process(page);} Copy
for await (const page of paginate((cursor) => client.paged(() => client.mt4.getUserRecordsRequest('my-tp', { cursor })))) { process(page);}
Walk a cursor-paged endpoint as an async iterable, yielding one page of items at a time.