GET /ohlc/{id}
GET

/v1/ohlc/{id}

OHLC candlestick data

AuthNone — works without a key

Request

GEThttps://api.xrpl.to/v1/ohlc/0dd550278b74cb6690fdae351e8e0df3
Path parameterValueDescription
idA token id: its md5, slug or issuer_currency
Query parameterValueDescription
range1D|5D|7D|1M|3M|1Y|5Y|ALL
interval1m|5m|15m|30m|1h|2h|4h|1d|1w
vs_currencyXRP|USD|EUR|JPY|CNH (default: XRP). EUR, JPY and CNH candles are converted at the ECB reference rate of their own day (the last business day before a weekend or holiday; CNH uses the ECB's CNY); a candle with no rate in the week before it is left out
resolutionint (minutes), or D|W
cbint (candle bar count, max 5000)
tounix ms (with resolution): a page of history, the cb candles that open before it. Page back by passing the first candle's time; an empty ohlc means the history ends there. Absent, or inside the current candle: the live window ending now
invertbool
curl 'https://api.xrpl.to/v1/ohlc/0dd550278b74cb6690fdae351e8e0df3'

Response

200Example response2 ms · just now · 0.7 KB · 50 lines
https://api.xrpl.to/v1/ohlc/0dd550278b74cb6690fdae351e8e0df3
{
  "success": true,
  "took": 1,
  "length": 97,
  "format": "ohlc",
  "metric": "price",
  "resolution": 15,
  "interval": "15m",
  "interval_seconds": 900,
  "vs_currency": "XRP",
  "inverted": false,
  "base_interval": 300,
  "ohlc": [
    [
      1792312200000,
      0.775612,
      0.776430063,
      0.77487231,
      0.776037
    ],
    [
      1792313100000,
      0.776037,
      0.777183,
      0.774341394,
      0.775074
    ],
    [
      1792314000000,
      0.775074,
      0.775074,
      0.770153582,
      0.771361626
    ],
    [
      1792314900000,
      0.771361626,
      0.772492,
      0.770178654,
      0.770684745
    ],
    [
      1792315800000,
      0.770684745,
      0.771069,
      0.768348626,
      0.768987294
    ]
  ]
}

Long arrays and strings are shortened in the example; Send request for the full answer.

Shapeas documented
{
  success,
  took,
  length,
  format,
  resolution,
  interval,
  interval_seconds,
  vs_currency,
  fx_basis? (EUR/JPY/CNH),
  inverted,
  base_interval,
  to? (the page end,
  with to),
  ohlc: [
    [
      time,
      open,
      high,
      low,
      close,
      volume,
      ...
    ]
  ]
}

What it does

OHLC candlestick data

A token id can be its md5, slug or issuer_currency. How to build an md5 →
OpenAPI