mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
bbgo,grid2: add place order error log
This commit is contained in:
parent
051aa19989
commit
fcd7a20b78
|
@ -218,6 +218,10 @@ func (e *GeneralOrderExecutor) SubmitOrders(ctx context.Context, submitOrders ..
|
|||
}
|
||||
|
||||
createdOrders, errIdx, err := BatchPlaceOrder(ctx, e.session.Exchange, formattedOrders...)
|
||||
if err != nil {
|
||||
log.WithError(err).Errorf("place order error, will retry orders: %v", errIdx)
|
||||
}
|
||||
|
||||
if len(errIdx) > 0 {
|
||||
createdOrders2, err2 := BatchRetryPlaceOrder(ctx, e.session.Exchange, errIdx, formattedOrders...)
|
||||
if err2 != nil {
|
||||
|
|
|
@ -826,11 +826,11 @@ func (s *Strategy) openGrid(ctx context.Context, session *bbgo.ExchangeSession)
|
|||
return err
|
||||
}
|
||||
|
||||
s.logger.Infof("grid orders submitted:")
|
||||
for _, order := range createdOrders {
|
||||
s.logger.Info(order.String())
|
||||
}
|
||||
|
||||
s.logger.Infof("ALL GRID ORDERS SUBMITTED")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user