New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poloniex API no longer accessible programmatically #4
Comments
Did you mean you can't download training data? |
Yes, download requests give a 403 now because Poloniex added a CAPTCHA to the API calls. |
Really? I've also tried to download training data just now, nothing strange happened though. |
Interesting. I just tried it through a US proxy and it works. I guess that's a regional restriction that Poloniex has rolled out. Never mind then. |
@ielashi Because you are in a IP-flagged area. Try use a VPN. I need to use proxy as well and it works just fine. You can also check this for more ideas to bypass the restriction. Edit:
@ZhengyaoJiang Your area is not restricted so nothing happens. But in mainland China and some other areas the problem exists. |
Since our work is reported by a Chinese news media. Here is a reference for future users who may need a proxy: A quick fix looks like this (change line45-56 of import requests
def api(self, command, args={}):
"""
returns 'False' if invalid command or if no APIKey or Secret is specified (if command is "private")
returns {"error":"<error message>"} if API error
"""
proxies = {'http': 'socks5://127.0.0.1:1080', # socks5://<usr>:<pwd>@<addr>:<port>
'https': 'socks5://127.0.0.1:1080'} #use only if you are using **socks**
if command in PUBLIC_COMMANDS:
url = 'https://poloniex.com/public?'
args['command'] = command
return json.loads(requests.get(url+urlencode(args), proxies=proxies).text)
else:
return False Edit: Another way is to use transparent proxy, which is easier since no change of code needed. |
Besides, you can use python-poloniex which supports private command as well. The latest version should cover proxy. You can check this as well. |
Looks like the Poloniex API is no longer accessible programmatically. I'll look into alternative APIs and will try to follow up with a pull request for this.
The text was updated successfully, but these errors were encountered: