c9s / bbgo

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

Use new circuitbreaker in common strategy #1749

Closed r03921081 closed 12 hours ago

r03921081 commented 2 weeks ago

Strategy.RiskController.circuitBreakRiskControl now uses the new circuitbreaker: circuitbreaker.BasicCircuitBreaker

bbgokarma-bot commented 2 weeks ago

Hi @r03921081,

This is KarmaBot, and we reward your contributions with tokens sent directly to your wallet to support development.

This pull request may get 207 BBG.

To receive BBG tokens, please provide your Polygon (can be Ethereum) address as an issue comment in this pull request, following this format:

polygon:0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B

Once this pull request is merged, your BBG tokens will be transferred to your wallet.

-- If you're interested in our project, feel free to join our Telegram group https://t.me/bbgo_intl

Best, KarmaBot

CLAassistant commented 2 weeks ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Andy Liao seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 24.11%. Comparing base (271eafa) to head (7137343). Report is 69 commits behind head on main.

Files with missing lines Patch % Lines
pkg/strategy/common/strategy.go 0.00% 6 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/c9s/bbgo/pull/1749/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/1749?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 #1749 +/- ## ========================================== - Coverage 24.11% 24.11% -0.01% ========================================== Files 615 617 +2 Lines 37544 37567 +23 ========================================== + Hits 9055 9059 +4 - Misses 27691 27710 +19 Partials 798 798 ``` | [Files with missing lines](https://app.codecov.io/gh/c9s/bbgo/pull/1749?dropdown=coverage&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/common/strategy.go](https://app.codecov.io/gh/c9s/bbgo/pull/1749?src=pr&el=tree&filepath=pkg%2Fstrategy%2Fcommon%2Fstrategy.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin#diff-cGtnL3N0cmF0ZWd5L2NvbW1vbi9zdHJhdGVneS5nbw==) | `0.00% <0.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/c9s/bbgo/pull/1749/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/1749?dropdown=coverage&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/1749?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin). Last update [37106c3...7137343](https://app.codecov.io/gh/c9s/bbgo/pull/1749?dropdown=coverage&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).