Spot market data

Get Spot price history

Changed on

Returns historical bar data in TradingView UDF format, as required by the TradingView charting library: a single object with parallel arrays keyed t, o, h, l, c, and v (values are numbers), plus a status field s. For a standard array-of-objects representation with full field names (open, high, low, close, volume), use GET /v1/spot/candles (Get Candles). Supply market (candles) or symbol (history), resolution, to, and either from or countback. Resolutions: 1, 5, 15, 60, 240, 1D, 1W; D/W aliases are accepted. to is inclusive.

get/v1/spot/history

Request

  • Base URL
    https://api.ondoperps.xyz
  • URL
    https://api.ondoperps.xyz/v1/spot/history
  • Auth
    • HTTP bearer
    • or API key in header ONDO-KEY-ID

Query parameters

symbolstring required

TradingView symbol identifier

resolutionstring required

Bar resolution

frominteger

Unix seconds, not milliseconds.

tointeger required

Unix seconds, not milliseconds.

countbackinteger

Positive bar count ending at to; supply either from or countback.

Response

TradingView UDF history response

sstring

Status ('ok' or 'no_data')

tinteger[]

Array of Unix timestamps

onumber[]

Array of open prices

hnumber[]

Array of high prices

lnumber[]

Array of low prices

cnumber[]

Array of close prices

vnumber[]

Array of volumes

Example response

{
  "s": "ok"
}

Changes