My algo trading script is running fine with a dummy logic (for testing the platform automatic order placement) It places orders, cancels orders, modifies order as per my logic.
Script suffers two problems: 1 . timeout exception (yet to find a robust solution) 2. once it a while script places two orders (whereas it should place only one order). It happens like once in 50 times.
Is there any sample code for exception handling? just for a rough guide
You can add try except block something like this.You can also go through this python documentation.