mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
xmaker: add rate limit hit alert
This commit is contained in:
parent
081a143ec0
commit
940c675cae
|
@ -524,6 +524,7 @@ func (s *Strategy) Hedge(ctx context.Context, pos fixedpoint.Value) {
|
||||||
if !s.hedgeErrorRateReservation.OK() {
|
if !s.hedgeErrorRateReservation.OK() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
s.Notify("Hit hedge error rate limit, waiting...")
|
||||||
time.Sleep(s.hedgeErrorRateReservation.Delay())
|
time.Sleep(s.hedgeErrorRateReservation.Delay())
|
||||||
s.hedgeErrorRateReservation = nil
|
s.hedgeErrorRateReservation = nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user