platform.getStake

Get the amount of nAVAX staked by a set of addresses. The amount returned does not include staking rewards.

Parameters:

  • addresses - []string - An array of address strings.

Returned Value:

  • staked - string - The amount staked.

  • stakedOutputs - []string - An array of the amount staked per address.

  • encoding - string - Specifies the format for the returned outputs

Example Response:

{
  "jsonrpc": "2.0",
  "result": {
    "stakeds": {
      "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z": "25000000000"
    },
    "stakedOutputs": [
      "0x000021e67317cbc4be2aeb00677ad6462778a8f52274b9d605df2591b23027a87dff00000007000000064198bf46000000000000000000000001000000010ed1bea258fca42e094ccc625698eab5f7e01d190f0f332d"
    ],
    "encoding": "hex"
  },
  "id": 1
}
curl https://mainnet.avalanche.validationcloud.io/v1/<YOUR_API_KEY_HERE>/ext/bc/P \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
    "jsonrpc": "2.0",
    "method": "platform.getStake",
    "params": {
        "addresses": [
            "P-avax1pmgmagjcljjzuz2ve339dx82khm7q8getlegte"
        ]
    },
    "id": 1
}
}'

Last updated