def onGetOrderListRsp(rpcGetOrderListRsp): reqId = rpcGetOrderListRsp.commonRsp.reqId if reqId in RpcClientRspHandler.waitReqIdSet: RpcClientRspHandler.rpcGetOrderListRspDict[ reqId] = rpcGetOrderListRsp else: logger.info("直接丢弃的回报,请求ID:%s", reqId) if rpcGetOrderListRsp.order: for tmpOrder in rpcGetOrderListRsp.order: ClientTradeCacheService.storeOrder(tmpOrder)
def onRpcOrderRtn(rpcOrderRtn): ClientTradeCacheService.storeOrder(rpcOrderRtn.order) StrategyEngine.onOrder(rpcOrderRtn.order)
def onRpcOrderListRtn(rpcOrderListRtn): for order in rpcOrderListRtn.order: ClientTradeCacheService.storeOrder(order) StrategyEngine.onOrder(order)