def onGetPositionListRsp(rpcGetPositionListRsp): reqId = rpcGetPositionListRsp.commonRsp.reqId if reqId in RpcClientRspHandler.waitReqIdSet: RpcClientRspHandler.rpcGetPositionListRspDict[ reqId] = rpcGetPositionListRsp else: logger.info("直接丢弃的回报,请求ID:%s", reqId) if rpcGetPositionListRsp.position: for tmpPosition in rpcGetPositionListRsp.position: ClientTradeCacheService.storePosition(tmpPosition)
def onRpcPositionRtn(rpcPositionRtn): ClientTradeCacheService.storePosition(rpcPositionRtn.position)
def onRpcPositionListRtn(rpcPositionListRtn): for position in rpcPositionListRtn.position: ClientTradeCacheService.storePosition(position)