Skip to main content
GET
/
api
/
v1
/
customer
/
solana
/
token-balances
/
token-account
/
{token_account}
Token Balance by Account
curl --request GET \
  --url https://api-gateway.sonarx.com/api/v1/customer/solana/token-balances/token-account/{token_account} \
  --header 'apikey: <api-key>'
{
"as_of_datetime": "2024-06-01 12:00:00.000",
"account_owner": "4G1mhdPXaUUf2yvCHnZSejDCpPxS7ymPzjYHNfzJqdE9",
"token_address": "6kFRCohSxmsXyMYV2uax57BQo224rPaBAf2CpqgduWRn",
"token_account": "35hadxsTpn1xxovQReWeD5jskRdYWBjBEo1tD4pqgTh3",
"balance": 86000119,
"balance_source": 86000119,
"datetime_last_updated": "2024-04-08 07:59:49.000",
"block_slot_last_updated": 258979466
}

Authorizations

apikey
string
header
required

API key for authentication

Path Parameters

token_account
string
required

The SPL token account address (base58 encoded, 32-44 characters)

Example:

"35hadxsTpn1xxovQReWeD5jskRdYWBjBEo1tD4pqgTh3"

Query Parameters

datetime_filter
string
required

Datetime at 10-minute intervals in format YYYY-MM-DDTHH:MM. Minutes must be 00, 10, 20, 30, 40, or 50. Note: Cannot be within the last hour of current UTC time due to data processing lag.

Example:

"2024-06-01T12:00"

include_metadata
boolean
default:false

Include token name and symbol metadata in the response. When true, populates token_name and token_symbol fields from the token registry. This may add slight latency due to additional lookups.

Response

Token balance for the account

Token balance for the specific token account

as_of_datetime
string

The datetime of the balance snapshot

account_owner
string

The wallet owner address

token_address
string

The SPL token mint address

token_account
string

The associated token account address

token_name
string | null

Token name (only if include_metadata=true)

token_symbol
string | null

Token symbol (only if include_metadata=true)

balance
number

The token balance in human-readable format (converted using token decimals)

balance_source
integer

Raw balance in smallest units (lamports for SOL, raw token units for SPL tokens) before decimal conversion

datetime_last_updated
string

When this balance was last updated

block_slot_last_updated
integer

The block slot when this balance was last updated