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 on empty api response #365

Merged
merged 3 commits into from
Apr 21, 2023

Conversation

sebastienverreault
Copy link
Contributor

Empty successful get-position API response is an acceptable case of a position = 0 and not an error.
So validation of the success (code=0) is done first and returns an error if not.
Then on valid response,
if no data is present, position is 0
if data is present, then data is validated and can be position is 0 or position is some.

@bodymindarts bodymindarts merged commit b4ac27f into main Apr 21, 2023
@bodymindarts bodymindarts deleted the fix-okex-get-position-error-on-empty-pos branch April 21, 2023 07:36
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