Skip to content
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

Kucoin - Creating orders with no exchange_id on pmm_dynamic controller #6942

Closed
rapcmia opened this issue Apr 1, 2024 · 1 comment
Closed

Comments

@rapcmia
Copy link
Contributor

rapcmia commented Apr 1, 2024

Describe the bug

When running tests on pmm_dynamic on different connector, observed that for kucoin spot the script creates a order with no exchange_order_id thats only available on client but not on kucoin exchange. This causes:

Failed to cancel order

2024-04-01 13:41:50,951 - 46171 - hummingbot.strategy.script_strategy_base - INFO - (LOOM-USDT) Canceling the limit order SLMUT6150267804d58427a5f43b7e998527393b7. [clock=2024-04-01 05:41:50+00:00]
2024-04-01 13:41:51,092 - 46171 - hummingbot.connector.exchange.kucoin.kucoin_exchange.KucoinExchange - ERROR - Failed to cancel order SLMUT6150267804c75427a5f43b7e998527393b7
Traceback (most recent call last):
  File "/Users/rapcomia/github/hummingbot/development/hummingbot/connector/exchange_py_base.py", line 520, in _execute_order_cancel
    cancelled = await self._execute_order_cancel_and_process_update(order=order)
  File "/Users/rapcomia/github/hummingbot/development/hummingbot/connector/exchange_py_base.py", line 540, in _execute_order_cancel_and_process_update
    cancelled = await self._place_cancel(order.client_order_id, order)
  File "/Users/rapcomia/github/hummingbot/development/hummingbot/connector/exchange/kucoin/kucoin_exchange.py", line 231, in _place_cancel
    if tracked_order.exchange_order_id in cancel_result["data"].get("cancelledOrderIds", []):
KeyError: 'data'

Failed to fetch updates

2024-04-01 13:42:01,227 - 46171 - hummingbot.connector.exchange.kucoin.kucoin_exchange.KucoinExchange - WARNING - Error fetching status update for the active order SLMUT6150267804c75427a5f43b7e998527393b7: 'data'.
2024-04-01 13:42:01,647 - 46171 - hummingbot.connector.exchange.kucoin.kucoin_exchange.KucoinExchange - WARNING - Error fetching status update for the active order SLMUT61502724ca5b8427a5f43b7e998527393b7: 'data'.

Note: Setup a wallet that can only create 1 sell order and config with 2 order levels each side

Steps to reproduce

  1. Create a simple pmm_dynamic controller script on kucoin spot
  2. Create script config then start
  3. Observe after reaching the refresh time, script tries to cancel and order that does not exist on exchange

Release version

dev-1.27.0

Type of installation

Source

Attach required files

conf_market_making.pmm_dynamic_1c.yml.log remove .log
logs_conf_kucoin.log

@rapcmia
Copy link
Contributor Author

rapcmia commented Apr 17, 2024

Related to #6890

@rapcmia rapcmia closed this as completed Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant