mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-13 02:23:51 +00:00
add ratelmiter
This commit is contained in:
parent
88210fd27b
commit
25801f9f63
|
@ -477,6 +477,10 @@ func (e *Exchange) QueryClosedOrders(ctx context.Context, symbol string, since,
|
||||||
until = since.Add(24*time.Hour - time.Millisecond)
|
until = since.Add(24*time.Hour - time.Millisecond)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := orderLimiter.Wait(ctx); err != nil {
|
||||||
|
log.WithError(err).Errorf("order rate limiter wait error")
|
||||||
|
}
|
||||||
|
|
||||||
log.Infof("querying closed orders %s from %s <=> %s ...", symbol, since, until)
|
log.Infof("querying closed orders %s from %s <=> %s ...", symbol, since, until)
|
||||||
|
|
||||||
if e.IsMargin {
|
if e.IsMargin {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user