Closed igkoh closed 4 years ago
Temporary measure is taken as:
success, error = await self._rest_api.get_open_orders(self._symbol)
if error:
...e = Error("get open orders failed!")
... SingleTask.run(self._init_success_callback, False, e)
else:
...for order_info in success["data"]["orders"]:
......order_info["ts"] = order_info["created_at"]
......self._update_order(order_info)
SingleTask.run(self._init_success_callback, True, None)
What is the best method to maintain continuous operation of huobi swap? Best regards, Ingyu
Hi,we have added the logics to handle the error several days ago. eg: https://github.com/hbdmapi/hbdm_Python/blob/master/alpha/platforms/huobi_swap_trade.py#L227
@foonsun, I followed your instruction in sub_callback of class HuobiSwapTrade(Websocket), logic steps through to success['data'] to update_order.
Until now, I have not reached else case of ('Unknown error') and it is free of unknown error upto now.
Thanks for kind instructions. Best regards, Ingyu
@igkoh thanks for your feedback.
After several days of running, sub_callback in class HuobiSwapTrade(Websocket) of huobi_swap_trade.py in alpha/platforms has errors error ClientOSError(10054, 'Current connection was forcibly disconnected by remote host', None, 10054, None) in: success, error = await self._rest_api.get_open_orders(self._symbol) if error: e = Error("get open orders failed!") SingleTask.run(self._init_success_callback, False, e)
Since error in _rest_api.get_open_orders, success is None and not subscriptable as success["data"]["orders"]. How can I modify for continuous operation?
Best regards, Ingyu