Saltar al contenido principal

cfx_getPoSEconomics

Returns accumulate interest rate of the given epoch

curl --request POST \
--url https://main.confluxrpc.com \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"params": [null],
"method": "cfx_getPoSEconomics"
}'

Params

epoch_number optional

Represents rpc api epoch number param.
oneOf
type : string
Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$

Result

Schema
type : object
  • distributablePosInterest distributablePosInterest
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$
  • lastDistributeBlock lastDistributeBlock
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,15}|0)$
  • totalPosStakingTokens totalPosStakingTokens
    type : string
    Pattern : ^0x([1-9a-f][0-9a-f]{0,63}|0)$

Example

Request

curl -X POST --data \
'{
"jsonrpc": "2.0",
"id": 1,
"method": "cfx_getPoSEconomics",
"params": []
}' \
-H "Content-Type: application/json" \
localhost:12539

Response

{
"distributablePosInterest": "0x13a4fb2ba032dbe9187ecb",
"lastDistributeBlock": "0x5545f21",
"totalPosStakingTokens": "0x8031e2df8079ce5a61c00000"
}