X Layer RPC Endpoint
Flat-rate X Layer RPC provider and X Layer RPC node access: free tier, no KYC, HTTP & WebSocket. X Layer mainnet chain ID 196.
https://rpc.swiftnodes.io/rpc/xlayer?key=YOUR_API_KEYwss://rpc.swiftnodes.io/ws/xlayer?key=YOUR_API_KEYX Layer is OKX's Ethereum layer 2, with OKB as its gas token. Access X Layer RPC endpoints with SwiftNodes.
xlayerX Layer on the SwiftNodes fleet, right now
10 of 12 probed RPC methods supported (archive, debug_traceCall, trace_transaction, trace_filter). The gaps are listed per chain in the method support matrix.
Status and latency from our health checks, refreshed about every 5 minutes. Uptime history. Method support probed automatically on 2026-10-04. Network status
X Layer developer facts, measured
- Block time:
- ~1 s (average of the last 1,000 blocks)
- Finality:
- the finalized tag trails the head by ~1,223 blocks (~20 min)
- Historical state:
- readable at least 1,000,000 blocks back
Measured 2026-10-04 through this page's endpoint, re-measured weekly. Limits can differ between the upstream nodes behind it. All chains: measured chain facts.
X Layer Mainnet RPC URL (HTTP)
https://rpc.swiftnodes.io/rpc/xlayer?key=YOUR_API_KEYX Layer WebSocket RPC URL
wss://rpc.swiftnodes.io/ws/xlayer?key=YOUR_API_KEYQuick Start: Connect to X Layer
cURL
curl -X POST https://rpc.swiftnodes.io/rpc/xlayer?key=YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'ethers.js
import { JsonRpcProvider } from "ethers";
const provider = new JsonRpcProvider(
"https://rpc.swiftnodes.io/rpc/xlayer?key=YOUR_API_KEY"
);
const blockNumber = await provider.getBlockNumber();
console.log("X Layer block:", blockNumber);viem
import { createPublicClient, http } from "viem";
const client = createPublicClient({
transport: http("https://rpc.swiftnodes.io/rpc/xlayer?key=YOUR_API_KEY"),
});
const blockNumber = await client.getBlockNumber();web3.py
from web3 import Web3
w3 = Web3(Web3.HTTPProvider("https://rpc.swiftnodes.io/rpc/xlayer?key=YOUR_API_KEY"))
print("X Layer block:", w3.eth.block_number)Add X Layer to MetaMask
https://rpc.swiftnodes.io/rpc/xlayer?key=YOUR_API_KEYwss://rpc.swiftnodes.io/ws/xlayer?key=YOUR_API_KEYFeatures of SwiftNodes for X Layer
- Load-balanced across multiple upstream nodes wherever a chain has more than one, with automatic failover
- Health-checked every 2 minutes with automatic failover
- Free tier available — no credit card or KYC required
- Flat-rate monthly pricing with no per-request fees
- HTTP and WebSocket support
- One API key works across all 75+ supported chains, including X Layer
Rate Limits
| Plan | Price | HTTP req/s | WS msg/s |
|---|---|---|---|
| Free | $0/mo | 2 | 1 |
| Starter | $49/mo | 50 | 25 |
| Growth | $89/mo | 150 | 75 |
| Scale | $149/mo | 300 | 150 |
| Pro | $249/mo | 500 | 250 |
Related L2 & rollup chains
Explore RPC endpoints for other L2 & rollup networks on SwiftNodes:
Ready to start building on X Layer? Connect your wallet and get a free API key in 30 seconds. No email or KYC required.