Create Your First Endpoint
An endpoint is your gateway to a blockchain network. Each endpoint includes:
- An HTTPS RPC URL for standard calls
- A WSS URL for WebSocket subscriptions
- A unique API Key
1. Navigate to Endpoints
Section titled “1. Navigate to Endpoints”From the Dashboard, click Endpoints in the left sidebar (or visit /dashboard/endpoint).
2. Click “Add Endpoint”
Section titled “2. Click “Add Endpoint””Click the + Add Endpoint button in the top right corner.
3. Select a Blockchain
Section titled “3. Select a Blockchain”Choose from the available networks:
| Network | Chain ID | Slug | Features |
|---|---|---|---|
| Ethereum | 1 | eth-mainnet | Full + Archive |
| Base | 8453 | base-mainnet | Full + Archive |
| BSC | 56 | bsc-mainnet | Full + Archive |
| Arbitrum One | 42161 | arb-mainnet | Full (Pruned) |
4. Name Your Endpoint (Optional)
Section titled “4. Name Your Endpoint (Optional)”Give your endpoint a descriptive name, e.g., “My DeFi Bot” or “Production Backend”.
5. Start Using Your Endpoint
Section titled “5. Start Using Your Endpoint”After creation, you’ll see your RPC URLs:
HTTPS: https://eth-mainnet.blockreq.com/v1/rpc/YOUR_API_KEYWSS: wss://eth-mainnet.blockreq.com/v1/ws/YOUR_API_KEYExample Usage
Section titled “Example Usage”curl:
curl -X POST https://eth-mainnet.blockreq.com/v1/rpc/YOUR_API_KEY \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'JavaScript (ethers.js v6):
import { JsonRpcProvider } from "ethers";
const provider = new JsonRpcProvider("https://eth-mainnet.blockreq.com/v1/rpc/YOUR_API_KEY");const blockNumber = await provider.getBlockNumber();console.log("Latest block:", blockNumber);Python (web3.py):
from web3 import Web3
w3 = Web3(Web3.HTTPProvider("https://eth-mainnet.blockreq.com/v1/rpc/YOUR_API_KEY"))print("Latest block:", w3.eth.block_number)Built-in RPC Tester
Section titled “Built-in RPC Tester”Each endpoint includes a built-in RPC tester. Click the Test button to open it, select an RPC method, and run it directly from your browser.