Example #1
0
    def onGetTradeListRsp(rpcGetTradeListRsp):
        reqId = rpcGetTradeListRsp.commonRsp.reqId
        if reqId in RpcClientRspHandler.waitReqIdSet:
            RpcClientRspHandler.rpcGetTradeListRspDict[
                reqId] = rpcGetTradeListRsp
        else:
            logger.info("直接丢弃的回报,请求ID:%s", reqId)

        if rpcGetTradeListRsp.trade:
            for tmpTrade in rpcGetTradeListRsp.trade:
                ClientTradeCacheService.storeTrade(tmpTrade)
 def onRpcTradeRtn(rpcTradeRtn):
     ClientTradeCacheService.storeTrade(rpcTradeRtn.trade)
     StrategyEngine.onTrade(rpcTradeRtn.trade)
 def onRpcTradeListRtn(rpcTradeListRtn):
     for trade in rpcTradeListRtn.trade:
         ClientTradeCacheService.storeTrade(trade)
         StrategyEngine.onTrade(trade)