gRPCGetBalance

sui-mainnet.nodit.io:443 sui.rpc.v2.StateService/GetBalanceunary

Retrieves the balance of a specific coin type for the specified address.

TransportgRPC

Request and response messages are identical for both transports. Only the wire protocol, headers, and client library differ.

Protocol
Native gRPC over HTTP/2 with TLS. Suited to server-side clients and grpcurl.
Content-Type
application/grpc
Headers
x-api-key
Streaming
Server, client, and bidirectional streaming are all supported.
Errors
grpc-status and grpc-message are delivered as HTTP/2 trailers.
Request Body
ownerstringrequired

Required. The owner's Sui address.

coin_typestringrequired

Required. The type name for the coin (e.g., 0x2::sui::SUI).

Responses
coin_typestring

Coin type.

balanceinteger

Total balance.

address_balanceinteger

Address balance portion.

coin_balanceinteger

Coin balance portion.

X-API-KEY
RequestCU10
grpcurl
grpcurl \
  -import-path . -proto sui/rpc/v2/state_service.proto \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -d '{
  "owner": "",
  "coin_type": "0x2::sui::SUI"
}' \
  sui-mainnet.nodit.io:443 sui.rpc.v2.StateService/GetBalance
Response
Example · 200
{
  "balance": {}
}