/v1/ohlc/{id}
OHLC candlestick data
Request
https://api.xrpl.to/v1/ohlc/0dd550278b74cb6690fdae351e8e0df3| Path parameter | Value | Description |
|---|---|---|
| id | A token id: its md5, slug or issuer_currency |
| Query parameter | Value | Description |
|---|---|---|
| range | 1D|5D|7D|1M|3M|1Y|5Y|ALL | |
| interval | 1m|5m|15m|30m|1h|2h|4h|1d|1w | |
| vs_currency | XRP|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 | |
| resolution | int (minutes), or D|W | |
| cb | int (candle bar count, max 5000) | |
| invert | bool |
curl 'https://api.xrpl.to/v1/ohlc/0dd550278b74cb6690fdae351e8e0df3'
Response
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": [ [ 1791683100000, 0.7147965, 0.7147965, 0.7147965, 0.7147965 ], [ 1791684000000, 0.7147965, 0.714818537, 0.714013434, 0.714802009 ], [ 1791684900000, 0.714802009, 0.714847282, 0.713780969, 0.714709918 ], [ 1791685800000, 0.714709918, 0.714848, 0.71372542, 0.713775874 ], [ 1791686700000, 0.713775874, 0.714741, 0.713775874, 0.714285704 ] ] }
Long arrays and strings are shortened in the example; Send request for the full answer.
{ success, took, length, format, resolution, interval, interval_seconds, vs_currency, fx_basis? (EUR/JPY/CNH), inverted, base_interval, ohlc: [ [ time, open, high, low, close, volume, ... ] ] }
What it does
OHLC candlestick data