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)
resolutionint (minutes), or D|W
cbint (candle bar count, max 5000)
invertbool
curl 'https://api.xrpl.to/v1/ohlc/0dd550278b74cb6690fdae351e8e0df3'

Response

200Example response13 ms · just now · 0.7 KB · 50 lines
https://api.xrpl.to/v1/ohlc/0dd550278b74cb6690fdae351e8e0df3
{
  "success": true,
  "took": 3,
  "length": 97,
  "format": "ohlc",
  "metric": "price",
  "resolution": 15,
  "interval": "15m",
  "interval_seconds": 900,
  "vs_currency": "XRP",
  "inverted": false,
  "base_interval": 300,
  "ohlc": [
    [
      1789889400000,
      0.723589,
      0.7239031,
      0.7234843,
      0.7234843
    ],
    [
      1789890300000,
      0.7234843,
      0.7249005,
      0.7234843,
      0.724833102
    ],
    [
      1789891200000,
      0.724833102,
      0.7249,
      0.722073796,
      0.722710453
    ],
    [
      1789892100000,
      0.722710453,
      0.724342,
      0.722491144,
      0.724342
    ],
    [
      1789893000000,
      0.724342,
      0.725843815,
      0.723656798,
      0.725843815
    ]
  ]
}

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,
  inverted,
  base_interval,
  preAgg?,
  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