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: okex get position error when zero position #361

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

sebastienverreault
Copy link
Contributor

Last change to get_position added a triple check on 'pos', 'notional' and 'last' fields of the okex response,
but when the position is close, only 'pos' gets populated with 0,
so the method returned a 'NonParsablePositionData' error.

Adding a condition to handle the zero position case.

@bodymindarts bodymindarts merged commit 6cb4b5e into main Apr 20, 2023
@bodymindarts bodymindarts deleted the fix-okex-get-position-error-on-zero-pos branch April 20, 2023 08:05
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.

2 participants