Merge pull request #854 from frin1/fix/pivotshort-autorepay

fix: added SideEffectTypeAutoRepay to pivotshort take-profit order
This commit is contained in:
Yo-An Lin 2022-07-29 16:07:13 +08:00 committed by GitHub
commit 8302620377
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,12 +81,13 @@ func (s *SupportTakeProfit) Bind(session *bbgo.ExchangeSession, orderExecutor *b
bbgo.Notify("placing %s take profit order at price %f", s.Symbol, buyPrice.Float64())
createdOrders, err := orderExecutor.SubmitOrders(ctx, types.SubmitOrder{
Symbol: s.Symbol,
Type: types.OrderTypeLimitMaker,
Side: types.SideTypeBuy,
Price: buyPrice,
Quantity: quantity,
Tag: "supportTakeProfit",
Symbol: s.Symbol,
Type: types.OrderTypeLimitMaker,
Side: types.SideTypeBuy,
Price: buyPrice,
Quantity: quantity,
Tag: "supportTakeProfit",
MarginSideEffect: types.SideEffectTypeAutoRepay,
})
if err != nil {