fix orderId-based query for binance

This commit is contained in:
c9s 2020-11-05 11:08:04 +08:00
parent 7fab2e24de
commit 8693bbbd24

View File

@ -91,7 +91,7 @@ func (e ExchangeBatchProcessor) BatchQueryClosedOrders(ctx context.Context, symb
return
}
if len(orders) == 0 {
if len(orders) == 0 || (len(orders) == 1 && orders[0].OrderID == lastOrderID) {
startTime = limitedEndTime
continue
}
@ -105,6 +105,7 @@ func (e ExchangeBatchProcessor) BatchQueryClosedOrders(ctx context.Context, symb
c <- o
startTime = o.CreationTime
lastOrderID = o.OrderID
orderIDs[o.OrderID] = struct{}{}
}
}