mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
bollmaker: skip submitOrder calls if submitOrders is empty
This commit is contained in:
parent
656ef942e4
commit
0cec652f38
|
@ -88,7 +88,7 @@ func (b *LocalActiveOrderBook) GracefulCancel(ctx context.Context, ex types.Exch
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Info("all orders are cancelled successfully")
|
log.Debug("all orders are cancelled successfully")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -305,6 +305,10 @@ func (s *Strategy) placeOrders(ctx context.Context, orderExecutor bbgo.OrderExec
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(submitOrders) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
createdOrders, err := orderExecutor.SubmitOrders(ctx, submitOrders...)
|
createdOrders, err := orderExecutor.SubmitOrders(ctx, submitOrders...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithError(err).Errorf("can not place ping pong orders")
|
log.WithError(err).Errorf("can not place ping pong orders")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user