solana-py icon indicating copy to clipboard operation
solana-py copied to clipboard

message: "Invalid param: not a Token account"

Open amazzuca opened this issue 9 months ago • 0 comments

Hello. I'm trying to get the amount of x token on my wallet, but when I type the following :

`from solana.rpc.api import Client, Pubkey

http_client = Client("https://api.mainnet-beta.solana.com")

token_accounts = http_client.get_token_account_balance( Pubkey.from_string("8z94RRiZg4KqtFu36spCpwt7hTtm1pRpmX9YHY5xD86m") ) print(token_accounts)`

I get the following:

InvalidParamsMessage { message: "Invalid param: not a Token account" }

How can I get the correct Token account?

amazzuca avatar May 10 '24 00:05 amazzuca