X Layer logo

X Layer RPC Endpoint

Lightning-fast, completely free, and remarkably reliable. Boost your performance today!

JSON-RPC Endpoint HTTPS
https://mainnet.xlayer-rpc.com
Network
Network name
X Layer
Token
OKB
Decimals
18
Chain ID
0xc4
Add to wallet

Quickstart

Send your first request to the X Layer endpoint with eth_blockNumber.

curl https://mainnet.xlayer-rpc.com \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
Plans
Start free on the public endpoint. Upgrade to Premium for higher throughput and advanced methods, or talk to us about a custom Enterprise setup.
Free
  • No API key required
  • All standard JSON-RPC methods
  • Community rate limit
  • Best-effort availability
Premium
Popular
  • Everything in Free, plus a dedicated API key
  • Higher throughput and rate limits
  • Archive and trace methods
  • 99.9% uptime and priority routing
  • Usage analytics and support
Enterprise
  • Everything in Premium, plus custom throughput
  • Dedicated infrastructure and multi-region routing
  • Custom SLA and 24/7 support
  • Compliance and security add-ons
Ready for more? Upgrade to Premium Try ANKR

X Layer RPC: frequently asked questions

What is the X Layer RPC endpoint?

It is a fast, free, and reliable public JSON-RPC endpoint for the X Layer network, operated by Ankr. Point your wallet, dApp, or backend at the endpoint above to read on-chain data and broadcast transactions with no sign-up required.

Is the X Layer RPC endpoint free to use?

Yes. The public X Layer endpoint is free and rate-limited per IP. For higher limits, dedicated throughput, and an SLA, create a personal API key on Ankr RPC.

How do I connect to X Layer?

Copy the endpoint URL above and add it as a custom RPC network in your wallet, or set it as the provider URL in your library of choice (ethers.js, web3.js, viem, or any JSON-RPC client).

Need more? Explore Ankr RPC.
Made with by Ankr © 2026