API Reference

REST API for live XRP Ledger data — ledger stats, DEX, tokens, wallets, escrows, ETF flows, and more.

Overview

Base URL: https://api.xrplanalytics.com

All endpoints return JSON. Public endpoints require no authentication. Account features (ETF, whales, richlist, macroscope, escrows) require a JWT or API key. See Authentication.

This API is in beta. Endpoints and response shapes may change. All data is sourced live from the XRP Ledger public nodes.

Authentication

Most endpoints are public and require no auth. Account-protected features use JWT Bearer tokens.

Authorization: Bearer <your_jwt_token>

Tokens are returned by POST /api/auth/login and expire after 30 days.

API key endpoints (paid tier) use the X-API-Key header or ?api_key= query param:

# Header (preferred)
curl https://api.xrplanalytics.com/api/etf \
  -H "X-API-Key: xrpla_YOUR_KEY"

# Query param
curl "https://api.xrplanalytics.com/api/etf?api_key=xrpla_YOUR_KEY"

Get API keys from your account dashboard or subscribe at xrplanalytics.com/pricing.

Rate Limits

TierDaily LimitBurst
No key (public endpoints)Unlimited10 req/10s
Starter ($9/mo)500 req/dayHigher on /api/pro/*
Pro ($29/mo)10,000 req/dayHigher on /api/pro/*

Rate limit exceeded returns HTTP 429. Daily limits reset at midnight UTC. See pricing for plan details.

Response Format

All responses are JSON. Successful responses include success: true. Errors include success: false and an error string.

// Success
{ "success": true, "data": { ... } }

// Error
{ "success": false, "error": "Not found" }

Network Stats

GET /api/stats

Live XRP Ledger network statistics — ledger index, fees, reserves, XRP supply, account count.

{
  "success": true,
  "ledger": {
    "index": 104114048,
    "closeTime": "2026-05-09T13:54:00Z",
    "txCount": 357,
    "totalCoins": 99985663662.81,
    "reserveBase": 1,
    "reserveInc": 0.2
  },
  "fees": {
    "base": 0.000012,
    "median": 0.000012,
    "open": 0.000012
  },
  "accounts": 7839802
}

Ledger

GET /api/ledger/latest

Most recent validated ledger header.

{
  "success": true,
  "ledger": {
    "index": 104114048,
    "hash": "ABC123...",
    "closeTime": "2026-05-09T13:54:00Z",
    "txCount": 357,
    "totalCoins": 99985663662.81,
    "reserveBase": 1,
    "reserveInc": 0.2,
    "feesXrp": 0.00427
  }
}
GET /api/ledger/recent

Last 10 validated ledger headers as an array.

GET /api/ledger/:sequence

Specific ledger by sequence number including full transaction list.

ParamTypeRequiredDescription
sequenceintegerrequiredLedger sequence number

Transactions

GET /api/txs/recent

Recent transactions from the latest validated ledger.

{
  "success": true,
  "transactions": [
    {
      "type": "Payment",
      "hash": "ABC123...",
      "from": "rABC...",
      "to": "rDEF...",
      "xrpAmount": 150.5,
      "fee": 0.000012,
      "result": "tesSUCCESS"
    }
  ]
}

XRP Price

GET /api/price/xrp

Live XRP price derived from the XRPL DEX RLUSD/XRP orderbook mid-price.

{ "success": true, "price": 1.4177, "source": "DEX RLUSD/XRP" }

Network Activity

GET /api/network/activity

Live network activity metrics sampled from the most recent ~200 ledgers, extrapolated to 24h estimates.

{
  "success": true,
  "sample": { "ledgers": 73, "minutes": 12 },
  "live": {
    "txPerLedger": 107,
    "avgCloseTime": 10.13,
    "uniqueSenders": 427,
    "feesXrp": 0.4969
  },
  "estimated24h": {
    "transactions": 929700,
    "payments": 310500,
    "xrpVolume": 29960000,
    "uniqueSenders": 50600,
    "newAccounts": 414,
    "feesXrp": 58.89
  }
}
All 24h figures are extrapolated from a live sample window — statistical estimates, not recorded historical totals. Historical snapshots coming soon.

DEX Pairs

GET /api/dex/pairs

All tracked DEX trading pairs with current best price and offer count.

{
  "success": true,
  "pairs": [
    { "id": "XRP/RLUSD", "price": 0.705462, "offerCount": 5 },
    { "id": "XRP/USD",   "price": 0.712968, "offerCount": 5 },
    { "id": "XRP/EUR",   "price": 3.703704, "offerCount": 5 },
    { "id": "XRP/BTC",   "price": 56872.14, "offerCount": 5 },
    { "id": "XRP/USDC",  "price": 0.709085, "offerCount": 5 },
    { "id": "SOLO/XRP",  "price": 0.042100, "offerCount": 5 }
  ]
}

Order Book

GET /api/dex/orderbook?pair=XRP/RLUSD

Live order book for a DEX pair. Returns top bids and asks.

ParamTypeRequiredDescription
pairstringrequirede.g. XRP/RLUSD, XRP/USD, XRP/EUR, XRP/BTC, XRP/USDC, SOLO/XRP
{
  "success": true,
  "pair": "XRP/RLUSD",
  "bids": [{ "price": 0.7054, "quantity": 15000 }],
  "asks": [{ "price": 0.7061, "quantity": 8400 }]
}

AMM Pools

GET /api/amm/pools

Active XRPL AMM pools with asset composition, trading fee, and LP token balance.

ETF Tracker

GET /api/etf

14 XRP ETF/ETP products across US Spot, EU ETP, and Basket categories. AUM, XRP held, price, volume, and flow data.

{
  "success": true,
  "xrpPrice": 1.4177,
  "summary": {
    "totalAum": 3300000000,
    "spotAum": 2450000000,
    "etpAum": 580000000,
    "totalXrpHeld": 1300000000,
    "pctOfSupply": 1.28,
    "etfCount": 14
  },
  "etfs": [
    {
      "ticker": "XRP",
      "name": "Bitwise XRP ETF",
      "exchange": "NYSE Arca",
      "category": "spot",
      "price": 15.82,
      "changePct": 0.43,
      "volume": 9500000,
      "aum": 335000000,
      "xrpHeld": 235046841,
      "xrpPerShare": 11.19,
      "expenseRatio": 0.20,
      "flow1d": null,
      "flow1w": null,
      "flow1m": null,
      "flowYtd": null,
      "dataSource": "bitwise-live"
    }
  ]
}
EU ETP prices are not available via our free data tier — AUM is derived as xrpHeld × xrpPrice. Flow data shows null until sufficient D1 historical snapshots accumulate. Bitwise (XRP) data is live-scraped; all others are seeded from recent SEC/fund disclosures.

Token Search

GET /api/tokens?q=RLUSD

Search XRPL tokens by currency code or name.

ParamTypeRequiredDescription
qstringoptionalSearch query — currency code or token name
{
  "success": true,
  "tokens": [
    {
      "currency": "RLUSD",
      "issuer": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De",
      "supply": "706600.00",
      "trustlines": 284600
    }
  ]
}

Token Detail

GET /api/tokens/:currency/:issuer

Detailed token info including supply, trustlines, issuer metadata, and market data.

ParamTypeRequiredDescription
currencystringrequired3-char code or 40-char hex
issuerstringrequiredIssuer XRPL address (r...)

Wallet Lookup

GET /api/address/:address

Full wallet data for an XRPL address — balance, sequence, owner count, trust lines, open offers, and recent transactions.

ParamTypeRequiredDescription
addressstringrequiredXRPL address starting with r
{
  "success": true,
  "account": "rABC...",
  "balance": 15420.5,
  "sequence": 48210,
  "ownerCount": 4,
  "trustLines": [...],
  "offers": [...],
  "transactions": [...]
}

Transaction Detail

GET /api/tx/:hash

Full transaction detail by hash including metadata and affected nodes.

ParamTypeRequiredDescription
hashstringrequired64-character hex transaction hash

Whale Tracker

GET /api/whales

Two datasets: large wallet transfers (500K+ XRP between major accounts) and Ripple company activity (1M+ XRP from Ripple wallets). Refreshed every 2 minutes.

{
  "success": true,
  "threshold_xrp": 100000,
  "transactions": [
    {
      "date": "2026-05-09 13:41 UTC",
      "from": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
      "from_label": "Bitstamp",
      "to": "rDsbeomae4FXwgQTJp9Rs64Qg9vDiTCdBv",
      "to_label": "Bitfinex",
      "xrp": 1500000,
      "hash": "ABC123..."
    }
  ]
}

Escrows

GET /api/escrows

Ripple's active on-ledger XRP escrow positions. 8 wallets, ~32.9B XRP locked in 103 contracts. Refreshed every 10 minutes from XRPL.

{
  "success": true,
  "totalLockedXrp": 32900000000,
  "totalEscrows": 103,
  "nextRelease": "2026-06-01",
  "accounts": [
    {
      "label": "Ripple (11)",
      "account": "rB3WNZc45gxzW31zxfXdkx8HusAhoqscPn",
      "lockedXrp": 5000000000,
      "escrowCount": 15,
      "nextRelease": "2026-10-01"
    }
  ]
}

Escrow History

GET /api/escrows/history

Monthly escrow release and re-escrow history for the last 12 months. Sampled from 4 of 8 Ripple escrow wallets.

{
  "success": true,
  "history": [
    {
      "month": "2026-05",
      "released_xrp": 1000000000,
      "reescrowed_xrp": 700000000,
      "net_to_market_xrp": 300000000,
      "releases": [{ "date": "2026-05-01", "wallet": "Ripple (9)", "xrp": 1000000000 }],
      "reescrows": [{ "date": "2026-05-01", "wallet": "Ripple (9)", "xrp": 700000000, "unlock_date": "2028-05-01" }]
    }
  ]
}

Ripple Wallets

GET /api/ripple

Live XRP balances for known Ripple company wallets (operational, ODL, escrow sources).

Rich List

GET /api/richlist

Top 10,000 XRP holders from XRPScan plus full supply allocation, percentile thresholds, and range distribution. Cached 5 minutes.

// Response shape
{
  "success": true,
  "accounts": [ { "account": "r...", "supply": "4820500000", "name": { "name": "Binance" } }, ... ],
  "totalAccounts": 6123456,
  "supply": {
    "total": 99988961946,
    "circulating": 57123456789,
    "escrowed": 38100000000,
    "burned": 12345678
  },
  "computedStats": {
    "percentiles": [ { "label": "0.01%", "count": 612, "minXrp": 3836116, "seeded": false }, ... ],
    "ranges": [ { "label": "1B+", "count": 3, "sumXrp": 18000000000, "seeded": false }, ... ]
  }
}

XRP Macroscope

GET /api/macroscope

Full 100B XRP supply breakdown by segment — escrow, retail, exchanges, ETFs, DeFi, dormant, burned, blackholed. Also returns per-exchange custody estimates. Cached 5 minutes.

// Response shape
{
  "success": true,
  "totalSupply": 99988961946,
  "burned": 12345678,
  "segments": [
    { "id": "escrow", "label": "Ripple Escrow", "xrp": 38100000000, "pct": 38.1, "color": "#f59e0b", "desc": "..." },
    { "id": "retail", "label": "Retail Holders", "xrp": 14200000000, "pct": 14.2, "color": "#06b6d4", "desc": "..." },
    ...
  ],
  "exchanges": [
    { "name": "Binance", "xrp": 2800000000 },
    { "name": "Coinbase", "xrp": 1100000000 },
    ...
  ],
  "updatedAt": "2026-05-11T12:00:00.000Z"
}

Sign Up

POST /api/auth/signup

Create a new account. Password is hashed with PBKDF2-SHA256, 100K iterations before storage.

// Request body
{ "email": "[email protected]", "password": "yourpassword" }

// Response
{ "success": true, "token": "eyJ...", "user": { "email": "[email protected]" } }

Login

POST /api/auth/login

Authenticate and receive a JWT valid for 30 days.

// Request body
{ "email": "[email protected]", "password": "yourpassword" }

// Response
{ "success": true, "token": "eyJ...", "user": { "email": "[email protected]" } }

Get User

GET /api/auth/me

Get authenticated user profile. Requires Bearer token.

// Header: Authorization: Bearer <token>

// Response
{ "success": true, "user": { "email": "[email protected]", "created_at": "2026-05-01" } }

API Key Management

Manage API keys via REST using your dashboard JWT. Keys can also be managed at your account dashboard.

API keys are required for Starter and Pro tier programmatic access. The raw key is shown once on creation — store it immediately.

GET /api/keys

List your API keys. Requires Bearer token.

curl https://api.xrplanalytics.com/api/keys \
  -H "Authorization: Bearer YOUR_JWT"
POST /api/keys

Create a new API key. Requires Bearer token. Max 5 active keys per account.

curl -X POST https://api.xrplanalytics.com/api/keys \
  -H "Authorization: Bearer YOUR_JWT" \
  -H "Content-Type: application/json" \
  -d '{"label": "My Bot", "tier": "starter"}'

// Response — raw key shown ONCE
{ "success": true, "key": "xrpla_abc123...", "prefix": "xrpla_ab", "tier": "starter" }
DELETE /api/keys/:id

Revoke an API key by ID. Requires Bearer token. Immediate effect.

curl -X DELETE https://api.xrplanalytics.com/api/keys/3 \
  -H "Authorization: Bearer YOUR_JWT"

Error Codes

HTTP StatusMeaning
400Bad request — missing or invalid parameters
401Unauthorized — missing or invalid JWT/API key
404Not found — address, ledger, or tx not found
409Conflict — email already registered
429Rate limit exceeded — back off and retry
500Internal error — XRPL node issue or unexpected error

Data Notes