Retrieve All Token Accounts By Owner

This endpoint returns you all the accounts (e.g. token accounts, NFTs, cNFTs) owned by the provided account hash

🚧

CNFTs owned by an account is not fully supported yet. The endpoint is still in Beta mode.

Maximum number of ATAs to be returned is capped at 100 accounts.

Parameters

  • account-hash - The account/wallet hash to query for (Only supports user's wallet hash)
  • tokenType - (optional) To filter the results by the retrieved token account type
    • Accepts one or more of the following field in string:
      ["CompressedNonFungible","Fungible","Legacy","NonFungible"]
    • CompressedNonFungible:Filters the query result for all cNFT accounts
    • Fungible:Filters the query results for all Fungible tokens accounts held by the wallet
    • Legacy:Filters the query results for all the token accounts that holds legacy tokens
    • NonFungible:Filters the query results for all the Non Fungible Token accounts held by the wallet

Results

Valid Account Hash

<object>- a JSON object containing:

  • pubkey:<String>, The account pubkey that you queried for
  • tokens:<HashMap<String, object>>, A key-value mapping of the token accounts / token address to the token's account data

Invalid Account Hash

<object> - a JSON object containing the following fields if the requested account doesn't exist

  • code:<integer>, The error code
  • message:<String>, An error message to indicate which part of the query went wrong
  • status:<String>, The response status following the error code
    • 400 = Bad Request (client side)
    • 500 = Internal Server Error (server side)
Language
Click Try It! to start a request and see the response here!