ListBalances
gRPC
RPC Method
sui.rpc.v2.StateService/ListBalancesRetrieves the list of balances for all coin types held by the specified address.
Proto files required
Running the examples below requires the official Sui proto files. Download the proto files, then set the example's -import-path relative to the proto root (the -proto path in the examples is relative to the proto root).
Request Message
ownerstringrequired
Required. The owner's Sui address.page_sizeinteger
The 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_tokenstring
A 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 Message
The list of coin types and their respective balances.
coin_typestring
Coin type.balanceinteger
Total balance.address_balanceinteger
Address balance portion.coin_balanceinteger
Coin<T> balance portion.next_page_tokenstring
A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.grpcurl
grpcurl \-import-path . \-proto sui/rpc/v2/state_service.proto \-H 'X-API-KEY: nodit-demo' \-d '{"page_size": 50}' \sui-mainnet.nodit.io:443 \sui.rpc.v2.StateService/ListBalances