client-js
client-js copied to clipboard
Incorrect trades order when pagination: true
Hello,
I am facing an ordering issue.
const globalFetchOptions = {
pagination: true,
// trace: true,
};
const rest = restClient(
"APIKEY",
"https://api.polygon.io",
client.stocks .trades(ticker, { "timestamp.gte": String(from * 1000 * 1000), "timestamp.lte": String(to * 1000 * 1000), limit: limit, sort: "timestamp", order: "asc", }) .then((data) => { console.log(data.results[0], data.results[data.results.length - 1], 'api results outof order'); });
When I set pagination to true in restClient, then the final output is not in correct order.
I'll check this out thanks for reporting.
Thank you so much.
@justinpolygon is there an update on this?
Hey, @tradingproject19 -- I'm still checking with out and will reply later today.