mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
binance: add details to order cancel error
This commit is contained in:
parent
31461f1720
commit
96ffab9cd8
|
@ -546,9 +546,9 @@ func (e *Exchange) CancelOrders(ctx context.Context, orders ...types.Order) (err
|
||||||
req.OrderID(int64(o.OrderID))
|
req.OrderID(int64(o.OrderID))
|
||||||
}
|
}
|
||||||
|
|
||||||
_, _err := req.Do(ctx)
|
_, err2 := req.Do(ctx)
|
||||||
if _err != nil {
|
if err2 != nil {
|
||||||
err = multierr.Append(err, _err)
|
err = multierr.Append(err, err2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -569,9 +569,14 @@ func (e *Exchange) CancelOrders(ctx context.Context, orders ...types.Order) (err
|
||||||
|
|
||||||
_, err2 := req.Do(ctx)
|
_, err2 := req.Do(ctx)
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
err = multierr.Append(err, err2)
|
err = multierr.Append(err, errors.Wrapf(
|
||||||
|
err2, "can not cancel %s order. orderID: %d clientOrderID: %s",
|
||||||
|
o.Symbol,
|
||||||
|
o.OrderID,
|
||||||
|
o.ClientOrderID))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// SPOT
|
||||||
var req = e.Client.NewCancelOrderService()
|
var req = e.Client.NewCancelOrderService()
|
||||||
req.Symbol(o.Symbol)
|
req.Symbol(o.Symbol)
|
||||||
|
|
||||||
|
@ -583,7 +588,11 @@ func (e *Exchange) CancelOrders(ctx context.Context, orders ...types.Order) (err
|
||||||
|
|
||||||
_, err2 := req.Do(ctx)
|
_, err2 := req.Do(ctx)
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
err = multierr.Append(err, err2)
|
err = multierr.Append(err, errors.Wrapf(
|
||||||
|
err2, "can not cancel %s order. orderID: %d clientOrderID: %s",
|
||||||
|
o.Symbol,
|
||||||
|
o.OrderID,
|
||||||
|
o.ClientOrderID))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user