From c7e22af499c9232eb592c5f866f9392078016832 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Thu, 10 Aug 2017 09:56:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Oanda=E8=A1=8C=E6=83=85?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E7=9A=84=E6=97=A5=E6=9C=9F=E4=B8=BAUTC?= =?UTF-8?q?=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/trader/gateway/oandaGateway/oandaGateway.py | 1 + 1 file changed, 1 insertion(+) diff --git a/vnpy/trader/gateway/oandaGateway/oandaGateway.py b/vnpy/trader/gateway/oandaGateway/oandaGateway.py index 94b2cccb..9623f29d 100644 --- a/vnpy/trader/gateway/oandaGateway/oandaGateway.py +++ b/vnpy/trader/gateway/oandaGateway/oandaGateway.py @@ -330,6 +330,7 @@ class Api(OandaApi): tick.bidPrice1 = d['bid'] tick.askPrice1 = d['ask'] tick.time = getTime(d['time']) + '.0' # 补齐毫秒部分 + tick.date = datetime.datetime.utcnow().strftime('%Y%m%d') # OANDA的时间是UTC标准时 # 做市商的TICK数据只有买卖的报价,因此最新价格选用中间价代替 tick.lastPrice = (tick.bidPrice1 + tick.askPrice1)/2