Sui
sui.rpc.v2.StateService/ListBalances25 Credits
Return the balances of every coin type of an address
Parameter
| Name | Typ | Beschreibung |
|---|---|---|
| owner | string | Owner address. |
| page_size | uint32 | Maximum number of items per page. The server applies its own default and cap. (optional) |
| page_token | bytes | The next_page_token of the previous response, to fetch the next page (base64 in JSON). (optional) |
Rückgabewert
Typ
ListBalancesResponse
balances: array of Balance (coin_type, balance, address_balance, coin_balance) and next_page_token.
Codebeispiele
# the key of the endpoint goes in the x-token header; add -proto <file> when the node has no gRPC reflection
grpcurl \
-H 'x-token: 7c9e6679-7425-40de-944b-e07fc1f90ae7' \
-d '{
"owner": "0x5ac7c1d6b0a8b3a3e9f2c4d1e7b6a58f3c2d1e0f9a8b7c6d5e4f3a2b1c0d9e8f",
"page_size": 50
}' \
grpc-holy-burned-sky-sui-mainnet.rpcnode.dev:443 \
sui.rpc.v2.StateService/ListBalances