API Reference
BlockReq supports the standard Ethereum JSON-RPC 2.0 specification. All methods are available through HTTPS and WSS endpoints.
Base URL
Section titled “Base URL”HTTPS: https://{chain-slug}.blockreq.com/v1/rpc/publicWSS: wss://{chain-slug}.blockreq.com/v1/rpc/publicNeed higher rate limits? Create a private endpoint to get a dedicated API key.
Request Format
Section titled “Request Format”{ "jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}Response Format
Section titled “Response Format”{ "jsonrpc": "2.0", "id": 1, "result": "0x1234567"}Try It Now
Section titled “Try It Now”# No API key needed — uses the public endpointcurl -X POST https://eth-mainnet.blockreq.com/v1/rpc/public \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'Available Methods
Section titled “Available Methods”See the detailed method pages:
- EVM JSON-RPC Methods — Full list of supported EVM methods with RU costs
Rate Limiting
Section titled “Rate Limiting”Requests are rate-limited based on your plan (e.g., Free: 100 req/s, Growth: 1,500 req/s, Premium: 5,000 req/s). If you exceed the limit, you’ll receive an HTTP 429 response:
{ "jsonrpc": "2.0", "id": 1, "error": { "code": -32005, "message": "Rate limit exceeded" }}Error Codes
Section titled “Error Codes”| HTTP Status | Meaning |
|---|---|
| 401 | Missing or invalid API key |
| 402 | Insufficient RU balance |
| 429 | Rate limit exceeded |
| 502 | Upstream node error |
WebSocket Subscriptions
Section titled “WebSocket Subscriptions”Connect via WSS for real-time data:
const ws = new WebSocket("wss://eth-mainnet.blockreq.com/v1/rpc/public");
ws.onopen = () => { ws.send(JSON.stringify({ jsonrpc: "2.0", method: "eth_subscribe", params: ["newHeads"], id: 1 }));};
ws.onmessage = (event) => { console.log(JSON.parse(event.data));};