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

REFACTOR: move trading related utility functions to the tradingutil package #1547

Closed c9s closed 6 months ago

bbgokarma-bot commented 6 months ago

Welcome back! @c9s, This pull request may get 280 BBG.

bbgokarma-bot commented 6 months ago

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

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 31.57895% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 21.71%. Comparing base (945c442) to head (36e90cf). 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/1547/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/1547?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 #1547 +/- ## ========================================== - Coverage 21.77% 21.71% -0.06% ========================================== Files 606 605 -1 Lines 43939 43938 -1 ========================================== - Hits 9566 9543 -23 - Misses 33691 33713 +22 Partials 682 682 ``` | [Files](https://app.codecov.io/gh/c9s/bbgo/pull/1547?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin) | Coverage Δ | | |---|---|---| | [pkg/strategy/grid2/grid.go](https://app.codecov.io/gh/c9s/bbgo/pull/1547?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin#diff-cGtnL3N0cmF0ZWd5L2dyaWQyL2dyaWQuZ28=) | `80.53% <100.00%> (ø)` | | | [pkg/strategy/grid2/strategy.go](https://app.codecov.io/gh/c9s/bbgo/pull/1547?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin#diff-cGtnL3N0cmF0ZWd5L2dyaWQyL3N0cmF0ZWd5Lmdv) | `33.53% <60.00%> (ø)` | | | [pkg/util/tradingutil/trades.go](https://app.codecov.io/gh/c9s/bbgo/pull/1547?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin#diff-cGtnL3V0aWwvdHJhZGluZ3V0aWwvdHJhZGVzLmdv) | `34.61% <0.00%> (-25.39%)` | :arrow_down: | ... and [8 files with indirect coverage changes](https://app.codecov.io/gh/c9s/bbgo/pull/1547/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/1547?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/1547?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin). Last update [945c442...36e90cf](https://app.codecov.io/gh/c9s/bbgo/pull/1547?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 6 months ago

Hi @c9s,

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

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

Thank you for your contribution!