JSON-RPC Overview
curl --request POST \
--url https://api.blockdb.io/v1/evm/rpc \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.blockdb.io/v1/evm/rpc"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.blockdb.io/v1/evm/rpc', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blockdb.io/v1/evm/rpc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.blockdb.io/v1/evm/rpc"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.blockdb.io/v1/evm/rpc")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockdb.io/v1/evm/rpc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyJSON-RPC
JSON-RPC Overview
Use BlockDB as an EVM JSON-RPC endpoint compatible with standard Ethereum execution-client methods.
POST
/
v1
/
evm
/
rpc
JSON-RPC Overview
curl --request POST \
--url https://api.blockdb.io/v1/evm/rpc \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.blockdb.io/v1/evm/rpc"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.blockdb.io/v1/evm/rpc', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blockdb.io/v1/evm/rpc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.blockdb.io/v1/evm/rpc"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.blockdb.io/v1/evm/rpc")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockdb.io/v1/evm/rpc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyOverview
BlockDB exposes a drop-in compatible Ethereum JSON-RPC endpoint for EVM networks. Use it when you want to connect existing tooling (web3 libraries, indexers, bots) without rewriting to BlockDB’s REST endpoint format. This page documents the BlockDB entrypoint and the key conventions you need to call Ethereum JSON-RPC successfully.Endpoint
POST https://api.blockdb.io/v1/evm/rpc?chain_id=<chain_id>
Authentication
Send your API key on every request:Authorization: Bearer <YOUR_API_KEY>
Pricing
JSON-RPC access is included in all BlockDB plans.- Basic Plan: Shared infrastructure, standard rate limits.
- Standard & Platinum Plans: High-throughput access with dedicated support options.
Method Compatibility
We support the classic Ethereum execution-client JSON-RPC method families, including:eth_*net_*
Conventions (important)
Hex encoding
Ethereum JSON-RPC uses hex encoding with specific rules:- Quantities (block numbers, integers): hex with
0xprefix, most compact form (0x0for zero) - Byte arrays (hashes, addresses, calldata): hex with
0xprefix, two hex digits per byte
Block parameter
Many methods accept a “block parameter”. Common values include:"earliest","latest","safe","finalized","pending"- A specific block number encoded as a hex quantity (e.g.,
"0x12A05F").
Examples
Example: eth_getBlockByNumber
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]
}'
Example: eth_call
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": 2,
"method": "eth_call",
"params": [
{
"to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"data": "0x313ce567"
},
"latest"
]
}'
See also
Last modified on March 21, 2026
Was this page helpful?
⌘I