suix_getTotalSupply - Sui

Example code for the suix_getTotalSupply JSON-RPC method. Complete guide on how to use suix_getTotalSupply JSON-RPC in GetBlock Web3 documentation.

This method returns the total supply for a specified coin type on the SUI network. This method is useful for tokenomics analysis, market cap calculations, and monitoring token inflation or deflation over time. The supply value reflects the current total amount of the token in existence on-chain.

Parameters

Parameter
Type
Required
Description

coin_type

string

Yes

The fully qualified type name for the coin

Request Example

cURL
curl -X POST https://go.getblock.io/<ACCESS-TOKEN>/ \
-H "Content-Type: application/json" \
-d '{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "method": "suix_getTotalSupply",
  "params": ["0x2::sui::SUI"]
}'

Response Example

response.json
{
  "jsonrpc": "2.0",
  "result": {
    "value": "10000000000000000000"
  },
  "id": "getblock.io"
}

Response Parameters

Parameter
Type
Description

value

string

Total circulating supply in the smallest unit

Use Cases

  • Calculate market capitalization for tokens

  • Monitor token supply changes over time

  • Analyze tokenomics and inflation rates

  • Build supply tracking dashboards

  • Verify token supply for audits

Error Handling

Error Code
Description

-32602

Invalid params - malformed coin type

-32603

Internal error - node processing issues

null result

Coin type does not have supply tracking

SDK Integration

Last updated

Was this helpful?