问题
Hi when writing a simple python script to test Coinbase Features as per documentation I am getting the following results:
get_exchange_rates(currency='GBP')
I encounter a similar problem when I try to get the price of a given currency that is not BTC-USD:
price = client.get_buy_price(currency_pair = 'BTC-GBP')
print(price)
RESULT:
{ "amount": "13788.39", "base": "BTC", "currency": "USD" }
Is this a problem with the API, or am I doing this incorrectly?
**Additional info:**Using API keys with all functionality allowed.
回答1:
It looks like is a known bug which hasn't been published yet. It defaults all the currency pairs to BTC-USD.
You may try instead using requests.get() providing the required headers for authentication or even follow the provided example on the developers site.
来源:https://stackoverflow.com/questions/48255624/coinbase-api-et-exchange-rates-and-get-currencies-failure