Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect trades order when pagination: true #183

Open
tradingproject19 opened this issue Oct 10, 2023 · 4 comments
Open

Incorrect trades order when pagination: true #183

tradingproject19 opened this issue Oct 10, 2023 · 4 comments
Assignees

Comments

@tradingproject19
Copy link

Hello,

I am facing an ordering issue.

const globalFetchOptions = {
pagination: true,
// trace: true,
};
const rest = restClient(
"APIKEY",
"https://api.polygon.io",
globalFetchOptions
);

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.

@justinpolygon justinpolygon self-assigned this Oct 10, 2023
@justinpolygon
Copy link
Contributor

I'll check this out thanks for reporting.

@tradingproject19
Copy link
Author

Thank you so much.

@tradingproject19
Copy link
Author

@justinpolygon is there an update on this?

@justinpolygon
Copy link
Contributor

Hey, @tradingproject19 -- I'm still checking with out and will reply later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants