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 response11 ms · just now · 1.5 KB · 61 lines
https://api.xrpl.to/v1/testnet/tokens/2b5e3c50d0500edf86212000b9883dce/ohlc
{
  "success": true,
  "took": 10,
  "interval": "5m",
  "from": 1792912002251,
  "to": 1793516802251,
  "limit": 2016,
  "count": 321,
  "candles": [
    {
      "time": 1793417100000,
      "open": 0.7980852808621741,
      "high": 0.7987411862153452,
      "low": 0.7973114353465666,
      "close": 0.7987411418163922,
      "xrp_volume": 699.4257389999999,
      "trades": 16,
      "vwap": 0.7984936137640405
    },
    {
      "time": 1793417400000,
      "open": 0.7974830444040922,
      "high": 0.7999521871820956,
      "low": 0.7959623360000004,
      "close": 0.7999521871820956,
      "xrp_volume": 951.0678399999999,
      "trades": 12,
      "vwap": 0.7988460226364396
    },
    {
      "time": 1793418000000,
      "open": 0.7993792271680266,
      "high": 0.8039638815544526,
      "low": 0.7978974913378749,
      "close": 0.8039638815544526,
      "xrp_volume": 2691.48481,
      "trades": 30,
      "vwap": 0.8007914741378005
    },
    {
      "time": 1793418300000,
      "open": 0.8014093353192442,
      "high": 0.8014093353192442,
      "low": 0.797702387419204,
      "close": 0.7977059012673133,
      "xrp_volume": 831.9748470000001,
      "trades": 10,
      "vwap": 0.799563884805764
    },
    {
      "time": 1793418600000,
      "open": 0.7986032773000505,
      "high": 0.8020082342592341,
      "low": 0.7978296879999992,
      "close": 0.8020082091752273,
      "xrp_volume": 1669.91617,
      "trades": 27,
      "vwap": 0.8001012828478572
    }
  ]
}

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