Skip to content

suix_getBalance ​

Coin Query API

Return the total coin balance for one coin type, owned by the address owner.

Parameters ​

  • owner · SuiAddress · requiredthe owner's Sui address
  • coin_type · string · optionaloptional type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC), default to 0x2::sui::SUI if not specified.

Result ​

  • Balance · Balance

    • coinObjectCount · integer (uint) · required
    • coinType · string · required
    • fundsInAddressBalance · BigInt<u128> · optionalThe portion of total_balance that resides in the address balance rather than in the coin objects. total_balance is the total amount of funds owned by the address. That is, do not add these two fields together.
    • lockedBalance · map of BigInt<u128> · required
    • totalBalance · 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"
  }
}

The full-stack Sui data layer.