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

Use json struct tag for SymbolsOrderBookTicker unmarshaling #12

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

volvinbur1
Copy link
Member

Closes #11

@volvinbur1 volvinbur1 requested a review from ahl2light October 17, 2022 00:20
@volvinbur1 volvinbur1 self-assigned this Oct 17, 2022
defer bncresponse.CloseBody(response)

return mktdata.GetSymbolsBookTicker(response)
//TODO: added error code parsing from the body
if response.StatusCode%100 != 2 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

condition isn't working, even if response status code = 200, I receive an error
if response.StatusCode/100 != 2 it is right solution

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Condition is wrong.

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.

[Bugfix] Use sruct tag for json unmarshaling
2 participants