suix_getBalance
Return the total coin balance for one coin type, owned by the address owner.
Parameters
owner·SuiAddress· requiredthe owner's Sui addresscoin_type·string· optionaloptional type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC), default to 0x2::sui::SUI if not specified.
Result
Balance·BalancecoinObjectCount·integer(uint) · requiredcoinType·string· requiredfundsInAddressBalance·BigInt<u128>· optionalThe portion oftotal_balancethat resides in the address balance rather than in the coin objects.total_balanceis the total amount of funds owned by the address. That is, do not add these two fields together.lockedBalance· map ofBigInt<u128>· requiredtotalBalance·BigInt<u128>· required
Example
Request
bash
curl https://mainnet-api.inodra.com/v1/jsonrpc \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "suix_getBalance",
"params": [
"0xa6f5a7953a75dc632e696cabe60560522a017bf2fb0bd930d1ec22c06f1ee4e4",
"0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC"
]
}'Response
json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"coinType": "0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC",
"coinObjectCount": 15,
"totalBalance": "15",
"lockedBalance": {},
"fundsInAddressBalance": "42"
}
}