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.
Parameters
Parameter
Type
Required
Description
Request Example
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"]
}'const axios = require('axios');
const url = 'https://go.getblock.io/<ACCESS-TOKEN>/';
const payload = {
jsonrpc: '2.0',
id: 'getblock.io',
method: 'suix_getTotalSupply',
params: ['0x2::sui::SUI']
};
axios.post(url, payload, {
headers: { 'Content-Type': 'application/json' }
})
.then(response => console.log(response.data))
.catch(error => console.error(error));Response Example
{
"jsonrpc": "2.0",
"result": {
"value": "10000000000000000000"
},
"id": "getblock.io"
}Response Parameters
Parameter
Type
Description
Use Cases
Error Handling
Error Code
Description
SDK Integration
Last updated
Was this helpful?