From 0daffb3e5fbed8f977c2602bf9cdfaac1c13055b Mon Sep 17 00:00:00 2001 From: nanoric Date: Fri, 8 Mar 2019 08:50:45 -0400 Subject: [PATCH] [Mod] OesTdApi: uniform naming. --- vnpy/gateway/oes/oes_td.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/vnpy/gateway/oes/oes_td.py b/vnpy/gateway/oes/oes_td.py index f0f8f9a1..d58c4011 100644 --- a/vnpy/gateway/oes/oes_td.py +++ b/vnpy/gateway/oes/oes_td.py @@ -567,6 +567,7 @@ class OesTdApi: order = vt_req.create_order_data(str(order_id), self.gateway.gateway_name) order.direction = Direction.NET # fix direction into NET: stock only self.save_order(order_id, order) + ret = OesApi_SendOrderReq(self._env.ordChannel, oes_req ) @@ -620,24 +621,21 @@ class OesTdApi: self.gateway.on_order(vt_order) return 1 - def init_query_orders(self) -> bool: - """ - :note: this function can be called only before calling send_order - :return: - """ + def query_orders(self) -> bool: + """""" f = OesQryOrdFilterT() ret = OesApi_QueryOrder(self._env.qryChannel, f, - self.on_init_query_orders + self.on_query_orders ) return ret >= 0 - def on_init_query_orders(self, - session_info: SGeneralClientChannelT, - head: SMsgHeadT, - body: Any, - cursor: OesQryCursorT, - ): + def on_query_orders(self, + session_info: SGeneralClientChannelT, + head: SMsgHeadT, + body: Any, + cursor: OesQryCursorT, + ): """""" data: OesOrdCnfmT = cast.toOesOrdItemT(body) try: