c9s / bbgo

The modern cryptocurrency trading bot framework written in Go.
https://bbgo.finance
GNU Affero General Public License v3.0
1.18k stars 283 forks source link

FEATURE: [binance] add margin request #1525

Closed bailantaotao closed 7 months ago

bailantaotao commented 7 months ago
  1. The go-binance library has been deprecated, so I added a new margin request.
  2. We don't need the timestamp because the value is initialized in client.go
bbgokarma-bot commented 7 months ago

Welcome back! @bailantaotao, This pull request may get 547 BBG.

bbgokarma-bot commented 7 months ago

Re-estimated karma: this pull request may get 566 BBG

codecov[bot] commented 7 months ago

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (f77d03d) 21.78% compared to head (836f1f9) 21.77%. Report is 10 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/c9s/bbgo/pull/1525/graphs/tree.svg?width=650&height=150&src=pr&token=ZT7I56OV8K&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin)](https://app.codecov.io/gh/c9s/bbgo/pull/1525?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin) ```diff @@ Coverage Diff @@ ## main #1525 +/- ## ========================================== - Coverage 21.78% 21.77% -0.01% ========================================== Files 604 605 +1 Lines 43885 43885 ========================================== - Hits 9559 9558 -1 - Misses 33643 33645 +2 + Partials 683 682 -1 ``` | [Files](https://app.codecov.io/gh/c9s/bbgo/pull/1525?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin) | Coverage Δ | | |---|---|---| | [...hange/binance/binanceapi/transfer\_asset\_request.go](https://app.codecov.io/gh/c9s/bbgo/pull/1525?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin#diff-cGtnL2V4Y2hhbmdlL2JpbmFuY2UvYmluYW5jZWFwaS90cmFuc2Zlcl9hc3NldF9yZXF1ZXN0Lmdv) | `0.00% <ø> (ø)` | | | [...e/binance/binanceapi/place\_margin\_order\_request.go](https://app.codecov.io/gh/c9s/bbgo/pull/1525?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin#diff-cGtnL2V4Y2hhbmdlL2JpbmFuY2UvYmluYW5jZWFwaS9wbGFjZV9tYXJnaW5fb3JkZXJfcmVxdWVzdC5nbw==) | `0.00% <0.00%> (ø)` | | | [pkg/exchange/binance/exchange.go](https://app.codecov.io/gh/c9s/bbgo/pull/1525?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin#diff-cGtnL2V4Y2hhbmdlL2JpbmFuY2UvZXhjaGFuZ2UuZ28=) | `1.69% <0.00%> (+0.01%)` | :arrow_up: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/c9s/bbgo/pull/1525/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/c9s/bbgo/pull/1525?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/c9s/bbgo/pull/1525?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin). Last update [f77d03d...836f1f9](https://app.codecov.io/gh/c9s/bbgo/pull/1525?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin).
bbgokarma-bot commented 7 months ago

Hi @bailantaotao,

Well done! 586 BBG has been sent to your polygon wallet. Please check the following tx:

https://polygonscan.com/tx/0x7db8954514e78cfd844526584595c41bbf2ccdc36fccc6874c6cac8b920095cd

Thank you for your contribution!