Quickstart
- Sign in with Google, GitHub, email or a wallet.
- Open Billing & Payments and top up your balance (from $10).
- Copy an endpoint from Marketplace, or create a key under API Keys.
- Send a JSON-RPC request:
curl https://rpc.nadcab.com/ethereum/ncl_YOUR_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'Endpoints
Every endpoint has the same shape. The network name comes from the Chainlist; testnets use their own names.
https://rpc.nadcab.com/<network>/<api-key>
wss://rpc.nadcab.com/<network>/<api-key>
# examples
https://rpc.nadcab.com/ethereum/ncl_…
https://rpc.nadcab.com/base-sepolia/ncl_…
wss://rpc.nadcab.com/solana/ncl_…Requests must be POST with a JSON body. Batch requests (JSON arrays) are supported and each call in the batch is metered separately.
Libraries
ethers v6
import { JsonRpcProvider } from "ethers";
const provider = new JsonRpcProvider("https://rpc.nadcab.com/ethereum/ncl_YOUR_KEY");
console.log(await provider.getBlockNumber());viem
import { createPublicClient, http } from "viem";
import { base } from "viem/chains";
const client = createPublicClient({ chain: base, transport: http("https://rpc.nadcab.com/base/ncl_YOUR_KEY") });
await client.getBlockNumber();@solana/web3.js
import { Connection } from "@solana/web3.js";
const connection = new Connection("https://rpc.nadcab.com/solana/ncl_YOUR_KEY");
await connection.getSlot();WebSockets
Use the same key over WSS. Each message sent by your client is metered by its method.
const ws = new WebSocket("wss://rpc.nadcab.com/ethereum/ncl_YOUR_KEY");
ws.onopen = () => ws.send(JSON.stringify({ jsonrpc: "2.0", id: 1, method: "eth_subscribe", params: ["newHeads"] }));
ws.onmessage = (event) => console.log(JSON.parse(event.data));Billing & compute units
Usage is prepaid. Each request is charged in compute units (CU) at $0.375 per 1M CU. Standard methods cost 20 CU; metadata methods such as eth_chainId, net_version, web3_clientVersion and eth_syncing cost 0 CU. See Pricing.
Errors
| HTTP | JSON-RPC code | Meaning |
|---|---|---|
| 401 | -32001 | Invalid Nadcab API key |
| 402 | -32002 | Insufficient wallet balance. Top up to continue |
| 403 | -32003 | API key is revoked |
| 429 | -32005 | Daily request limit reached for this key |
| 404 | -32601 | Unknown endpoint path |
| 400 / 405 / 413 | -32600 | Unreadable or oversized body, or a non-POST request |
| 502 / 503 | -32603 | Upstream unavailable. Retry with backoff |
Key management
- Create up to 50 keys per account; give each app or environment its own key.
- Tags and descriptions help you find keys in statistics.
- Revoking a key takes effect within 30 seconds across the gateway.
- A new key's full secret is shown once. Store it in your secret manager.