mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
grid2: split SubmitOrders calls
This commit is contained in:
parent
9d2c742496
commit
21cdb7afe8
|
@ -894,9 +894,13 @@ func (s *Strategy) openGrid(ctx context.Context, session *bbgo.ExchangeSession)
|
|||
|
||||
s.debugGridOrders(submitOrders, lastPrice)
|
||||
|
||||
createdOrders, err2 := s.orderExecutor.SubmitOrders(ctx, submitOrders...)
|
||||
if err2 != nil {
|
||||
return err
|
||||
var createdOrders []types.Order
|
||||
for _, submitOrder := range submitOrders {
|
||||
ret, err2 := s.orderExecutor.SubmitOrders(ctx, submitOrder)
|
||||
if err2 != nil {
|
||||
return err2
|
||||
}
|
||||
createdOrders = append(createdOrders, ret...)
|
||||
}
|
||||
|
||||
// try to always emit grid ready
|
||||
|
|
Loading…
Reference in New Issue
Block a user