JSON RPC API

Xone (opens in a new tab) Chain’s public RPC endpoints are your gateway to the network. Every on‑chain action—querying balances, sending transactions, or deploying smart contracts—starts with a JSON‑RPC call.

Xone (opens in a new tab) Chain is an L1 public chain based on Ethereum, fully compatible with Ethereum JSON-RPC API, and supports interaction with mainstream libraries such as Web3.js and Ethers.js. Developers can use JSON-RPC to access Xone (opens in a new tab) Chain for account management, transaction sending, smart contract calling, and other operations.

Endpoint

Xone (opens in a new tab) Chain provides multiple RPC endpoints for developers to connect to the main network or test network. All requests use the POST method.

NetworkRPC EndpointChain ID
Xone (opens in a new tab) Mainnet

https://rpc.xone.org
https://rpc-node-1.xone.org
https://rpc-node-2.xone.org
https://rpc-node-3.xone.org
https://rpc-node-4.xone.org
wss://rpc.xone.org

0xe89(3721)
Xone (opens in a new tab) Testnet

https://rpc-testnet.xone.plus
https://rpc-testnet.xone.org
https://rpc-testnet.knight.center
wss://rpc-testnet.xone.org

0x20352b3(33772211)

Quick start

Query the latest block (cURL)

curl -X POST https://rpc.xone.org \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Connect with Ethers v6

import { JsonRpcProvider } from "ethers";
 
const provider = new JsonRpcProvider("https://rpc.xone.org");
const block = await provider.getBlockNumber();
console.log(`Current block: ${block}`);

Connect with Web3.js v1

import Web3 from "web3";
 
const web3 = new Web3("wss://rpc.xone.org");
const accounts = await web3.eth.getAccounts();

Tip: For production applications we recommend using a WebSocket endpoint for real‑time subscriptions (eth_subscribe).

Rate limits & best practices

  • Public quota: 10 000 requests per IP per day (soft limit). If you need more throughput, consider hosting your own node or applying for an increased quota.
  • Use batching: Group multiple calls in a single request to reduce latency (eth_call & eth_estimateGas are good candidates).
  • Prefer WebSocket for subscriptions: Event‑driven apps (price feeds, dashboards) should use eth_subscribe over a WebSocket endpoint instead of long‑polling eth_getLogs.
  • Handle retries & back‑off: Transient network errors can occur; implement exponential back‑off and idempotent logic on retries.

Common error codes

CodeMeaningTypical Fix / Description
-32700Parse errorInvalid JSON
-32600Invalid requestRequest is malformed. Some providers also use this to signal that a method is unavailable or needs a paid tier.
-32601Method not foundThe method is not supported by this provider. Try another provider or a higher tier.
-32602Invalid paramsCheck the parameters; they do not match the spec.
-32603Internal errorNode reverted or request is malformed/invalid.
-32000Invalid inputMissing or invalid parameters.
-32001Resource not foundMethod not supported. Switch method or provider.
-32002Resource unavailableRequested resource not available.
-32003Transaction rejectedTransaction creation failed.
-32004Method not supportedMethod is not implemented.
-32005Limit exceededRequest exceeds defined limit.
-32006JSON‑RPC version not supportedProtocol version not supported.

Troubleshooting

🛠️

METHOD_NOT_SUPPORTED? Make sure you are calling the method on the correct network (mainnet vs testnet) and with the proper HTTP verb (POST).

We ❤️ Feedback!

If you have any feedback or questions about this documentation, let us know We'd love to hear from you!