Esempio n. 1
0
 def on_query_orders(self,
                     session_info: SGeneralClientChannelT,
                     head: SMsgHeadT,
                     body: Any,
                     cursor: OesQryCursorT,
                     ):
     """"""
     data: OesOrdCnfmT = caster.toOesOrdItemT(body)
     vt_order = self._order_manager.oes_order_to_vt(data)
     self.gateway.on_order(vt_order)
     return 1
Esempio n. 2
0
    def on_query_order(self, session_info: SGeneralClientChannelT,
                       head: SMsgHeadT, body: Any, cursor: OesQryCursorT):
        """"""
        data: OesOrdCnfmT = caster.toOesOrdItemT(body)

        i = self._order_manager.get_order(data.clSeqNo)
        vt_order = i.vt_order
        vt_order.status = STATUS_OES2VT[data.ordStatus]
        vt_order.volume = data.ordQty
        vt_order.traded = data.cumQty
        self.gateway.on_order(copy(vt_order))
        return 1