post https://api.solana.fm/v1/tokens//token-accounts
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 codemessage:<String>, An error message to indicate which part of the query went wrongstatus:<String>, The response status following the error code- 400 = Bad Request (client side)
- 500 = Internal Server Error (server side)
