mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 16:21:09 +00:00
fix: rename generalorderexecutor.cancel to gracefulcancelorder
This commit is contained in:
parent
ff7fd38372
commit
4a878b5596
|
@ -144,7 +144,7 @@ func (e *GeneralOrderExecutor) GracefulCancelActiveOrderBook(ctx context.Context
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *GeneralOrderExecutor) Cancel(ctx context.Context, order types.Order) error {
|
func (e *GeneralOrderExecutor) GracefulCancelOrder(ctx context.Context, order types.Order) error {
|
||||||
if e.activeMakerOrders.NumOfOrders() == 0 {
|
if e.activeMakerOrders.NumOfOrders() == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@ func (s *Strategy) smartCancel(ctx context.Context, pricef float64) int {
|
||||||
panic("not supported side for the order")
|
panic("not supported side for the order")
|
||||||
}
|
}
|
||||||
if toCancel {
|
if toCancel {
|
||||||
err := s.GeneralOrderExecutor.Cancel(ctx, order)
|
err := s.GeneralOrderExecutor.GracefulCancelOrder(ctx, order)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
delete(s.orderPendingCounter, order.OrderID)
|
delete(s.orderPendingCounter, order.OrderID)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user