curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"method": "getBalance",
"network": "MAINNET"
}'
{
"method": "getBalance",
"data": {
"balance": "239170",
"token_balances": {
"btknrt1x9helfvakyz8y53lzwt2wjen7d30ft6skpu69eydvndqt5uxsr4q0zvugn": {
"balance": "999999910",
"token_metadata": {
"raw_token_identifier": "316f9fa59db10472523f1396a74b33f362f4af50b079a2e48d64da05d38680ea",
"token_public_key": "025bd027cd332a40e21f16cb6e9c6aee9ac11e3dff9508081b64fa8b27658b18b6",
"token_name": "Merica",
"token_ticker": "USA",
"decimals": 6,
"max_supply": "21000000000000"
}
}
},
"encoding": "hex"
}
}
privy-authorization-signature
Request authorization signature. If multiple signatures are required, they should be comma
separated.
Path Parameters
Body
Available options: getBalance
Available options: MAINNET
, REGTEST
Returns
Available options: getBalance
The balance and token holdings of the wallet.
Native Spark balance in satoshis.
A mapping of token Spark addresses to token data.