增加Oanda行情推送的日期为UTC日期

This commit is contained in:
vn.py 2017-08-10 09:56:43 +08:00
parent 7471c58463
commit c7e22af499

View File

@ -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