xrpl.to now uses embedded non-custodial wallets. Xaman, Crossmark & GEM Wallet login is no longer supported.Now using embedded wallets. Xaman, Crossmark & GEM no longer supported.
Insights

XRPL OHLC & Historical Price Data API

Candlestick data for every token on the XRP Ledger. Eight time intervals from 1-minute to monthly. Free for developers building charts, bots, and analytics tools.

What Is OHLC Data?

OHLC stands for Open, High, Low, Close — the four price points that define each candlestick on a chart. Combined with volume, this data powers trading charts, technical analysis, and backtesting across every financial market.

The XRPL.to API provides OHLC data for every token on the XRP Ledger — including tokens too new or small for CoinGecko or CoinMarketCap to track.

API Endpoint

GET https://api.xrpl.to/v1/ohlc/{md5}?interval={interval}&limit={limit}

The md5 is the token identifier — an MD5 hash of issuer_currency. Get it from the /v1/token/{slug} or /v1/tokens endpoints.

Available Intervals

IntervalValueBest For
1 minute1mScalping, real-time monitoring
5 minutes5mShort-term trading
15 minutes15mIntraday analysis
1 hour1hDay trading, pattern detection
4 hours4hSwing trading
1 day1dDaily charts, trend analysis
1 week1wWeekly trend overview
1 month1MLong-term performance

Response Format

{
  "ohlc": [
    {
      "t": 1710201600000,   // timestamp (Unix ms)
      "o": 0.00000425,      // open price (in XRP)
      "h": 0.00000431,      // high
      "l": 0.00000420,      // low
      "c": 0.00000428,      // close
      "v": 1250000          // volume (in token units)
    },
    ...
  ]
}

Example: Fetch 24h of Hourly Candles

JavaScript (fetch):

// 1. Get token md5
const token = await fetch('https://api.xrpl.to/v1/token/solo')
  .then(r => r.json());

// 2. Fetch OHLC
const ohlc = await fetch(
  `https://api.xrpl.to/v1/ohlc/${token.token.md5}?interval=1h&limit=24`
).then(r => r.json());

console.log(ohlc.ohlc); // 24 hourly candles

Python (requests):

import requests

token = requests.get('https://api.xrpl.to/v1/token/solo').json()
md5 = token['token']['md5']

ohlc = requests.get(
    f'https://api.xrpl.to/v1/ohlc/{md5}',
    params={'interval': '1h', 'limit': 24}
).json()

for candle in ohlc['ohlc']:
    print(f"Time: {candle['t']}, Close: {candle['c']}")

Use Cases

  • Charting libraries — feed OHLC data into TradingView, Lightweight Charts, or custom chart components
  • Trading bots — compute RSI, MACD, Bollinger Bands, and other indicators from historical data
  • Backtesting — test strategies against real XRPL DEX price history
  • Price alerts — monitor price movements and trigger notifications
  • Research — analyze token performance, correlation, and volatility

Get Started

Free OHLC data for every XRPL token. No API key required for basic usage.