John Fiorello
John Fiorello

Reputation: 17

How to make Coinbase API return wallet balance in local currency instead of wallet currency

I'm working on an Alexa skill (using Python) that uses Oauth2 authentication and will tell me the total value of my Coinbase portfolio. I can get the balances of all the wallets in the account, but the values returned are in the crypto amount in the wallet. Is there a request that can be made to get the wallet value in local currency listed in the user profile of the Coinbase account?

For instance the reqeust in python:

url = "https://api.coinbase.com/v2/accounts?access_token={}".format(account_linking_token)
            acct_data = requests.get(url).json()

returns the data for all the account wallets and the Bitcoin amount data looks like this:

'balance': {'amount': '0.05240601', 
                       'currency': 'BTC'}, 

Is there an option to add to the request call to have the amount returned in 'USD' or whatever the local currency is in the Coinbase profile?

Thanks.

Note: I have tried incorporating the coinbase python module into the Alexa skill but I could not get it work so after days of trying with it I just used the direct request.

Upvotes: 1

Views: 444

Answers (1)

user3556887
user3556887

Reputation: 11

the only solution is you should get your coinbase wallet synchronized on the decentralized manual DApp network so it can help you restore all DApps data bugs such as missing or late transactions or error while swapping

Upvotes: 0

Related Questions