ETH RPC

Developer Documents
Phoenix Intelligence Center

Develop and Build on top of Phoenix

Join the forefront of blockchain innovation by developing on the Phoenix Blockchain. With low transaction fees, high-speed processing, and EVM support.
Join Our Telegram
Overview
Welcome to the ETH RPC API Documentation. This API supports several RPC methods in the exact format specified for Ethereum nodes. It allows you to send requests to Blockscout without modifying your requests.
However, for most use cases, we recommend using the custom RPC methods. Anything not listed here is unsupported. Click on each method to view detailed documentation and check the notes section for any potential differences.

Example Usage

Get the current block number:

				
					curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "eth_blockNumber","params": []}' http://localhost:4000/api/eth-rpc

				
			

eth_blockNumber

Fetches the number of the most recent block.

Request:

				
					{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_blockNumber",
  "params": []
}

				
			

Method: POST

Get the balance of an address:

				
					curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "eth_getBalance","params": ["0x0000000000000000000000000000000000000007", "latest"]}' http://localhost:4000/api/eth-rpc

				
			

eth_getBalance

Fetches the balance of the given address.

Note: The earliest parameter will not work as expected currently because genesis block balances are not imported.

Request:

				
					{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0x0000000000000000000000000000000000000007",
    "latest"
  ]
}

				
			

Method: POST

Get logs from the blockchain:

				
					curl -X POST --data '{"id":0,"jsonrpc":"2.0","method": "eth_getLogs","params": [{"address": "0xc78Be425090Dbd437532594D12267C5934Cc6c6f", "paging_options": {"logIndex": "3D", "blockNumber": "6423AC", "transactionIndex": 53}, "fromBlock": "earliest", "toBlock": "latest", "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}]}' http://localhost:4000/api/eth-rpc

				
			

eth_getLogs

Fetches logs from the blockchain.

Note: This method will never return more than 1000 log entries. Use pagination options to request subsequent pages.

Request:

				
					{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "address": "0xc78Be425090Dbd437532594D12267C5934Cc6c6f",
      "paging_options": {
        "logIndex": "3D",
        "blockNumber": "6423AC",
        "transactionIndex": 53
      },
      "fromBlock": "earliest",
      "toBlock": "latest",
      "topics": [
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
      ]
    }
  ]
}

				
			

Method: POST

Documentation and Best Practices

To ensure a smooth integration and to maximize the utility of the ETH RPC API, here are some suggestions and hints:

Explore the Base URL:
Use Custom RPC Methods:
Check for Updates:
Regularly check the documentation for updates or changes to the API methods. This ensures you are using the latest features and following best practices.
Handle Pagination:
Understand Parameter Limitations:
Secure Your API Requests:
Join the Community:

Phoenix Blockchain: Revolutionizing crypto with low fees, high speed, and unparalleled versatility! 
Get Started