mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
grid2: debug submitOrder before sending them to the api
This commit is contained in:
parent
bc8d7e9968
commit
ac8186d43d
|
@ -52,8 +52,12 @@ exchangeStrategies:
|
|||
## for example, when the last price hit 17_000.0 then open a grid with the price range 13_000 to 20_000
|
||||
# triggerPrice: 16_900.0
|
||||
|
||||
## stopLossPrice is used for closing the grid and sell all the inventory to stop loss.
|
||||
## (optional)
|
||||
stopLossPrice: 16_000.0
|
||||
|
||||
## takeProfitPrice is used for closing the grid and sell all the inventory at higher price to take profit
|
||||
## (optional)
|
||||
takeProfitPrice: 20_000.0
|
||||
|
||||
## profitSpread is the profit spread of the arbitrage order (sell order)
|
||||
|
@ -85,4 +89,4 @@ exchangeStrategies:
|
|||
keepOrdersWhenShutdown: false
|
||||
|
||||
## skipSpreadCheck skips the minimal spread check for the grid profit
|
||||
# skipSpreadCheck: true
|
||||
skipSpreadCheck: true
|
||||
|
|
|
@ -809,13 +809,13 @@ func (s *Strategy) openGrid(ctx context.Context, session *bbgo.ExchangeSession)
|
|||
return err
|
||||
}
|
||||
|
||||
s.debugGridOrders(submitOrders, lastPrice)
|
||||
|
||||
createdOrders, err2 := s.orderExecutor.SubmitOrders(ctx, submitOrders...)
|
||||
if err2 != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
s.debugGridOrders(submitOrders, lastPrice)
|
||||
|
||||
for _, order := range createdOrders {
|
||||
s.logger.Info(order.String())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user