xdepthmaker: add fullReplenishTicker

This commit is contained in:
c9s 2023-11-30 17:11:21 +08:00
parent 888a550c80
commit 25b04cb36c
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -363,6 +363,9 @@ func (s *Strategy) CrossRun(
posTicker := time.NewTicker(util.MillisecondsJitter(s.HedgeInterval.Duration(), 200))
defer posTicker.Stop()
fullReplenishTicker := time.NewTicker(util.MillisecondsJitter(15*time.Minute, 200))
defer fullReplenishTicker.Stop()
for {
select {
@ -374,6 +377,9 @@ func (s *Strategy) CrossRun(
log.Warnf("%s maker goroutine stopped, due to the cancelled context", s.Symbol)
return
case <-fullReplenishTicker.C:
s.updateQuote(ctx, 0)
case sig, ok := <-s.pricingBook.C:
// when any book change event happened
if !ok {