gRPCListBalances

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

Retrieves the list of balances for all coin types held by 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.

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.

Responses
coin_typestring

Coin type.

balanceinteger

Total balance.

address_balanceinteger

Address balance portion.

coin_balanceinteger

Coin 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.

X-API-KEY
RequestCU30
grpcurl
grpcurl \
  -import-path . -proto sui/rpc/v2/state_service.proto \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -d '{
  "owner": "",
  "page_size": 50,
  "page_token": ""
}' \
  sui-mainnet.nodit.io:443 sui.rpc.v2.StateService/ListBalances
Response
Example · 200
{
  "balances": [],
  "next_page_token": ""
}