From 857db529af057f5399960b17d77ce700be26e19b Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 11 Jan 2022 17:05:36 +0800 Subject: [PATCH] binance: show order info in the error --- pkg/exchange/binance/exchange.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/exchange/binance/exchange.go b/pkg/exchange/binance/exchange.go index 3246004e6..695aef6e8 100644 --- a/pkg/exchange/binance/exchange.go +++ b/pkg/exchange/binance/exchange.go @@ -580,11 +580,11 @@ func (e *Exchange) CancelOrders(ctx context.Context, orders ...types.Order) (err _, err2 := req.Do(ctx) if err2 != nil { err = multierr.Append(err, errors.Wrapf( - err2, "can not cancel %s order. orderID: %d clientOrderID: %s status: %s", + err2, "can not cancel %s order. orderID: %d clientOrderID: %s order: %#v", o.Symbol, o.OrderID, o.ClientOrderID, - o.Status)) + o)) } } else { // SPOT @@ -597,7 +597,7 @@ func (e *Exchange) CancelOrders(ctx context.Context, orders ...types.Order) (err req.OrigClientOrderID(o.ClientOrderID) } else { err = multierr.Append(err, fmt.Errorf( - "can not cancel %s order, order does not contain orderID or clientOrderID. %#v", + "can not cancel %s order, order does not contain orderID or clientOrderID. order: %#v", o.Symbol, o)) continue } @@ -605,11 +605,11 @@ func (e *Exchange) CancelOrders(ctx context.Context, orders ...types.Order) (err _, err2 := req.Do(ctx) if err2 != nil { err = multierr.Append(err, errors.Wrapf( - err2, "can not cancel %s order. orderID: %d clientOrderID: %s status: %s", + err2, "can not cancel %s order. orderID: %d clientOrderID: %s order: %#v", o.Symbol, o.OrderID, o.ClientOrderID, - o.Status)) + o)) } } }