So, I’ve gone through all the endpoints (as far as I can tell). I can successfully retrieve all the accounts under my profile. But I don’t see where to find the correct USD balance. It does not appear in the accounts.
There is a way to do this in the Pro API, but I don’t see it (or I’m blind, also possible) in the AT API.
So you can see that I have about $50 in USD total. 20 on hold (account.hold.value) and 30 available to spend (account.available_balance.value). If you add them you get your total balance.
I searched through the entire response, and USD does not appear once in mine. That’s what’s puzzling me. All the other accounts are there. but not USD. And yet, I have a USD balance.
Oh, I forgot I did have that problem at first. I think the default for the limit param is 50, which cuts it off before it returns the USD account. I set the limit to 250 and it worked. See if that works for you.
Edit: Going forward, the 250 limit thing isn’t a good idea. Right now they only return 97 accounts, but if they add more later some could drop off. Better to use the cursor function, and hopefully in the future they will let us get an account by currency instead of just uuid.
What do you mean by simplified? The snippet lsoderman posted is just a part of the response that comes back from Coinbase. We don’t really have any control over what they send back.