mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
binance/btse/rpcserver: Specify AnySide/AnyType for order retrieval and fix order index bugs (#1054)
This commit is contained in:
@@ -1384,7 +1384,7 @@ func (b *Binance) GetActiveOrders(ctx context.Context, req *order.GetOrdersReque
|
||||
if err != nil {
|
||||
log.Errorf(log.ExchangeSys, "%s %v", b.Name, err)
|
||||
}
|
||||
orderStatus, err := order.StringToOrderStatus(resp[i].Status)
|
||||
orderStatus, err := order.StringToOrderStatus(resp[x].Status)
|
||||
if err != nil {
|
||||
log.Errorf(log.ExchangeSys, "%s %v", b.Name, err)
|
||||
}
|
||||
@@ -1506,7 +1506,7 @@ func (b *Binance) GetOrderHistory(ctx context.Context, req *order.GetOrdersReque
|
||||
|
||||
for i := range resp {
|
||||
var side order.Side
|
||||
side, err = order.StringToOrderSide(resp[x].Side)
|
||||
side, err = order.StringToOrderSide(resp[i].Side)
|
||||
if err != nil {
|
||||
log.Errorf(log.ExchangeSys, "%s %v", b.Name, err)
|
||||
}
|
||||
|
||||
@@ -928,7 +928,7 @@ func (b *BTSE) GetOrderHistory(ctx context.Context, getOrdersRequest *order.GetO
|
||||
if !matchType(currentOrder[y].OrderType, orderDeref.Type) {
|
||||
continue
|
||||
}
|
||||
orderStatus, err := order.StringToOrderStatus(currentOrder[x].OrderState)
|
||||
orderStatus, err := order.StringToOrderStatus(currentOrder[y].OrderState)
|
||||
if err != nil {
|
||||
log.Errorf(log.ExchangeSys, "%s %v", b.Name, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user