XDC Gateway exposes standard Ethereum-compatible JSON-RPC over HTTPS and WebSocket.
Paid and partner traffic authenticates with an API key sent in the X-API-Key request header:
curl -H "X-API-Key: YOUR_API_KEY" https://rpc.xdcrpc.com/main/evm/50 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'Manage keys under Dashboard → API Keys. Never expose keys in client-side code you don't control.
POST standard JSON-RPC 2.0 payloads:
{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0xYourAddress", "latest"],
"id": 1
}Limits depend on your plan. Throttled requests receive HTTP 429. Every response carries X-RateLimit-* and X-CU-Remaining headers so you can track consumption. Check current usage on the dashboard.
A machine-readable OpenAPI 3.0 spec covering the RPC Gateway (JSON-RPC proxy), chain discovery, API keys, and usage endpoints is available in the repo at docs/api/openapi.json ↗. Paste it into editor.swagger.io to browse it interactively.
The complete method reference, error-code catalog, and tutorials live at docs.xdcrpc.com ↗.