Closed StephenLee2016 closed 2 months ago
In the Bot interface, the order ID is handled as an integer, but when it's sent to the exchange, a random string is generated as the order ID. The error occurs when the generated random ID already exists. Have you encountered this error frequently? The probability of a collision is quite low.
Hi, @nkaz001 . I noticed that the order_id is generated via
// order price in tick is used as order id. new_ask_orders.insert(ask_price_tick, ask_price);
, and then I see similar issues here
https://dev.binance.vision/t/futures-api-duplicating-orders-issue/11684/1
https://dev.binance.vision/t/how-is-exclude-duplicate-order-execution-by-api/1585.
I usually encounter this problem after running for a while. Have you come across this issue before?
The actual order ID is generated with a random string which gives the error you encountered. The integer order ID gives the different error when it already exists.
The actual order ID is generated with a random string which gives the error you encountered. The integer order ID gives the different error when it already exists.
Thank you very much for your reply. I think I understand where the problem lies. I will try generating longer random strings to reduce conflicts. If I have further questions, I will synchronize them here. Thank you again.
I discovered an issue with the mishandling of order IDs, which led to the duplication of order IDs. It’s unclear whether this problem arose during refactoring or if it existed beforehand. The issue is fixed in the new version, but the new version is still unstable.
Hi, @nkaz001 I encountered “Coincidentally, creates a duplicated client order id.” warning during the live trading process, and I am still getting familiar with this framework. I would like to know under what circumstances this issue might occur? Thx