Duplicate ClientOrderId Error on Script Restart with Existing Position (Binance Testnet) #2786
Replies: 1 comment
-
in LiveExecEngineConfig, add filtered_client_order_ids=[ClientOrderId('O-20250714-074501-001-001-1')] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm conducting real-time trading tests using the Binance testnet (script:
binance_futures_testnet_ema_cross.py
).When I have open positions, starting the trading script triggers the following error:
Due to an 8-hour time zone difference,
074501
corresponds to my local time154501
, which matches the selected time record in the screenshot below:Previously, I tested on Windows 10 (where
CTRL+C
could not gracefully shut down the script). Then I installed WSL2 and ran the test under Linux.Since a position was created when I started the script on Windows 10, running the script in WSL2 does not produce an error and closes all positions properly on exit.
I also tested distributed trading (i.e., running the script simultaneously on Windows 10 and Linux). Since both tried to place orders on the same bar, errors occurred on both sides, but no detailed logs were preserved.
Later, once the account has an existing position, I can no longer start the script—the same error mentioned above occurs.
If I manually close all positions in the account, the script starts and ends normally (at this point, I had two strategies configured: Strategy A closes positions in
on_stop
, Strategy B does nothing inon_stop
).After stopping, there are remaining positions from Strategy B.
Trying to restart the script in this case also leads to the same error as before. All the errors point to the same
ClientOrderId('O-20250714-074501-001-001-1')
.Beta Was this translation helpful? Give feedback.
All reactions