Skip to main content
Version: v1.4

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

MethodDescriptionStatus
eth_getBlockByHashReturns information about a block by hash
eth_getBlockByNumberReturns information about a block by number
eth_getBlockTransactionCountByHashReturns the number of transactions in a block from a block matching the given block hash
eth_getBlockTransactionCountByNumberReturns the number of transactions in a block matching the given block number
eth_getUncleCountByBlockHashReturns the number of uncles in a block from a block matching the given block hash
eth_getUncleCountByBlockNumberReturns the number of uncles in a block from a block matching the given block number
eth_protocolVersionReturns the current Ethereum protocol version
eth_chainIdReturns the chain ID of the current network
eth_syncingReturns an object with data about the sync status or false-copy
eth_coinbaseReturns the client Coinbase address
eth_accountsReturns a list of addresses owned by client
eth_blockNumberReturns the number of most recent block.
eth_callExecutes a new message call immediately without creating a transaction on the blockchain
eth_estimateGasGenerates and returns an estimate of how much gas is necessary to allow the transaction to complete.
eth_gasPriceReturns the current price per gas in wei
eth_feeHistoryReturns fee history
eth_newFilterCreates a filter object, based on filter options, to notify when the state changes (logs)
eth_newBlockFilterCreates a filter in the node, to notify when a new block arrives
eth_newPendingTransactionFilterCreates a filter in the node, to notify when new pending transactions arrive
eth_uninstallFilterUninstalls a filter with given id
eth_getFilterChangesPolling method for a filter, which returns an array of logs which occurred since last poll
eth_getFilterLogsReturns an array of all logs matching filter with given id. Can compute the same results with an eth_getLogs call
eth_getLogsAnytime 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_miningReturns whether the client is actively mining new blocks
eth_hashrateReturns the number of hashes per second that the node is mining with
eth_signReturns an EIP-191 signature over the provided data.
eth_signTransactionSigns and submits a transaction
eth_getBalanceReturns the balance of the account of given address
eth_getStorageAtReturns the value from a storage position at a given address
eth_getTransactionCountReturns the number of transactions sent from an address
eth_getCodeReturns code at a given address
eth_sendTransactionSigns and submits a transaction
eth_sendRawTransactionSubmits a raw transaction
eth_getTransactionByHashReturns the information about a transaction requested by transaction hash
eth_getTransactionByBlockHashAndIndexReturns information about a transaction by block hash and transaction index position
eth_getTransactionByBlockNumberAndIndexReturns information about a transaction by block number and transaction index position
eth_getTransactionReceiptReturns the receipt of a transaction by transaction hash

JSON-RPC methods according to the Web3 Module API

MethodDescriptionStatus
web3_clientVersionReturns the current client version
web3_shaReturns Keccak-256 (not the standardized SHA3-256) of the given data

JSON-RPC methods according to the Net Module API

MethodDescriptionStatus
net_listeningReturns true if client is actively listening for network connections
net_peerCountReturns number of peers currently connected to the client
net_versionReturns the current network protocol version

You can find the complete set of available specs in the Ethereum API Documentation.