curl -X POST "https://api.blockdb.io/v1/evm/rpc?chain_id=1" \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBlockByNumber",
"params": ["latest", false]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"number": "0x1213456",
"hash": "0x7b5c0972efb6a0b5be4a4d4a0de5d1abd922478a53f32b2c717a800c862ba9e0",
"parentHash": "0xf78e26c5959a94d6a62ed3837f5dcecf0d3761bf0a502e12a08fd7bc44c8568d",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"miner": "0x0000000000000000000000000000000000000000",
"stateRoot": "0x...",
"transactionsRoot": "0x...",
"receiptsRoot": "0x...",
"logsBloom": "0x...",
"difficulty": "0x0",
"totalDifficulty": "0x...",
"size": "0x...",
"extraData": "0x...",
"gasLimit": "0x1c9c380",
"gasUsed": "0x...",
"timestamp": "0x654f1234",
"transactions": [],
"uncles": []
}
}
JSON-RPC
JSON-RPC Example
Detailed example of executing a standard Ethereum JSON-RPC method through BlockDB.
POST
/
v1
/
evm
/
rpc
curl -X POST "https://api.blockdb.io/v1/evm/rpc?chain_id=1" \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBlockByNumber",
"params": ["latest", false]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"number": "0x1213456",
"hash": "0x7b5c0972efb6a0b5be4a4d4a0de5d1abd922478a53f32b2c717a800c862ba9e0",
"parentHash": "0xf78e26c5959a94d6a62ed3837f5dcecf0d3761bf0a502e12a08fd7bc44c8568d",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"miner": "0x0000000000000000000000000000000000000000",
"stateRoot": "0x...",
"transactionsRoot": "0x...",
"receiptsRoot": "0x...",
"logsBloom": "0x...",
"difficulty": "0x0",
"totalDifficulty": "0x...",
"size": "0x...",
"extraData": "0x...",
"gasLimit": "0x1c9c380",
"gasUsed": "0x...",
"timestamp": "0x654f1234",
"transactions": [],
"uncles": []
}
}
Overview
BlockDB supports standard Ethereum JSON-RPC methods. This page provides a template for making calls to the JSON-RPC endpoint, including the expected request structure and response format.Request Parameters
Standard JSON-RPC 2.0 requests require the following fields in the JSON body:The version of the JSON-RPC protocol. Must be
"2.0".The name of the Ethereum method to be invoked (e.g.,
eth_getBlockByNumber, eth_call, eth_getBalance).A structured array of parameters for the specific method being called.
A unique identifier established by the client that will be echoed back in the response.
Response Fields
The JSON-RPC response follows the standard envelope:The version of the JSON-RPC protocol.
The unique identifier passed in the request.
The method-specific result object. The structure varies depending on the method invoked.
Present only if the request failed. Contains
code, message, and optional data.curl -X POST "https://api.blockdb.io/v1/evm/rpc?chain_id=1" \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBlockByNumber",
"params": ["latest", false]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"number": "0x1213456",
"hash": "0x7b5c0972efb6a0b5be4a4d4a0de5d1abd922478a53f32b2c717a800c862ba9e0",
"parentHash": "0xf78e26c5959a94d6a62ed3837f5dcecf0d3761bf0a502e12a08fd7bc44c8568d",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"miner": "0x0000000000000000000000000000000000000000",
"stateRoot": "0x...",
"transactionsRoot": "0x...",
"receiptsRoot": "0x...",
"logsBloom": "0x...",
"difficulty": "0x0",
"totalDifficulty": "0x...",
"size": "0x...",
"extraData": "0x...",
"gasLimit": "0x1c9c380",
"gasUsed": "0x...",
"timestamp": "0x654f1234",
"transactions": [],
"uncles": []
}
}
Last modified on May 29, 2026
Was this page helpful?
⌘I