Get Token Accounts

This API is used to get all token account addresses and balances under a specified wallet. The returned results can be used as parameters for the Close Empty Token Accounts and Burn Token Accounts APIs

FreePlusProEnterpriseCredit Usage
✅✅✅✅50

Response Data

"err": false, // Error or not
    "res": [
      {
        "account": "9q5yPhAm5vs3ednT6HEyqiHw2y8HQzq2nGGj2gwVU4ti", //token account address
        "amount": "0", //token amount
        "decimals": 9, //token decimals
        "image": "image url", //token image url
        "name": "Marinade staked SOL (mSOL)", //token name
        "state": 1, //Token status: Returns 1 or 2. 1 indicates that the token can be burned normally; 2 indicates that the token is frozen and cannot be burned.
        "symbol": "mSOL", //token symbol
        "token": "mSoLzYCxHdYgdzU15g5QSh3i5K3zrKZK7ytfqcJm7So", //token address
        "tokenProgram": "TokenkegwfeZyiNwAJbNbGKPFXCfuBvf9Ss623VQ5DA"
      },
      {
        "account": "tgpREZdPMozfgwgKwTSN3Ue2V21mGpnLQ6V2FhPqWPr",
        "amount": "0",
        "decimals": 6,
        "image": "image url",
        "name": "working  Anthropic",
        "state": 1,
        "symbol": "$WAHP",
        "token": "8VRb4Hyybfgof6ZNAvcUohBpqfMep62G572whxc3pump",
        "tokenProgram": "TokenzQgBNbLqP5VEhdkAf6EPFLC1PHnBqCXEpPxuEj"
      }
    ]}   

Response Parameters visualization reference

Query Params
string
required

Wallet id

string
required

The account type to query. true indicates querying all token accounts with a balance of 0, while false indicates querying all token accounts with a non-zero balance.

Response

Language
LoadingLoading…
Response
Choose an example:
application/json