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

update WsUserDataEvent struct #542

Merged
merged 1 commit into from
Mar 10, 2024
Merged

update WsUserDataEvent struct #542

merged 1 commit into from
Mar 10, 2024

Conversation

XanderShum
Copy link
Contributor

Update the WsUserDataEvent struct according to the latest version of Binance documentation and solve the current case sensitivity problem.

This update has to make a few changes that break compatibility. Currently, only the e and E fields are common to all events. There is a problem that fields with the same name have different meanings and types in different events.

For example, the field "u" is the last update timestamp of the account in the outboundAccountPosition event, but it is the Trade Group Id in the executionReport event.
Field "a" represents the asset in the outboundAccountPosition and balanceUpdate events and is of type string, but represents the Allocation ID in the executionReport event and is of type int.

In view of this, I have moved the fields "T" and "u" out of the shared fields to avoid possible bugs in the future.

@XanderShum
Copy link
Contributor Author

Hi, @adshao Please review this change.

@adshao
Copy link
Owner

adshao commented Mar 2, 2024

Hi @XanderShum , sorry for the late review. Could you please add more unit tests for the code changes?

@XanderShum
Copy link
Contributor Author

Hi, @adshao I have updated the unit tests, please review this change.

@adshao adshao merged commit b962076 into adshao:master Mar 10, 2024
1 check passed
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