getTokenAccountBalance RPC Method
Returns the token balance of an SPL Token account.
Parameters
string
required
Pubkey of Token account to query, as base-58 encoded string
object
optional
Configuration object containing the following fields:
commitment string
optional
Result
The result will be an RpcResponse JSON object with value
equal to a JSON
object containing:
amount: <string>
- the raw balance without decimals, a string representation of u64decimals: <u8>
- number of base 10 digits to the right of the decimal placeuiAmount: <number|null>
- the balance, using mint-prescribed decimals DEPRECATEDuiAmountString: <string>
- the balance as a string, using mint-prescribed decimals
For more details on returned data, the Token Balances Structure response from getBlock follows a similar structure.