I am trying to use the Python library for Coinbase's API, but I receive a 401 error on every request. I tried with a Sandbox account, with a new API key (with every permission) but I get a 401
on every single authenticated request.
Here is my code:
from coinbase.client import Client
client = Client(api_key, api_secret)
client.get_buy_price() # works fine
client.get_accounts() # not working at all
For example, here is a sample with my sandbox key/secret (this pair has full permissions):
from coinbase.client import Client
API_KEY = "b9hXalyQoZ8z4Dk2"
API_SECRET = "fALfigoBfHU6uLcFbWbmPf5NRwgMX9c6"
client = Client(API_KEY, API_SECRET)
print client.get_buy_price() # gets the price correctly
print client.get_accounts() # raises a 401
We had a temporary outage on the API that affected a small number of customers. It should be fixed now.