Closed igkoh closed 4 years ago
@igkoh Hi,You can register a timer to check the open orders,just like this:https://github.com/hbdmapi/hbdm_Python/blob/master/examples/huobi_option_mm/strategy.py#L159
In recovery procedure of crashed hbdm_Python, the situation runs as T1 : hbdm_Python started T2 : 80 open orders issued T3 : hbdm_Python crashed T4 : hbdm_Python restarted self.trader.orders do not have 80 open orders.
How can I restore full 80 open orders before the machine crushed. If I cannot restore, revoke_order() to cancel everything.
Best regards, Ingyu
Hi @igkoh When hbdm_Python restarted,the open orders will be requested for the first time:https://github.com/hbdmapi/hbdm_Python/blob/master/alpha/platforms/huobi_future_trade.py#L227 .What do you mean 80 open orders?
@foonsun, I really appreciate for your precise answers to develop successful system. In initialization of quant.start() through loop.run_forever()->run_once()->callback-> await method, _success,error=rest_api.get_open_orders(symbol) in alpha/platforms/huobi_future_trade.py restores 80 open orders made before crash.
Detailed previous 80 open orders are recovered through success['data']['orders'] which is 80 length with full open order data.
Once your precise guidance clears obstacle, real progresses are made. Best regards, Ingyu
Np.Happy Trading.
If program runs for n hours with 1 min disconnected/reconnected, self.trader.orders does not contain the 1 min disconnected period. What is the method to get the persistent data of ALL OPEN ORDERS from server? self.trader.orders contains ONLY while on connected. Best regards, Ingyu