diff --git a/examples/ShcifcoDataService/config.json b/examples/ShcifcoDataService/config.json index 7523143f..6f1e00a3 100644 --- a/examples/ShcifcoDataService/config.json +++ b/examples/ShcifcoDataService/config.json @@ -3,7 +3,7 @@ "MONGO_PORT": 27017, "SHCIFCO_IP": "180.169.126.123", - "SHCIFCO_PORT": "45065", + "SHCIFCO_PORT": "10083", "SHCIFCO_TOKEN": "请联系上海中期申请", "SYMBOLS": ["cu1707", "cu1708", "cu1709", "cu1712", diff --git a/vnpy/data/shcifco/vnshcifco.py b/vnpy/data/shcifco/vnshcifco.py index 34ae549d..e7ace167 100644 --- a/vnpy/data/shcifco/vnshcifco.py +++ b/vnpy/data/shcifco/vnshcifco.py @@ -22,8 +22,8 @@ class ShcifcoApi(object): self.ip = ip self.port = port self.token = token - - self.service = 'ShcifcoApi' + + self.service = 'shcifco/dataapi' self.domain = 'http://' + ':'.join([self.ip, self.port]) #---------------------------------------------------------------------- @@ -59,7 +59,7 @@ class ShcifcoApi(object): 'askPrice': float(l[4]), 'askVolume': int(l[5]), 'volume': int(l[6]), - 'openInterest': int(l[7]) + 'openInterest': int(float(l[7])) } return d @@ -97,14 +97,14 @@ class ShcifcoApi(object): 'low': float(l[4]), 'close': float(l[5]), 'volume': int(l[6]), - 'openInterest': int(l[7]) + 'openInterest': int(float(l[7])) } return d #---------------------------------------------------------------------- def getHisBar(self, symbol, num, date='', period=''): """获取历史K线数据""" - path = 'hisbar' + path = 'hisminbar' # 默认参数 params = { @@ -139,7 +139,7 @@ class ShcifcoApi(object): 'low': float(barData[5]), 'close': float(barData[6]), 'volume': int(barData[7]), - 'openInterest': int(barData[8]), + 'openInterest': int(float(barData[8])), 'date': barData[9] # natural day } barList.append(d)