JSON-RPC API
The JSON-RPC is a stateless, lightweight remote procedure call (RPC) protocol. It defines several data structures and the rules around their processing. It is transport agnostic because the concepts can be used within the same process, over sockets, HTTP, or in various message-passing environments. It uses JSON (RFC 4627) as data format.
This page deals with the JSON-RPC API used by EVM execution clients.
JSON-RPC Methods According to Ethereum Client API
Method | Description | Status |
---|---|---|
eth_getBlockByHash | Returns information about a block by hash | ✅ |
eth_getBlockByNumber | Returns information about a block by number | ✅ |
eth_getBlockTransactionCountByHash | Returns the number of transactions in a block from a block matching the given block hash | ✅ |
eth_getBlockTransactionCountByNumber | Returns the number of transactions in a block matching the given block number | ✅ |
eth_getUncleCountByBlockHash | Returns the number of uncles in a block from a block matching the given block hash | ✅ |
eth_getUncleCountByBlockNumber | Returns the number of uncles in a block from a block matching the given block number | ✅ |
eth_protocolVersion | Returns the current Ethereum protocol version | ✅ |
eth_chainId | Returns the chain ID of the current network | ✅ |
eth_syncing | Returns an object with data about the sync status or false-copy | ✅ |
eth_coinbase | Returns the client Coinbase address | ✅ |
eth_accounts | Returns a list of addresses owned by client | ✅ |
eth_blockNumber | Returns the number of most recent block. | ✅ |
eth_call | Executes a new message call immediately without creating a transaction on the blockchain | ✅ |
eth_estimateGas | Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. | ✅ |
eth_gasPrice | Returns the current price per gas in wei | ✅ |
eth_feeHistory | Returns fee history | ✅ |
eth_newFilter | Creates a filter object, based on filter options, to notify when the state changes (logs) | ❌ |
eth_newBlockFilter | Creates a filter in the node, to notify when a new block arrives | ❌ |
eth_newPendingTransactionFilter | Creates a filter in the node, to notify when new pending transactions arrive | ❌ |
eth_uninstallFilter | Uninstalls a filter with given id | ❌ |
eth_getFilterChanges | Polling method for a filter, which returns an array of logs which occurred since last poll | ❌ |
eth_getFilterLogs | Returns an array of all logs matching filter with given id. Can compute the same results with an eth_getLogs call | ❌ |
eth_getLogs | Anytime a transaction is mined, we can see event logs for that transaction by making a request to eth_getLogs and then take actions based off those results | ✅ |
eth_mining | Returns whether the client is actively mining new blocks | ✅ |
eth_hashrate | Returns the number of hashes per second that the node is mining with | ✅ |
eth_sign | Returns an EIP-191 signature over the provided data. | ✅ |
eth_signTransaction | Signs and submits a transaction | ✅ |
eth_getBalance | Returns the balance of the account of given address | ✅ |
eth_getStorageAt | Returns the value from a storage position at a given address | ✅ |
eth_getTransactionCount | Returns the number of transactions sent from an address | ✅ |
eth_getCode | Returns code at a given address | ✅ |
eth_sendTransaction | Signs and submits a transaction | ✅ |
eth_sendRawTransaction | Submits a raw transaction | ✅ |
eth_getTransactionByHash | Returns the information about a transaction requested by transaction hash | ✅ |
eth_getTransactionByBlockHashAndIndex | Returns information about a transaction by block hash and transaction index position | ✅ |
eth_getTransactionByBlockNumberAndIndex | Returns information about a transaction by block number and transaction index position | ✅ |
eth_getTransactionReceipt | Returns the receipt of a transaction by transaction hash | ✅ |
JSON-RPC methods according to the Web3 Module API
Method | Description | Status |
---|---|---|
web3_clientVersion | Returns the current client version | ✅ |
web3_sha | Returns Keccak-256 (not the standardized SHA3-256) of the given data | ✅ |
JSON-RPC methods according to the Net Module API
Method | Description | Status |
---|---|---|
net_listening | Returns true if client is actively listening for network connections | ✅ |
net_peerCount | Returns number of peers currently connected to the client | ✅ |
net_version | Returns the current network protocol version | ✅ |
You can find the complete set of available specs in the Ethereum API Documentation.