-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX: [grid2] fix issue when recovering with finalizing orders #1612
Conversation
Welcome back! @kbearXD, This pull request may get 268 BBG. |
pkg/bbgo/order_executor_general.go
Outdated
@@ -544,7 +545,8 @@ func (e *GeneralOrderExecutor) ClosePosition(ctx context.Context, percentage fix | |||
if queryOrderService, ok := e.session.Exchange.(types.ExchangeOrderQueryService); ok && !IsBackTesting { | |||
switch submitOrder.Type { | |||
case types.OrderTypeMarket: | |||
_, err2 := retry.QueryOrderUntilFilled(ctx, queryOrderService, createdOrders[0].Symbol, createdOrders[0].OrderID) | |||
isMax := exchange.IsMaxExchange(e.session.Exchange) | |||
_, err2 := retry.QueryOrderUntilFilled(ctx, queryOrderService, createdOrders[0].Symbol, createdOrders[0].OrderID, isMax) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we not do this? this is a generic api
dd3a3f4
to
bfede2b
Compare
Re-estimated karma: this pull request may get 280 BBG |
bfede2b
to
fdba537
Compare
Re-estimated karma: this pull request may get 294 BBG |
pkg/strategy/common/sync.go
Outdated
@@ -26,6 +27,10 @@ func SyncActiveOrder(ctx context.Context, ex types.Exchange, orderQueryService t | |||
return isOrderUpdated, err | |||
} | |||
|
|||
if updatedOrder == nil { | |||
return isOrderUpdated, fmt.Errorf("updatedOrder is nil and there is no error, please check it") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use unexpected error, order object is a nil pointer, please check common.SyncActiveOrder()
Re-estimated karma: this pull request may get 309 BBG |
1dbc748
to
444c228
Compare
Re-estimated karma: this pull request may get 314 BBG |
Hi @kbearXD, Well done! 319 BBG has been sent to your polygon wallet. Please check the following tx: https://polygonscan.com/tx/0x02b8cae2fed71a7ff7cc69ac8d15c1602e43a36551edc52d7a8167ea6161da27 Thank you for your contribution! |
No description provided.