Quickstart
curl https://hub.xrpl-commons.org/rpc \ -H 'Content-Type: application/json' \ -H 'X-API-Key: YOUR_KEY' \ -d '{"method":"ledger","params":[{"ledger_index":"validated"}]}'
# Python, with xrpl-py: pip install xrpl-py from xrpl.clients import JsonRpcClient from xrpl.models.requests import Ledger client = JsonRpcClient("https://hub.xrpl-commons.org/rpc") print(client.request(Ledger(ledger_index="validated")).result)# Python, with a key: xrpl-py's client sends no custom headers, so post directly. import requests res = requests.post("https://hub.xrpl-commons.org/rpc", headers={"X-API-Key": "YOUR_KEY"}, json={"method": "ledger", "params": [{"ledger_index": "validated"}]}) print(res.json()["result"])
// JavaScript, plain fetch. xrpl.js's Client needs WebSocket, which the hub does not offer. const res = await fetch("https://hub.xrpl-commons.org/rpc", { method: "POST", headers: { "Content-Type": "application/json", "X-API-Key": "YOUR_KEY" }, body: JSON.stringify({ method: "ledger", params: [{ ledger_index: "validated" }] }), }); console.log((await res.json()).result);
- Standard XRPL JSON-RPC. The same request bodies as any xrpld or Clio server.
- One address for every ledger. The hub routes each request to the servers holding that part of the chain, and falls back to the full-history servers when a ledger is not on the fast path.
- No WebSocket. No subscriptions. In JavaScript use fetch; xrpl.js's Client needs WebSocket.
Limits
| Rate | Access | Counted per | How to get it |
|---|---|---|---|
| 60 / min | Anonymous | IP address | Nothing to do. Just send requests. |
| 600 / min | With a key | Key | Ask us on Discord, then send it in the X-API-Key header. |
| 10 / min | Ledgers older than ~1 hour | IP address | Applies to both. Any request the hub has to send to the full-history servers. |
Over a limit, the hub answers 429 Too Many Requests. A key raises the ceiling.
A key it does not recognise answers 403 Forbidden. Check the value in your X-API-Key header.
Keys and peering
Reserve a peer slot
For nodes that need a guaranteed connection to the hub. Bring your node public key.
Ask on DiscordWhy this exists
XRPL Commons runs the hub as public infrastructure, so that reading the XRP Ledger does not start with syncing a node. It is free and not metered per request.
Traffic and response times are public on the status page. If your project depends on the hub, tell us; it helps us plan capacity.