补齐OANDA接口中的行情时间数据的毫秒部分
This commit is contained in:
parent
fe198aa40f
commit
ea3ca6427a
@ -329,7 +329,7 @@ class Api(OandaApi):
|
||||
tick.vtSymbol = '.'.join([tick.symbol, tick.exchange])
|
||||
tick.bidPrice1 = d['bid']
|
||||
tick.askPrice1 = d['ask']
|
||||
tick.time = getTime(d['time'])
|
||||
tick.time = getTime(d['time']) + '.0' # 补齐毫秒部分
|
||||
|
||||
# 做市商的TICK数据只有买卖的报价,因此最新价格选用中间价代替
|
||||
tick.lastPrice = (tick.bidPrice1 + tick.askPrice1)/2
|
||||
|
Loading…
Reference in New Issue
Block a user