XRPL Stream API Documentation
OpenAPI SpecQuick Start
XRPL Stream is a drop-in replacement for any XRPL endpoint. Replace your URL and you're connected.
Your Endpoint
After signing in, you get a unique endpoint URL:
https://s1.xrpl.stream/e/xm_live_your_token_here
wss://s1.xrpl.stream/e/xm_live_your_token_here
Sign in at xrpl.stream/dashboard to get your endpoint.
HTTP JSON-RPC
Send a POST request with your XRPL command as JSON.
Using your endpoint URL (recommended)
curl -X POST https://s1.xrpl.stream/e/YOUR_TOKEN \
-H "Content-Type: application/json" \
-d '{command":"account_info","account":"rN7n3...","ledger_index":"validated"}' Using X-API-Key header
curl -X POST https://s1.xrpl.stream/ \
-H "Content-Type: application/json" \
-H "X-API-Key: xm_live_your_token_here" \
-d '{command":"server_info"}' Without authentication (free tier, lower limits)
curl -X POST https://s1.xrpl.stream/ \
-H "Content-Type: application/json" \
-d '{command":"server_info"}' WebSocket
Connect via WebSocket for subscriptions and streaming.
const ws = new WebSocket('wss://s1.xrpl.stream/e/YOUR_TOKEN');
ws.onopen = () => {
ws.send(JSON.stringify({
command: 'subscribe',
streams: ['ledger']
}));
};
ws.onmessage = (msg) => {
console.log(JSON.parse(msg.data));
}; xrpl.js
import { Client } from 'xrpl';
const client = new Client('wss://s1.xrpl.stream/e/YOUR_TOKEN');
await client.connect();
const info = await client.request({
command: 'account_info',
account: 'rN7n3473SoZtKGBB5JnUB29hMcFSfZaV7v',
ledger_index: 'validated'
});
console.log(info.result.account_data); Python
import requests
resp = requests.post(
'https://s1.xrpl.stream/e/YOUR_TOKEN',
json={
'method': 'account_info',
'params': [{
'account': 'rN7n3473SoZtKGBB5JnUB29hMcFSfZaV7v',
'ledger_index': 'validated'
}]
}
)
print(resp.json()['result']['account_data']) Response Headers
Every response includes rate limit info:
| Header | Description |
|---|---|
X-RateLimit-Limit | Your plan's requests per second |
X-RateLimit-Remaining | Tokens remaining in current window |
Cache-Control | immutable for validated data |
Error Responses
| Status | Error | Meaning |
|---|---|---|
| 401 | invalid_endpoint | Token not recognized |
| 403 | endpoint_disabled | Account deactivated |
| 429 | rate_limited | Exceeded requests per second |
| 429 | monthly_quota_exceeded | Monthly credits exhausted |
| 400 | invalid_json | Request body not valid JSON |
| 400 | missing method or command | No command in payload |
Credits
Each API request consumes a small number of credits from your monthly allowance.
| Plan | Rate Limit | Monthly Credits | Price |
|---|---|---|---|
| No key | 5 req/s | 1M | Free |
| Free | 15 req/s | 10M | Free (key required) |
| Builder | 50 req/s | 100M | $29/mo |
| Pro | 150 req/s | 500M | $79/mo |
| Scale | 300 req/s | 2B | $199/mo |
What You Get
- Full history reads and transaction submission from one endpoint
- Mainnet, testnet, and devnet supported
- Global edge network for low-latency worldwide coverage
- WebSocket subscriptions (ledger, transactions, accounts, order books)
- Automatic failover, load balancing, and self-healing peer mesh
- Free tier with no credit card required
Full History & Transaction Submission
XRPL Stream provides access to the complete XRP Ledger history -every transaction and ledger close since ledger #32570 (the earliest available). Unlike most public endpoints that only keep recent history, XRPL Stream serves validated data from genesis.
The network includes both full history nodes and submission nodes. Historical queries, NFT lookups, and account data are served from optimized read infrastructure, while transaction submissions and live ledger commands are routed to nodes connected directly to the XRP Ledger peer network.
Routing is automatic and transparent -you use the same endpoint for everything. No configuration needed.
Supported Commands
XRPL Stream supports every public XRPL API command. For the complete reference, see the official XRPL API documentation.
Account Methods
account_info account_lines account_channels account_currencies account_nfts account_objects account_offers account_tx gateway_balances noripple_check
Ledger Methods
ledger ledger_closed ledger_current ledger_data ledger_entry
Transaction Methods
tx transaction_entry submit submit_multisigned
Order Book & Path
book_offers book_changes deposit_authorized ripple_path_find amm_info
NFT Methods (via Clio)
nft_info nft_buy_offers nft_sell_offers nft_history nfts_by_issuer
Server Methods
server_info server_state server_definitions fee manifest
Subscriptions (WebSocket)
subscribe unsubscribe -streams: ledger, transactions, transactions_proposed, account activity, order books
Rate Limits & Fair Use
All plans are subject to rate limits that ensure consistent performance across the network.
- Throttling -Requests exceeding your plan's rate limit return HTTP
429withrate_limited. CheckX-RateLimit-RemainingandRetry-Afterheaders. - Burst allowance -Short bursts above the sustained limit are permitted. Prolonged high-throughput traffic should align with your plan tier.
- Abuse prevention -Patterns consistent with scraping or denial-of-service result in temporary IP-level blocks.
- No authentication required for the free public tier -just send requests. Create a free API key for higher limits.
Networks
XRPL Stream supports mainnet, testnet, and devnet. Add /testnet or /devnet to any endpoint path to switch networks. All features (caching, rate limiting, WebSocket subscriptions) work identically across networks.
| Network | HTTP Endpoint | WebSocket | Status |
|---|---|---|---|
| Mainnet | https://s1.xrpl.stream/ | wss://s1.xrpl.stream/ | Live |
| Testnet | https://s1.xrpl.stream/testnet | wss://s1.xrpl.stream/testnet | Live |
| Devnet | https://s1.xrpl.stream/devnet | wss://s1.xrpl.stream/devnet | Live |
HTTP JSON-RPC
curl -X POST https://s1.xrpl.stream/testnet \
-H "Content-Type: application/json" \
-d '{command":"server_info"}' curl -X POST https://s1.xrpl.stream/devnet \
-H "Content-Type: application/json" \
-d '{command":"server_info"}' With Authentication
Works with endpoint tokens, API key headers, and query params:
curl -X POST https://s1.xrpl.stream/e/YOUR_TOKEN/testnet \
-H "Content-Type: application/json" \
-d '{command":"account_info","account":"rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe","ledger_index":"validated"}' curl -X POST https://s1.xrpl.stream/testnet \
-H "Content-Type: application/json" \
-H "X-API-Key: xm_live_your_token_here" \
-d '{command":"server_info"}' WebSocket
const ws = new WebSocket('wss://s1.xrpl.stream/testnet');
ws.onopen = () => {
ws.send(JSON.stringify({
command: 'subscribe',
streams: ['ledger']
}));
};
ws.onmessage = (msg) => {
console.log(JSON.parse(msg.data));
}; xrpl.js
import { Client } from 'xrpl';
// Testnet
const client = new Client('wss://s1.xrpl.stream/testnet');
await client.connect();
// Devnet
const devClient = new Client('wss://s1.xrpl.stream/devnet');
await devClient.connect(); Python
import requests
# Testnet
resp = requests.post(
'https://s1.xrpl.stream/testnet',
json={
'method': 'server_info',
'params': [{}]
}
)
print(resp.json()['result']['info']['network_id']) # 1 GET API
The REST-style GET API also supports network prefixes:
# Testnet transaction lookup curl https://s1.xrpl.stream/v1/testnet/tx/YOUR_TX_HASH # Devnet ledger curl https://s1.xrpl.stream/v1/devnet/ledger/validated
Resources
- XRPL API Reference -complete command documentation
- Ledger History -how XRPL stores and serves historical data
- Introducing Clio -the optimized XRPL API server
- Clio on GitHub -source code and documentation
- xrpl.js -JavaScript/TypeScript client library
- xrpl-py -Python client library