API Referense

cfx_gasPrice

Returns current gas price.

Method: POST

https://cfx.nownodes.io

Example body (raw)

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "cfx_gasPrice",
    "params": []
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": "0x3b9aca00",
    "id": 1
}

cfx_epochNumber

Returns highest epoch number.

Method: POST

Example body (raw)

Example response: 200

cfx_getBalance

Returns balance of the given account.

Method: POST

Example body (raw)

Example response: 200

cfx_getAdmin

Returns admin of the given contract

Method: POST

Example body (raw)

Example response: 200

cfx_getSponsorInfo

Return sponsor information of the given contract.

Method: POST

Example body (raw)

Example response: 200

cfx_getStakingBalance

Returns balance of the given account.

Method: POST

Example body (raw)

Example response: 200

cfx_getDepositList

Returns deposit list of the given account.

Method: POST

Example body (raw)

Example response: 200

cfx_getVoteList

Returns vote list of the given account.

Method: POST

Example body (raw)

Example response: 200

cfx_getCollateralForStorage

Returns balance of the given account.

Method: POST

Example body (raw)

Example response: 200

cfx_getCode

Returns the code at given address at given time (epoch number)

Method: POST

Example body (raw)

Example response: 200

cfx_getStorageAt

Returns storage entries from a given contract.

Method: POST

Example body (raw)

Example response: 200

cfx_getStorageRoot

Method: POST

Example body (raw)

Example response: 200

cfx_getBlockByHash

Returns block with given hash.

Method: POST

Example body (raw)

Example response: 200

cfx_getBlockByHashWithPivotAssumption

Returns block with given hash and pivot chain assumption.

Method: POST

Example body (raw)

Example response: 200

cfx_getBlockByEpochNumber

Returns block with given epoch number.

Method: POST

Example body (raw)

Example response: 200

cfx_getBlockByBlockNumber

Returns block with given block number.

Method: POST

Example body (raw)

Example response: 200

cfx_getBestBlockHash

Returns best block hash.

Method: POST

Example body (raw)

Example response: 200

cfx_getNextNonce

Returns the nonce should be filled in the next sending transaction from given address at given time (epoch number)

Method: POST

Example body (raw)

Example response: 200

cfx_sendRawTransaction

Returns the number of transaction in a block with given hash

Method: POST

Example body (raw)

Example response: 200

cfx_call

Method: POST

Example body (raw)

Example response: 200

cfx_getLogs

Returns logs matching the filter provided.

Method: POST

Example body (raw)

Example response: 200

cfx_getTransactionByHash

Get transaction by its hash

Method: POST

Example body (raw)

Example response: 200

cfx_getAccountPendingInfo

Get transaction pending info by account address.

Method: POST

Example body (raw)

Example response: 200

cfx_getAccountPendingTransactions

Get transaction pending info by account address.

Method: POST

Example body (raw)

Example response: 200

cfx_estimateGasAndCollateral

Return estimated gas and collateral usage.

Method: POST

Example body (raw)

Example response: 200

cfx_checkBalanceAgainstTransaction

Check if user balance is enough for the transaction.

Method: POST

Example body (raw)

Example response: 200

cfx_getBlocksByEpoch

Method: POST

Example body (raw)

Example response: 200

cfx_getSkippedBlocksByEpoch

Method: POST

Example body (raw)

Example response: 200

cfx_getTransactionReceipt

Method: POST

Example body (raw)

Example response: 200

cfx_getAccount

Return account related states of the given account.

Method: POST

Example body (raw)

Example response: 200

cfx_getInterestRate

Returns interest rate of the given epoch.

Method: POST

Example body (raw)

Example response: 200

cfx_getAccumulateInterestRate

Returns accumulate interest rate of the given epoch.

Method: POST

Example body (raw)

Example response: 200

cfx_getPoSEconomics

Returns accumulate interest rate of the given epoch.

Method: POST

Example body (raw)

Example response: 200

cfx_getStatus

Method: POST

Example body (raw)

Example response: 200

cfx_getBlockRewardInfo

Returns block reward information in an epoch.

Method: POST

Example body (raw)

Example response: 200

cfx_clientVersion

Return the client version as a string.

Method: POST

Example body (raw)

Example response: 200

cfx_getSupplyInfo

Returns information about total token supply

Method: POST

Example body (raw)

Example response: 200

cfx_getPoSRewardByEpoch

Get rewards information of a PoS epoch by it's correspond PoW epoch number. Only PoW epoch happen's at PoS epoch end will have rewards information. Others will return null.

Method: POST

Example body (raw)

Example response: 200

cfx_maxPriorityFeePerGas

Returns the current priority fee per gas in Drip.

Method: POST

Example body (raw)

Example response: 200

cfx_feeHistory

Returns transaction base fee per gas and effective priority fee per gas for the requested/supported epoch range.

Method: POST

Example body (raw)

Example response: 200

cfx_getFeeBurnt

Returns the total burnt tx gas fee by 1559. Added in Conflux-Rust v2.4.0.

Method: POST

Example body (raw)

Example response: 200