const response = await fetch('http://srpc.solapi.pro/?api_key=<api-key>', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenAccountBalance",
"params": [
"7fUAJdStEuGbc3sM84cKRL6yYaaSstyLSU4ve5oovLS7"
]
}),
});
const data = await response.json();
{
"jsonrpc": "2.0",
"id": "1",
"result": {
"context": {
"slot": 1114
},
"value": {
"amount": "9864",
"decimals": 2,
"uiAmount": 98.64,
"uiAmountString": "98.64"
}
}
}