bugfix:1. getlasttick 空数据判断失误导致后续分析异常 2. gethisbar 日期关键字更改为tradingday 上述修复全部测试通过

This commit is contained in:
XueShan 2017-07-12 15:50:56 +08:00
parent e1ca7de271
commit ea8f4d542b

View File

@ -46,7 +46,7 @@ class ShcifcoApi(object):
params = {'ids': symbol} params = {'ids': symbol}
data = self.getData(path, params) data = self.getData(path, params)
if not data: if not data or data == ';':
return None return None
data = data.split(';')[0] data = data.split(';')[0]
@ -113,7 +113,7 @@ class ShcifcoApi(object):
} }
# 可选参数 # 可选参数
if date: if date:
params['date'] = date params['tradingday'] = date
if period: if period:
params['period'] = period params['period'] = period