Historical balances

Hi guys! Im wondering how can I get history of account balances, for example, for last 30 days. I’d like to have an ability to get a snapshot of account balance at least once per day (in perfect way once per timestamp I send as param). Is there such an option in current API version?

Thanks for help in advance!

Hello @ruvaleev_3c. Thank you for reaching out and joining our community!

Unfortunately, getting a snapshot of account balances is not available. However, you can use the Accounts endpoint specifically https://api.exchange.coinbase.com/accounts/{account_id}/ledger as it gives a history of balances but please note that this is not yet the dollar equivalent of the cryptocurrencies.

If you want a cash value, you can calculate a rather close value by using the Products endpoint. Specifically, the https://api.exchange.coinbase.com/products/{product_id}/candles can get the price of a specific cryptocurrency at a given point in time. You can then multiply this value to the balance extracted from the aforementioned endpoint.

We hope this helps! Thank you.