Get Spot candles
Changed onReturns OHLCV candlestick data for a Spot market as an array of objects, each with the full field names startTime, open, high, low, close, and volume (values are strings). If you need the TradingView UDF format instead (parallel o/h/l/c/v arrays of numbers), use GET /v1/spot/history (Get Price History). 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.
Request
- Base URLhttps://api.ondoperps.xyz
- URLhttps://api.ondoperps.xyz/v1/spot/candles
- Auth
- HTTP bearer
- or API key in header ONDO-KEY-ID
Query parameters
Perps trading market
Bar resolution. If the string has no "D", "W", or "M" suffix it is interpreted as minutes (e.g. 1, 5, 15, 30, 60, 240). Use suffixes for daily (e.g. 1D), weekly (1W), or monthly (1M).
Unix seconds, not milliseconds.
Unix seconds, not milliseconds.
Positive bar count ending at to; supply either from or countback.
Response
Array of OHLCV candles
Example response
{
"success": true,
"result": [
{
"startTime": "2024-01-04T16:00:00Z",
"open": "150.25",
"high": "152.10",
"low": "149.80",
"close": "151.45",
"volume": "1234.56"
}
]
}Changes
- info
endpoint added
- info