Ethereum JSON-RPC API Reference
BlockEden.xyz provides comprehensive support for the Ethereum JSON-RPC specification, including all standard methods plus debug and trace APIs for advanced use cases. This reference covers all available methods with detailed parameters, return values, and code examples.
Standard RPC Methods
Account & Balance Methods
eth_getBalance
Get the balance of an account at a given block.
Parameters:
address
(string) - 20-byte address to check for balanceblockNumber
(string) - Block number in hex, or "latest", "earliest", "pending"
Returns: Balance in wei as a hex string
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0x742D5Cc6bF2442E8C7c74c7b4Be6AB9d6f10f5B4", "latest"],
"id": 1
}'
// Using Web3.js
const balance = await web3.eth.getBalance('0x742D5Cc6bF2442E8C7c74c7b4Be6AB9d6f10f5B4');
// Using Ethers.js
const balance = await provider.getBalance('0x742D5Cc6bF2442E8C7c74c7b4Be6AB9d6f10f5B4');
eth_getTransactionCount
Get the number of transactions sent from an address (nonce).
Parameters:
address
(string) - 20-byte addressblockNumber
(string) - Block number in hex, or "latest", "earliest", "pending"
Returns: Transaction count as hex string
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": ["0x742D5Cc6bF2442E8C7c74c7b4Be6AB9d6f10f5B4", "latest"],
"id": 1
}'
eth_getCode
Get the code at a given address.
Parameters:
address
(string) - 20-byte addressblockNumber
(string) - Block number in hex, or "latest", "earliest", "pending"
Returns: Code as hex string
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": ["0xA0b86a33E6c0e4A2a2a5FB1C6A6D6a30BF8b6B3a", "latest"],
"id": 1
}'
Block Methods
eth_blockNumber
Get the current block number.
Parameters: None
Returns: Current block number as hex string
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'
eth_getBlockByNumber
Get block information by block number.
Parameters:
blockNumber
(string) - Block number in hex, or "latest", "earliest", "pending"fullTransactions
(boolean) - If true, returns full transaction objects; if false, only hashes
Returns: Block object or null
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["latest", true],
"id": 1
}'
eth_getBlockByHash
Get block information by block hash.
Parameters:
blockHash
(string) - 32-byte block hashfullTransactions
(boolean) - If true, returns full transaction objects; if false, only hashes
Returns: Block object or null
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": ["0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", false],
"id": 1
}'
Transaction Methods
eth_getTransactionByHash
Get transaction information by transaction hash.
Parameters:
transactionHash
(string) - 32-byte transaction hash
Returns: Transaction object or null
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": ["0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"],
"id": 1
}'
eth_getTransactionReceipt
Get transaction receipt by transaction hash.
Parameters:
transactionHash
(string) - 32-byte transaction hash
Returns: Transaction receipt object or null
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"],
"id": 1
}'
eth_sendRawTransaction
Submit a signed transaction to the network.
Parameters:
signedTransaction
(string) - Signed transaction data as hex string
Returns: Transaction hash
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": ["0xf86c808504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a04f4c17305743700648bc4f6cd3038ec6f6af0df73e31757d8a17c7e9e1f3c7fd2a053a8ffdc8ab1f4b5a1e4d9b4a2c3a6b4a6e1e8c4b4d6c6d6e1b4a6e1e8c4b4"],
"id": 1
}'
Smart Contract Interaction
eth_call
Execute a smart contract function call without creating a transaction.
Parameters:
callObject
(object) - Call parametersto
(string) - Contract addressdata
(string) - Encoded function call datafrom
(string, optional) - Sender addressgas
(string, optional) - Gas limitgasPrice
(string, optional) - Gas pricevalue
(string, optional) - Value to send
blockNumber
(string) - Block number in hex, or "latest", "earliest", "pending"
Returns: Return value of the call
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"to": "0xA0b86a33E6c0e4A2a2a5FB1C6A6D6a30BF8b6B3a",
"data": "0x70a08231000000000000000000000000742D5Cc6bF2442E8C7c74c7b4Be6AB9d6f10f5B4"
},
"latest"
],
"id": 1
}'
eth_estimateGas
Estimate gas needed for a transaction.
Parameters:
transactionObject
(object) - Transaction parametersto
(string, optional) - Recipient addressfrom
(string, optional) - Sender addressdata
(string, optional) - Transaction datavalue
(string, optional) - Value to sendgas
(string, optional) - Gas limitgasPrice
(string, optional) - Gas price
Returns: Estimated gas amount as hex string
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [
{
"to": "0x742D5Cc6bF2442E8C7c74c7b4Be6AB9d6f10f5B4",
"value": "0xde0b6b3a7640000"
}
],
"id": 1
}'
Gas and Fee Methods
eth_gasPrice
Get current gas price.
Parameters: None
Returns: Current gas price in wei as hex string
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 1
}'
eth_feeHistory
Get fee history for a range of blocks (EIP-1559).
Parameters:
blockCount
(string) - Number of blocks to return fee history fornewestBlock
(string) - Block number in hex, or "latest", "earliest", "pending"rewardPercentiles
(array) - Array of percentiles to return (0-100)
Returns: Fee history object
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_feeHistory",
"params": ["10", "latest", [25, 50, 75]],
"id": 1
}'
eth_maxPriorityFeePerGas
Get suggested max priority fee per gas for EIP-1559 transactions.
Parameters: None
Returns: Suggested max priority fee per gas as hex string
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_maxPriorityFeePerGas",
"params": [],
"id": 1
}'
Log and Event Methods
eth_getLogs
Get logs matching a filter.
Parameters:
filterObject
(object) - Filter parametersfromBlock
(string, optional) - Starting blocktoBlock
(string, optional) - Ending blockaddress
(string|array, optional) - Contract address(es)topics
(array, optional) - Array of topic filtersblockHash
(string, optional) - Block hash (cannot be used with fromBlock/toBlock)
Returns: Array of log objects
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [
{
"fromBlock": "0x1",
"toBlock": "latest",
"address": "0xA0b86a33E6c0e4A2a2a5FB1C6A6D6a30BF8b6B3a",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
}
],
"id": 1
}'
Network Information
eth_chainId
Get the chain ID of the current network.
Parameters: None
Returns: Chain ID as hex string
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}'
net_version
Get the network ID.
Parameters: None
Returns: Network ID as string
curl -X POST https://ethereum-mainnet.blockeden.xyz/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "net_version",
"params": [],
"id": 1
}'