mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
Merge pull request #424 from tony1223/bug/binance-add-ratelimiter
fix: [binance] add order rate limiter
This commit is contained in:
commit
30c1dd3e3d
|
@ -477,6 +477,10 @@ func (e *Exchange) QueryClosedOrders(ctx context.Context, symbol string, since,
|
|||
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)
|
||||
|
||||
if e.IsMargin {
|
||||
|
|
Loading…
Reference in New Issue
Block a user