Reputation: 232
I tried this in python:
from coinbase.wallet.client import Client
from coinbase.wallet.error import AuthenticationError
import config
class API:
def auth():
try:
client = Client(config.API_KEY, config.API_SECRET)
accounts = client.get_accounts()
for wallet in accounts.data:
print(str(wallet['balance']['currency']) )
except AuthenticationError:
print("Login failed!")
and got a lot of currency names, but none of the ones I own. Why?
Upvotes: 0
Views: 173
Reputation: 232
Got it. For some reason, not all currencies are listed here.
ethAccount = client.get_account('ETH')
print(str(ethAccount['name']) + ' ' + str(ethAccount['balance']['amount']))
Upvotes: 1