Skip to main content
GET
/
v1
/
perps
/
history
Get Price History (TradingView)
curl --request GET \
  --url https://api.ondoperps.xyz/v1/perps/history \
  --header 'Authorization: Bearer <token>'
{
  "s": "ok",
  "t": [
    1709640000,
    1709643600
  ],
  "o": [
    226.8,
    227.5
  ],
  "h": [
    228.1,
    228.5
  ],
  "l": [
    226.5,
    227
  ],
  "c": [
    227.5,
    228
  ],
  "v": [
    12345.67,
    9876.54
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

symbol
string
required

TradingView symbol identifier

resolution
string
required

Bar resolution

from
integer
required

Start Unix timestamp

to
integer
required

End Unix timestamp

Response

TradingView UDF history response

TradingView UDF history response with parallel arrays of OHLCV data.

s
string

Status ('ok' or 'no_data')

Example:

"ok"

t
integer[]

Array of Unix timestamps

o
number[]

Array of open prices

h
number[]

Array of high prices

l
number[]

Array of low prices

c
number[]

Array of close prices

v
number[]

Array of volumes