0.01 credits per call
getTokenAccountBalance on Solana: Returns the token balance of an SPL token account.
Endpoint
Authorization: Bearer <GOLDRUSH_API_KEY>. See authentication.
Parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
account | string | yes | Base-58 encoded SPL token account address. | "7fUAJdStEuGbc3sM84cKRL6yYaaSstyLSU4ve5oovLS7" |
config | object | no | {commitment?}. | {"commitment":"finalized"} |
Returns
object: {context, value: {amount, decimals, uiAmount, uiAmountString}}.
Examples
Errors
| Code | Message |
|---|---|
-32602 | Account is not an SPL token account. |
-32600 invalid request, -32601 method not found, -32602 invalid params.