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 response12 ms · just now · 1.4 KB · 61 lines
https://api.xrpl.to/v1/testnet/tokens/ecfb8f46ab12687bf34adeda926a9adb/ohlc
{
  "success": true,
  "took": 9,
  "interval": "5m",
  "from": 1791787721216,
  "to": 1792392521216,
  "limit": 2016,
  "count": 1899,
  "candles": [
    {
      "time": 1791787800000,
      "open": 0.7074504889999992,
      "high": 0.7092825908310944,
      "low": 0.7074504889999992,
      "close": 0.7092825908310944,
      "xrp_volume": 834.0251509999999,
      "trades": 13,
      "vwap": 0.7080199271107311
    },
    {
      "time": 1791788100000,
      "open": 0.709282582,
      "high": 0.709282582,
      "low": 0.7070750172693384,
      "close": 0.7070750172693384,
      "xrp_volume": 969.012487,
      "trades": 12,
      "vwap": 0.70743235580098
    },
    {
      "time": 1791788400000,
      "open": 0.706870283,
      "high": 0.7077303380306642,
      "low": 0.706870283,
      "close": 0.7077303380306642,
      "xrp_volume": 75.928859,
      "trades": 3,
      "vwap": 0.7073796966155694
    },
    {
      "time": 1791788700000,
      "open": 0.7074773476663953,
      "high": 0.7077303275231855,
      "low": 0.7067214229999984,
      "close": 0.7067663699132605,
      "xrp_volume": 1674.032494,
      "trades": 20,
      "vwap": 0.707150346479454
    },
    {
      "time": 1791789000000,
      "open": 0.7070509631756419,
      "high": 0.7083053702157537,
      "low": 0.7070509631756419,
      "close": 0.7070752043155298,
      "xrp_volume": 685.7026,
      "trades": 9,
      "vwap": 0.7080514377972806
    }
  ]
}

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