Stream live price feeds, orderbook updates, and ledger events over WebSocket. Zero polling, instant delivery.
XRPL.to provides persistent WebSocket connections for streaming live market data directly to your application. Instead of polling REST endpoints every few seconds, open a single connection and receive instant push updates as prices change, trades execute, and new ledgers close.
WebSocket streams are available without authentication for public data. Connections are lightweight, support automatic reconnection, and deliver sub-second latency for all token price movements on the XRP Ledger DEX.
wss://api.xrpl.to/ws/sync/
Subscribe to multiple tokens at once. Receive price, volume, and market cap updates in real time.
wss://api.xrpl.to/ws/token/:md5
Stream data for a specific token by its MD5 identifier. Ideal for detail pages and focused monitors.
wss://api.xrpl.to/ws/orderbook
Real-time orderbook depth updates for any trading pair on the XRPL DEX.
wss://api.xrpl.to/ws/ledger
Get notified on each new validated ledger with close time, transaction count, and fee summary.
Open a WebSocket connection and subscribe to token updates with just a few lines of JavaScript:
const ws = new WebSocket('wss://api.xrpl.to/ws/sync/');
ws.onopen = () => {
// Subscribe to specific tokens by MD5 hash
ws.send(JSON.stringify({
action: 'subscribe',
tokens: ['a1b2c3d4e5f6...'] // token MD5 identifiers
}));
};
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('Token update:', data);
};
ws.onclose = () => {
// Reconnect after a short delay
setTimeout(() => connectWebSocket(), 3000);
};Each price update message contains the token identifier, current price, 24-hour volume, and change percentage:
{
"md5": "a1b2c3d4e5f6...",
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"price_xrp": "0.4521",
"price_usd": "1.0002",
"volume_24h": "1250000.00",
"change_24h": "2.45",
"market_cap": "52000000",
"updated": 1717200000000
}Embed live token prices on your website or app with instant updates.
React to price movements in real time for automated trading strategies.
Display live portfolio value without constant API polling.
Trigger notifications when tokens hit target prices or volume spikes.
Explore the full API documentation and related guides to start building with real-time XRPL data: