增加Oanda行情推送的日期为UTC日期
This commit is contained in:
parent
7471c58463
commit
c7e22af499
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user