Closed Mrfranken closed 6 months ago
Hi! Seems like the RPC method to fetch balance was not implemented. I just added it. You can download the package again. In order to get balances of tokens, you have to first fetch all token accounts, which you are doing by the get_token_accounts_by_owner
method above, and then run a loop with each token account public key being passed to get_token_account_balance
method, which will return all information regarding the balance of tokens held in each token account :)
Check out example code in the docs here, just added: https://solathon.vercel.app/clients/client#get_token_account_balance
Closing due to inactivity, feel free to re-open for further queries
hi, I own USDC and other tokens in my account, I want to get how many USDC in my account, what should I do? I've tried method "get_token_accounts_by_owner", just like
but it only shows the account string, seems solana is so different from evm chain, could u help to give a example? many thx