Merge pull request #424 from tony1223/bug/binance-add-ratelimiter

fix: [binance] add order rate limiter
This commit is contained in:
Yo-An Lin 2022-01-12 12:53:51 +08:00 committed by GitHub
commit 30c1dd3e3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {