It looks like you're new here. If you want to get involved, click one of these buttons!
Connection error: 1006 - connection was closed uncleanly (None)
WebSocket error. Code: 1006. Reason: connection was closed uncleanly (None)
Connection closed: 1006 - connection was closed uncleanly (None)
WebSocket connection closed: 1006 - connection was closed uncleanly (None)
What is the reason? I have checked the detail logs as well.
You shouldn't block the on_order_update as well. You should fire routine in new thread and let that take care of the flow.
You can know more about the on_order_update messages order here.
For example, if I buy X stock at 100 with a limit order, it should show OPEN, but after it is executed, it shows 'COMPLETE'
but sometimes I get the opposite: first get 'COMPLETE' then 'OPEN'
How can this be resolved?