From fb1dac6e3c89806268d4dc32ec59dcc32682ce79 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Wed, 27 Sep 2017 08:07:01 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=E4=BF=AE=E5=A4=8DupdateOrderReq=E4=B8=AD?= =?UTF-8?q?=E7=9A=84vtSymbol=E6=89=BE=E4=B8=8D=E5=88=B0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/trader/vtEngine.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vnpy/trader/vtEngine.py b/vnpy/trader/vtEngine.py index f4fbacff..d343ae35 100644 --- a/vnpy/trader/vtEngine.py +++ b/vnpy/trader/vtEngine.py @@ -714,9 +714,14 @@ class PositionDetail(object): #---------------------------------------------------------------------- def updateOrderReq(self, req, vtOrderID): """发单更新""" + if req.exchange: + vtSymbol = '.'.join([req.symbol, req.exchange]) + else: + vtSymbol = req.symbol + # 基于请求生成委托对象 order = VtOrderData() - order.vtSymbol = req.vtSymbol + order.vtSymbol = vtSymbol order.symbol = req.symbol order.exchange = req.exchange order.offset = req.offset