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

Binance: Add order side #1782

Merged
merged 3 commits into from
Jan 23, 2025

Conversation

Beadko
Copy link
Contributor

@Beadko Beadko commented Jan 20, 2025

PR Description

Currently, the Binance side is marked as unknown. The raw data includes the isBuyerMaker: bool flag, which indicates the initiating side. Based on that, add a side.
Fixes # (issue)

Type of change

Please delete options that are not relevant and add an x in [] as item is complete.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and
also consider improving test coverage whilst working on a certain feature or package.

  • go test ./... -race
  • golangci-lint run
  • TestGetRecentTrades
  • TestGetMostRecentTrades
  • TestWsTradeUpdate

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation and regenerated documentation via the documentation tool
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally and on Github Actions with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link
Collaborator

@shazbert shazbert left a comment

Choose a reason for hiding this comment

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

Thanks for opening this PR @Beadko and welcome back 🚀. Just one nit.

exchanges/binance/binance_websocket.go Outdated Show resolved Hide resolved
@Beadko Beadko requested a review from shazbert January 21, 2025 06:22
Copy link
Collaborator

@shazbert shazbert left a comment

Choose a reason for hiding this comment

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

Thanks Bea, minor things left over then this looks good to go.

exchanges/binance/binance_websocket.go Outdated Show resolved Hide resolved
exchanges/binance/binance_wrapper.go Outdated Show resolved Hide resolved
exchanges/binance/binance_websocket.go Show resolved Hide resolved
@Beadko
Copy link
Contributor Author

Beadko commented Jan 22, 2025

codespell seems to be erroring in the code that is not related to the PR

@Beadko Beadko requested a review from shazbert January 22, 2025 10:37
Copy link
Collaborator

@shazbert shazbert left a comment

Choose a reason for hiding this comment

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

tested ACK. Thanks Bea!

@shazbert shazbert requested a review from a team January 22, 2025 20:32
@shazbert shazbert added the review me This pull request is ready for review label Jan 22, 2025
Copy link
Collaborator

@gloriousCode gloriousCode left a comment

Choose a reason for hiding this comment

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

tACK!

TID: strconv.FormatInt(tradeData[i].ID, 10),
Exchange: b.Name,
CurrencyPair: p,
AssetType: a,
Price: tradeData[i].Price,
Amount: tradeData[i].Qty,
Timestamp: tradeData[i].Time.Time(),
})
}
if tradeData[i].IsBuyerMaker { // Seller is Taker
Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes me wish for c# ? operator

@thrasher- thrasher- changed the title Add the initiating side to Binance trades Binance: Add order side Jan 23, 2025
Copy link
Collaborator

@thrasher- thrasher- left a comment

Choose a reason for hiding this comment

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

Thanks @Beadko for this PR and @gbjk for the field clarification!

@thrasher- thrasher- merged commit 63f4986 into thrasher-corp:master Jan 23, 2025
4 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review me This pull request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants