Granite Upgrade Activates in09d:00h:01m:37s
Staking

platform.getStake

GetStake returns the amount of nAVAX that [args.Addresses] have cumulatively staked on the Primary Network. This method assumes that each stake output has only owner This method assumes only AVAX can be staked This method only concerns itself with the Primary Network, not subnets TODO: Improve the performance of this method by maintaining this data in a data structure rather than re-calculating it by iterating over stakers

POST
/ext/bc/P#platform.getStake

JSON-RPC request

jsonrpcstring
methodstring
params

Method parameters

idinteger

Response Body

application/json

application/json

curl -X POST "https://api.avax.network/ext/bc/P#platform.getStake" \  -H "Content-Type: application/json" \  -d '{    "jsonrpc": "2.0",    "method": "platform.getStake",    "params": {},    "id": 1  }'
{
  "jsonrpc": "2.0",
  "result": {
    "staked": "1000000000",
    "stakeds": {},
    "stakedOutputs": [
      "string"
    ],
    "encoding": "hex"
  },
  "id": 1
}
{
  "jsonrpc": "2.0",
  "error": {
    "code": 0,
    "message": "string",
    "data": {}
  },
  "id": 1
}

Is this guide helpful?