Skip to main content

Get Balance

Gets the balance for a specific coin type using StateService/GetBalance. Optimized for frequent balance checks without fetching full object data.

Service​

sui.rpc.v2.StateService

Parity​

Direct

This method has a direct mapping from the JSON-RPC method suix_getBalance.

Request​

Parameters​

{
"owner": "0x8f8ea04f3b751533db8b8da0a40eba1ca8332a92680f058d83b9459d061aaa54",
"coin_type": "0x2::sui::SUI"
}

Example (grpcurl)​

grpcurl -H "x-api-key: YOUR_API_KEY" \
-d '{"owner":"0x8f8ea04f3b751533db8b8da0a40eba1ca8332a92680f058d83b9459d061aaa54","coin_type":"0x2::sui::SUI"}' \
grpc.surflux.dev:443 \
sui.rpc.v2.StateService/GetBalance
▶Run in Playground

Response​

The response structure is defined by the sui/rpc/v2/state_service.proto definition.

Response Fields​

FieldTypeDescription
balanceBalanceSee proto definition
info

For full field definitions, please refer to the Sui Protobuf definitions.