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

Invalid Signature when getting all orders of a certain product #471

Closed
abir-taheer opened this issue Apr 21, 2021 · 1 comment
Closed

Invalid Signature when getting all orders of a certain product #471

abir-taheer opened this issue Apr 21, 2021 · 1 comment

Comments

@abir-taheer
Copy link

In my code I'm trying to get all of my orders for a certain crypto currency and when I do, it throws a 401 error with the message invalid signature.

For more information, this is my code:

The product id I used was LTC-USD but it doesn't work with any I've tried.

const orders = await client.rest.order.getOrders({
  status: ["all"],
  product_id: productId,
});

Surprisingly, it works if I omit the product_id parameter.

const orders = await client.rest.order.getOrders({
  status: ["all"],
});

That works and returns a paginated result with all my orders.

I don't think I'm doing anything wrong?

@bennycode
Copy link
Owner

@abir-taheer thanks for your report! I was able to reproduce the problem and realized that filtering by status and product_id are mutually exclusive. I created a fix for it to express this in TypeScript: #475

I also extended the request timeout because it can happen that requests easily take up to 25 seconds when all order types are requested.

The fix got released with v3.0.3. 🤙

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