mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
liqmaker: use tradingutil.UniversalCancelAllOrders
This commit is contained in:
parent
c3127f45ce
commit
2508dc18f0
|
@ -131,12 +131,12 @@ func (s *Strategy) Run(ctx context.Context, _ bbgo.OrderExecutor, session *bbgo.
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if cancelApi, ok := session.Exchange.(advancedOrderCancelApi); ok {
|
|
||||||
_, _ = cancelApi.CancelOrdersBySymbol(ctx, s.Symbol)
|
|
||||||
}
|
|
||||||
|
|
||||||
s.liquidityScale = scale
|
s.liquidityScale = scale
|
||||||
|
|
||||||
|
if err := tradingutil.UniversalCancelAllOrders(ctx, session.Exchange, s.Symbol, nil); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
session.UserDataStream.OnStart(func() {
|
session.UserDataStream.OnStart(func() {
|
||||||
s.placeLiquidityOrders(ctx)
|
s.placeLiquidityOrders(ctx)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user