diff --git a/vn.oanda/test.py b/vn.oanda/test.py index e86559bb..eb3fdb88 100644 --- a/vn.oanda/test.py +++ b/vn.oanda/test.py @@ -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() \ No newline at end of file + input() diff --git a/vn.oanda/vnoanda.py b/vn.oanda/vnoanda.py index 9a77b35c..7bda2504 100644 --- a/vn.oanda/vnoanda.py +++ b/vn.oanda/vnoanda.py @@ -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', @@ -606,4 +606,4 @@ class OandaApi(object): if not self.active: break else: - self.onError(error, -1) \ No newline at end of file + self.onError(error, -1)