The XRP Ledger currently has 20,265 issued tokens, and 1,619 of them traded in the last 24 hours. Getting at that data usually means running your own rippled node or stitching together several exchange APIs.
There is a simpler path. Here is the whole thing in one fetch.
The endpoint
const res = await fetch(
'https://api.xrpl.to/v1/tokens?limit=5&sortBy=vol24hxrp&sortType=desc'
);
const { tokens, total } = await res.json();
console.log(total); // 20,265
for (const t of tokens) {
console.log(t.name, t.vol24hxrp, t.holders);
}
No API key, no signup. Output right now looks like this:
| Token | 24h volume (XRP) | Holders |
|---|---|---|
| RLUSD | 5.79M | 69,195 |
| USDC | 366.6K | 10,297 |
| PHNIX | 38.7K | 28,931 |
| FUZZY | 33.3K | 10,913 |
| 589 | 29.2K | 8,694 |
Useful query parameters
-
sortBy—vol24hxrp,marketcap,holders,trustlines -
sortType—ascordesc -
startandlimit— pagination over all 20,265 tokens -
tagName— filter to a category such as stablecoins or memes
Ledger-wide stats
A second endpoint gives you the 24-hour aggregates:
const { H24, exch, total } = await (
await fetch('https://api.xrpl.to/v1/stats')
).json();
console.log('tokens traded:', H24.tradedTokens24H); // 1,619
console.log('trades:', H24.transactions24H); // 134,952
console.log('unique traders:', H24.uniqueTraders24H); // 6,351
console.log('XRP per USD:', exch.USD);
Note that exch.USD is XRP per USD, not the other way round. To get the XRP price in dollars, invert it:
const xrpUsd = 1 / exch.USD; // ≈ 1.3793
That inversion catches almost everyone the first time.
Fields worth knowing
-
vol24hxrp— 24h volume denominated in XRP, not USD -
marketcap— also denominated in XRP -
holdersvstrustlines— the gap tells you how many accounts opened a line and then emptied it -
uniqueTraders24h— the cheapest wash-trading filter you will find -
pro24h— 24h percentage change
One gotcha
Token names are not unique. Multiple issuers can publish under the same ticker — there are two different tokens called USDC on the ledger right now. Always key on the issuer field, or on md5, rather than on name:
const byIssuer = new Map(tokens.map(t => [`${t.issuer}:${t.currency}`, t]));
Rate limits are real but generous. Back off on a 429 and you will be fine:
async function get(url, attempt = 1) {
const r = await fetch(url);
if (r.ok) return r.json();
if (r.status === 429 && attempt < 4) {
await new Promise(s => setTimeout(s, attempt * 4000));
return get(url, attempt + 1);
}
throw new Error(`HTTP ${r.status}`);
}
Live prices, holder counts, trustlines and order-book depth for every XRPL token are at xrpl.to.
Top comments (0)