User's Token Accounts

This endpoint returns you a list of token accounts owned by the user with an option to filter by Token Mints

🚧

This endpoint is still in the Beta stage.

Parameters

  • tokenHashes - a list of token mints to filter the token accounts by

Results

Valid Response

<object> - A JSON object containing the following fields:

  • tokenAccounts: [<object>], an array of token account JSON objects owned by the user that contains the following fields:

Example of a valid response:

{
    "tokenAccounts": [
        {
            "_id": "4y91Zqoqqp9vePUb1YbqFCP79SXQoBbmnUL9nmfGg1yB",
            "info": {
                "isNative": false,
                "mint": "2emYMetySwE7Xh6qrG1AwAQ3TDvrLkUSpSZ5AjcWCc7B",
                "owner": "nix9RErnQYXpuf329ntPgSzThogtfeyUempD7zDrnSH",
                "state": "initialized",
                "tokenAmount": {
                    "amount": "1000000",
                    "decimals": 6,
                    "uiAmount": 1.0,
                    "uiAmountString": "1"
                }
            },
            "slot": 259299487
        },
        {
            "_id": "5DTsxz9qdn7wLKSwmTsev2RoiNH6HUCBJ9gnNA5Dvpfn",
            "info": {
                "isNative": false,
                "mint": "H4cyrtm9ba6htpYnF33ZTjw1vn34cZTZTkHM1pTXfM4N",
                "owner": "nix9RErnQYXpuf329ntPgSzThogtfeyUempD7zDrnSH",
                "state": "initialized",
                "tokenAmount": {
                    "amount": "0",
                    "decimals": 0,
                    "uiAmount": 0.0,
                    "uiAmountString": "0"
                }
            },
            "slot": 259305680
        }
    ]
}

Invalid Response

<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!