Forums

Please add a public API to the whitelist

Hello, I got the following error:

Cannot connect to proxy. Socket error: Tunnel connection failed: 403 Forbidden.

UnboundLocalError: local variable 'response' referenced before assignment

18:26 ~ $ curl -X GET "http://api-sandbox.oanda.com/v1/candles?instrument=EUR_USD&count=2&candleFormat=midpoint&granularity=D&dailyAlignment=0&alignmentTimezone=Americ a%2FNew_York" <HTML> <HEAD> Access Denied </HEAD> <BODY>

<h1>Access Denied</h1>

<p> Access to arbitrary websites is not available from free accounts; you can only access sites that are on our <a href="http://www.pythonanywhere.com/whitelist">whitelist</a>. If you want to suggest something to add to our whitelist drop us a line at support@pythonanywhere.com. It will have to have an official public API. </p>

<p> Alternatively, you can sign up for a paid account at <a href="http://www.pythonanywhere.com/account/">http://www.pythonanywhere.com/account/</a> </p> <p> If you have already got a paid account and you're still getting this messge, you may need to reload your web app (from the "Web" tab) or restart your consoles. If that doesn't help, drop us a line at support@pythonanywhere.com. </p>

</BODY>18:26 ~ $ `

Please add http://api-sandbox.oanda.com and http://api-fxpractice.oanda.com to the whitelist. Here are the docs: http://developer.oanda.com/docs/v1/guide/

Thanks

Thanks for the suggestion! That's done.