suix_getStakes - Sui
Example code for the suix_getStakes JSON-RPC method. Complete guide on how to use suix_getStakes JSON-RPC in GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Default/Supported Values
Request Example
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "suix_getStakes",
"params": ["0x9c76d5157eaa77c41a7bfda8db98a8e8080f7cb53b7313088ed085c73f866f21"],
"id": "getblock.io"
}'import axios from 'axios';
const data = JSON.stringify({
"jsonrpc": "2.0",
"method": "suix_getStakes",
"params": ["0x9c76d5157eaa77c41a7bfda8db98a8e8080f7cb53b7313088ed085c73f866f21"],
"id": "getblock.io"
});
const config = {
method: 'post',
url: 'https://go.getblock.io/<ACCESS-TOKEN>/',
headers: {
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(response => console.log(JSON.stringify(response.data)))
.catch(error => console.log(error));Response
{
"jsonrpc": "2.0",
"id": "getblock.io",
"result": [
{
"validatorAddress": "0x3befb84f03a24386492bd3b05b1fd386172eb450e5059ce7df0ea6d9d6cefcaa",
"stakingPool": "0x9a95cf69368e31b4dbe8ee9bdb3c0587bbc79d8fc6edf4007e185a962fd906df",
"stakes": [
{
"stakedSuiId": "0xb4eeb46b70f0bebcae832aeef9f7c5db76052ab656e5f81853d0cf701cdbc8eb",
"stakeRequestEpoch": "62",
"stakeActiveEpoch": "63",
"principal": "200000000000",
"status": "Active",
"estimatedReward": "520000000"
}
]
}
]
}Response Parameters
Parameter
Type
Description
Use Cases
Errors Handling
Error
Description
Solution
SDK Integration
Last updated
Was this helpful?