Bitstamp API seems to refuse requests without user-agent.
I added a fake user-agent around here to make it work again:
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'
}