GET /testnet/tokens/{md5}/ohlc
GET

/v1/testnet/tokens/{md5}/ohlc

5-minute candles of a Testnet token

AuthNone — works without a key

Request

GEThttps://api.xrpl.to/v1/testnet/tokens/2b5e3c50d0500edf86212000b9883dce/ohlc
Path parameterValueDescription
md5The token's md5 (md5 of issuer_currency)
Query parameterValueDescription
fromunix ms (default 7 days ago)
tounix ms (default now)
limit1-5000
curl 'https://api.xrpl.to/v1/testnet/tokens/2b5e3c50d0500edf86212000b9883dce/ohlc'

Response

200Example response23 ms · just now · 1.4 KB · 61 lines
https://api.xrpl.to/v1/testnet/tokens/2b5e3c50d0500edf86212000b9883dce/ohlc
{
  "success": true,
  "took": 20,
  "interval": "5m",
  "from": 1794677597212,
  "to": 1795282397212,
  "limit": 2016,
  "count": 2013,
  "candles": [
    {
      "time": 1794677700000,
      "open": 1.0403321428575572,
      "high": 1.0428586293538682,
      "low": 1.0403321428575572,
      "close": 1.0428586293538673,
      "xrp_volume": 154.23873700000001,
      "trades": 4,
      "vwap": 1.0419307600241512
    },
    {
      "time": 1794678000000,
      "open": 1.0379620880551268,
      "high": 1.0379620880551268,
      "low": 1.0309011977486182,
      "close": 1.0336211942237539,
      "xrp_volume": 440.39012,
      "trades": 10,
      "vwap": 1.0331985857274755
    },
    {
      "time": 1794678300000,
      "open": 1.034711216111437,
      "high": 1.039792146123653,
      "low": 1.0346061489110947,
      "close": 1.0346061489111134,
      "xrp_volume": 494.54345900000004,
      "trades": 11,
      "vwap": 1.03620235531692
    },
    {
      "time": 1794678600000,
      "open": 1.0346061489111125,
      "high": 1.0400347956607765,
      "low": 1.0346061489111111,
      "close": 1.038737893991374,
      "xrp_volume": 302.155768,
      "trades": 7,
      "vwap": 1.036720051802225
    },
    {
      "time": 1794678900000,
      "open": 1.0387378939913783,
      "high": 1.0439446009696696,
      "low": 1.0387378939913783,
      "close": 1.0439446009696696,
      "xrp_volume": 438.29756999999995,
      "trades": 5,
      "vwap": 1.04069098203384
    }
  ]
}

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

Shapeas documented
{
  interval: "5m",
  candles: [
    {
      time,
      open,
      high,
      low,
      close,
      xrp_volume,
      trades,
      vwap
    }
  ]
}

What it does

5-minute candles of a Testnet token

Start at GET /v1/testnet/fixtures: it names live accounts, a busy token, an NFT with offers and one of every ledger object that xrpl.to keeps alive on Testnet, plus a real transaction of every type. The busiest token gains holders every hour, so its GET /v1/testnet/tokens/{md5}/holders is the place to test paginating a long list. Testnet resets without warning; the data is rebuilt from the chain within minutes, and only objects touched since count. Open the Testnet sandbox →
OpenAPI