hootnot / oanda-api-v20

OANDA REST-V20 API wrapper. Easy access to OANDA's REST v20 API with oandapyV20 package. Checkout the Jupyter notebooks!
MIT License
402 stars 107 forks source link

Trouble connecting to the API #175

Closed lanceculnane closed 3 years ago

lanceculnane commented 3 years ago

I've suddenly not been able to connect to the API and am getting the error below. I am using macOS Catalina and python 2.7.14_3. Oanda recently announced there may be issues with firewalls but I still get this even when I turn my firewall off... I'm guessing there is something which is no longer working with the requests package (which is used in oandapyV20 API)? Maybe a security issue with https? Anyone else suddenly seeing this? I've tried updating pip, brew update etc

(Caused by SSLError(SSLError(1, u'[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:661)'),))

hootnot commented 3 years ago

the changes you refer to are IP-based settings. oandapyV20 does not use IP-based settings, but the URL's as in the oanda docs. (the same the maintenance message refers to). I have a system running 24/7 and it is running without issues.

You can use curl to figure out if it is you or OANDA: https://developer.oanda.com/rest-live-v20/account-ep/ check the curl examples. If curl gives you data, it is not OANDA.

Run some small oandapyV20 example to check if you have consistency in errors.

Python 2.7 is not maintained anymore. My advise is you port your code to Python 3

I will close this issue.

lanceculnane commented 3 years ago

Thanks! And thanks for making oandapyV20! It's been a lifesaver for me and is very intuitive. The documentation is also excellent!

lanceculnane commented 3 years ago

Update (in case anyone else finds it helpful): I uninstalled anaconda and reinstalled it and made sure everything pointed to python3 etc and now it works. Thanks again!