bitstamp-python-client icon indicating copy to clipboard operation
bitstamp-python-client copied to clipboard

Bitstamp API seems to refuse requests without user-agent

Open Deelight-fr opened this issue 5 years ago • 1 comments

Bitstamp API seems to refuse requests without user-agent.

I added a fake user-agent around here to make it work again: https://github.com/kmadac/bitstamp-python-client/blob/35b9a61f3892cc281de89963d210f7bd5757c717/bitstamp/client.py#L80

Example:

        kwargs['headers'] = {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36'
        }

Deelight-fr avatar May 15 '19 18:05 Deelight-fr

I just tried couple of requests and I did not experience the issue. Could you please paste output of error which you get when user agent is not defined?

kmadac avatar Jun 11 '19 13:06 kmadac