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/ecfb8f46ab12687bf34adeda926a9adb/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/ecfb8f46ab12687bf34adeda926a9adb/ohlc'

Response

200Example response16 ms · just now · 1.4 KB · 61 lines
https://api.xrpl.to/v1/testnet/tokens/ecfb8f46ab12687bf34adeda926a9adb/ohlc
{
  "success": true,
  "took": 11,
  "interval": "5m",
  "from": 1791162307460,
  "to": 1791767107460,
  "limit": 2016,
  "count": 1849,
  "candles": [
    {
      "time": 1791162600000,
      "open": 0.6581551534471451,
      "high": 0.6583419066223062,
      "low": 0.6565025409999988,
      "close": 0.6573896416748283,
      "xrp_volume": 1257.228413,
      "trades": 16,
      "vwap": 0.6577876695908141
    },
    {
      "time": 1791162900000,
      "open": 0.6563775409103781,
      "high": 0.6578893252415596,
      "low": 0.655836004641358,
      "close": 0.6559790647107614,
      "xrp_volume": 1501.2504310000002,
      "trades": 23,
      "vwap": 0.6565694632935318
    },
    {
      "time": 1791163500000,
      "open": 0.6557240226916341,
      "high": 0.6559404629372887,
      "low": 0.6549987425483382,
      "close": 0.6549987425483382,
      "xrp_volume": 1155.301531,
      "trades": 20,
      "vwap": 0.655764439377092
    },
    {
      "time": 1791163800000,
      "open": 0.6544493302941627,
      "high": 0.6550147132308034,
      "low": 0.654398086499998,
      "close": 0.6545275590000016,
      "xrp_volume": 1025.244912,
      "trades": 15,
      "vwap": 0.6547211210567406
    },
    {
      "time": 1791164100000,
      "open": 0.6548365566595326,
      "high": 0.6573016042780748,
      "low": 0.6548365566595326,
      "close": 0.6573016042780748,
      "xrp_volume": 1333.431259,
      "trades": 19,
      "vwap": 0.6561937779782502
    }
  ]
}

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