Conflicts:
	vn.trader/ctaAlgo/ctaBacktesting.py
	vn.trader/ctpGateway/ctpGateway.py
This commit is contained in:
lyic 2016-04-02 17:06:53 +08:00
commit db7028cea1
2 changed files with 7 additions and 6 deletions

View File

@ -19,7 +19,7 @@ if __name__ == '__main__':
#api.getPrices({'instruments': 'EUR_USD'})
# 获取历史数据,失败
#api.getPriceHisory({'instruments': 'EUR_USD',
#api.getPriceHisory({'instrument': 'EUR_USD',
#'granularity': 'D',
#'candleFormat': 'midpoint',
#'count': '50'})
@ -102,4 +102,4 @@ if __name__ == '__main__':
#api.getAutochartist({'instrument': 'EUR_USD'})
# 阻塞
input()
input()

View File

@ -87,7 +87,7 @@ class OandaApi(object):
self.initFunctionSetting(FUNCTIONCODE_GETPRICES, {'path': '/v1/prices',
'method': 'GET'})
self.initFunctionSetting(FUNCTIONCODE_GETPRICEHISTORY, {'path': 'v1/candles',
self.initFunctionSetting(FUNCTIONCODE_GETPRICEHISTORY, {'path': '/v1/candles',
'method': 'GET'})
self.initFunctionSetting(FUNCTIONCODE_GETACCOUNTS, {'path': '/v1/accounts',
@ -177,8 +177,9 @@ class OandaApi(object):
#----------------------------------------------------------------------
def exit(self):
"""退出接口"""
self.active = False
self.reqThread.join()
if self.active:
self.active = False
self.reqThread.join()
#----------------------------------------------------------------------
def initFunctionSetting(self, code, setting):
@ -605,4 +606,4 @@ class OandaApi(object):
if not self.active:
break
else:
self.onError(error, -1)
self.onError(error, -1)