CoinAlpha / hummingbot

Hummingbot is open source software that helps you build trading bots that run on any exchange or blockchain
https://www.hummingbot.org
Apache License 2.0
169 stars 84 forks source link

Failed Test PR #302 - Failing to cancel order using the batch order script #303

Closed RC-13 closed 1 year ago

RC-13 commented 1 year ago

Describe the bug When running the batch_order_update.py, we have observe a failure to cancel order in multiple exchanges. Orders are expected to get canceled after 10 sec, however, they fail to get canceled with the following error: image

2023-01-24 14:34:35,002 - 6302 - hummingbot.connector.exchange.bybit.bybit_exchange.BybitExchange - ERROR - Failed to cancel order BYBIT-BSLBC5f2fcb4f2235dc2753136
Traceback (most recent call last):
  File "/Users/clintg/testing/batch-order/hummingbot/connector/exchange/bybit/bybit_exchange.py", line 205, in _place_cancel
    if tracked_order.exchange_order_id:
AttributeError: 'hummingbot.core.data_type.limit_order.LimitOrder' object has no attribute 'exchange_order_id'

Behavior is seen when using the following exchanges:

Steps To Reproduce

  1. Clone and install the feature branch
  2. Connect the API of any of the affected exchange
  3. Modify the batch_order_update.py and save
  4. Run start --script batch_order_update.py
  5. Check the status and log pane then review the log file

Release version Version: dev-1.12.0

Attachments logs_batch_order_update.log

PtrckM commented 1 year ago

image

2023-01-24 15:26:15,175 - 44178 - hummingbot.connector.derivative.binance_perpetual.binance_perpetual_derivative.BinancePerpetualDerivative - ERROR - Failed to cancel order x-3QreWesySDEUT5f2fd6db861c256c9
Traceback (most recent call last):
  File "/Users/patrick/Documents/HB/inj_batch/hummingbot/connector/derivative/binance_perpetual/binance_perpetual_derivative.py", line 208, in _place_cancel
    cancel_result = await self._api_delete(
  File "/Users/patrick/Documents/HB/inj_batch/hummingbot/connector/exchange_py_base.py", line 1089, in _api_delete
    return await self._api_request(*args, **kwargs)
  File "/Users/patrick/Documents/HB/inj_batch/hummingbot/connector/derivative/binance_perpetual/binance_perpetual_derivative.py", line 816, in _api_request
    raise IOError(f"Error executing request {method.name} {path_url}. "
OSError: Error executing request DELETE /order. HTTP status is 400. Error: {"code":-2011,"msg":"Unknown order sent."}

logs_batch_order_update.log

geneuinely07 commented 1 year ago

Closing this bug report. PR was already closed.