false
false
0
The new Blockscout UI is now open source! Learn how to deploy it here

ETH RPC API Documentation

[ Base URL: ://api/eth-rpc ]

This API is provided to support some rpc methods in the exact format specified for ethereum nodes, which can be found here. This is useful to allow sending requests to blockscout without having to change anything about the request. However, in general, the custom RPC is recommended. Anything not in this list is not supported. Click on the method to be taken to the documentation for that method, and check the notes section for any potential differences.

eth_blockNumber

curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "eth_blockNumber", "params": []}'


        

Parameters

Name

Description

Curl

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

eth_chainId

curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "eth_chainId", "params": []}'


        

Parameters

Name

Description

Curl

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

eth_gasPrice

Returns the average gas price per gas in wei.

curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "eth_gasPrice", "params": []}'


        

Parameters

Name

Description

Curl

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

eth_getBalance

The `earliest` parameter will not work as expected currently, because genesis block balances are not currently imported

curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "eth_getBalance", "params": []}'


        

Parameters

Name

Description

Data *required

20 Bytes - address to check for balance

Quantity|Tag *required

Integer block number, or the string "latest", "earliest" or "pending"

Curl

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

eth_getLogs

Will never return more than 1000 log entries. For this reason, you can use pagination options to request the next page. Pagination options params: {"logIndex": "3D", "blockNumber": "6423AC"} which include parameters from the last log received from the previous request. These three parameters are required for pagination.

curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "eth_getLogs", "params": []}'


        

Parameters

Name

Description

Object *required

The filter options

Curl

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

eth_getTransactionByHash

curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "eth_getTransactionByHash", "params": []}'


        

Parameters

Name

Description

Data *required

32 Bytes - transaction hash to get

Curl

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

eth_getTransactionReceipt

curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "eth_getTransactionReceipt", "params": []}'


        

Parameters

Name

Description

Data *required

32 Bytes - transaction hash to get

Curl

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

eth_maxPriorityFeePerGas

curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "eth_maxPriorityFeePerGas", "params": []}'


        

Parameters

Name

Description

Curl

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation