Skip to content

StateService.ListBalances ​

List balances through sui.rpc.v2.StateService/ListBalances on Inodra's Sui gRPC endpoint.

Endpoint ​

NetworkHostAuthentication
Mainnetmainnet-grpc.inodra.com:443x-api-key metadata
Testnettestnet-grpc.inodra.com:443x-api-key metadata

Full method name: sui.rpc.v2.StateService/ListBalances. Unary: one request, one response. Get a key from the dashboard; the same key works on every protocol.

Request: ListBalancesRequest ​

Request message for LiveDataService.ListBalances.

FieldTypeDescription
ownerstringRequired. The owner's Sui address.
page_sizeuint32The maximum number of balance entries to return. The service may return fewer than this value. If unspecified, at most 50 entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
page_tokenbytesA page token, received from a previous ListBalances call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListBalances must match the call that provided the page token.

Response: ListBalancesResponse ​

Response message for LiveDataService.ListBalances. Return the total coin balance for all coin types, owned by the address owner.

FieldTypeDescription
balancesrepeated BalanceThe list of coin types and their respective balances.
next_page_tokenbytesA token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Balance ​

Balance information for a specific coin type.

FieldTypeDescription
coin_typestringThe type of the coin (e.g., 0x2::sui::SUI).
balanceuint64The total balance of coin_type in its smallest unit. This is the sum of all spendable amounts of coin_type (address_balance and coin_balance).
address_balanceuint64The balance of Balance<T> in this address's Address Balance.
coin_balanceuint64The balance of all Coin<T> objects owned by this address.

grpcurl ​

bash
grpcurl -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "owner": "0x0000000000000000000000000000000000000000000000000000000000000002",
  "page_size": 20
}' \
  mainnet-grpc.inodra.com:443 \
  sui.rpc.v2.StateService/ListBalances

Server reflection is enabled, so no proto files are needed for grpcurl. Field masks are written as {"paths": [...]}.

TypeScript ​

typescript
import { GrpcWebFetchTransport, SuiGrpcClient } from '@mysten/sui/grpc'

const transport = new GrpcWebFetchTransport({
  baseUrl: 'https://mainnet-grpc.inodra.com',
  meta: { 'x-api-key': process.env.INODRA_API_KEY! }
})
const client = new SuiGrpcClient({ network: 'mainnet', transport })

const { balances, cursor } = await client.listBalances({
  owner: '0x0000000000000000000000000000000000000000000000000000000000000002'
})
console.log(balances, cursor)

Uses the typed SuiGrpcClient method from @mysten/sui v2 that calls this RPC. Install with npm install @mysten/sui and set INODRA_API_KEY. The gRPC gateway guide covers native gRPC transport for backends.

Credits ​

1 credit per item actually returned; an empty page bills the 1-credit minimum. See credits and billing for the full table.

JSON-RPC equivalent ​

Replaces suix_getAllBalances. The JSON-RPC to gRPC migration guide has before and after code for the common calls.

The full-stack Sui data layer.