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

fix(coinex): handleErrors should also check for "OK" #22479

Merged
merged 2 commits into from
May 13, 2024

Conversation

roelvv
Copy link
Contributor

@roelvv roelvv commented May 13, 2024

The handleErrors method checks for "Ok", but some endpoints return "OK" instead. This causes an ExchangeError to be thrown for API responses that use "OK" but simply have no data.

An example is the pending positions endpoint (https://api.coinex.com/perpetual/v1/position/pending) while there are no open pending positions.
Also in their docs it isn't consistent if you look at the examples:

And here is a live example for the V2 of it returning "OK": https://api.coinex.com/v2/maintain/info

@carlosmiei carlosmiei self-assigned this May 13, 2024
@carlosmiei
Copy link
Collaborator

Hello @roelvv, thanks for fixing it, we will take a look and merge it shortly.

@carlosmiei carlosmiei merged commit d7ecf84 into ccxt:master May 13, 2024
1 of 2 checks passed
@roelvv roelvv deleted the fix-coinex-handle-errors-OK branch May 13, 2024 13:44
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

Successfully merging this pull request may close these issues.

None yet

2 participants