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
| Interval | Value | Best For |
|---|---|---|
| 1 minute | 1m | Scalping, real-time monitoring |
| 5 minutes | 5m | Short-term trading |
| 15 minutes | 15m | Intraday analysis |
| 1 hour | 1h | Day trading, pattern detection |
| 4 hours | 4h | Swing trading |
| 1 day | 1d | Daily charts, trend analysis |
| 1 week | 1w | Weekly trend overview |
| 1 month | 1M | Long-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/0413ca7cfc258dfaf698c02fe304e607') // 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 candlesPython (requests):
import requests
token = requests.get('https://api.xrpl.to/v1/token/0413ca7cfc258dfaf698c02fe304e607').json() # SOLO
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
Attribution Is Required
The API is free to call, but not unconditional. Any app, website, bot or dashboard that displays xrpl.to data must show a visible, clickable Data by xrpl.to credit on the same screen as that data — not buried in an about page. This applies on every tier, including calls made with no API key. Storing our data and re-serving it from your own API or dataset needs written permission first. Full terms are in the API documentation.
Get Started
Free OHLC data for every XRPL token. No API key required for basic usage.