Skip to main content

eth_gasPrice

POST

Returns the current energy price, in sun.Unlike Ethereum's eth_gasPrice, which returns a gas price in wei,TRON returns the price per unit of energy in sun. 1 TRX equals 1,000,000 sun.
Responses
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://tron-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_gasPrice",
"params": []
}'