Skip to main content
GET
/
v1
/
perps
/
candles
Get Candles
curl --request GET \
  --url https://api.ondoperps.xyz/v1/perps/candles \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "result": [
    {
      "startTime": "2025-03-05T14:00:00Z",
      "open": "226.80",
      "high": "228.10",
      "low": "226.50",
      "close": "227.50",
      "volume": "12345.67"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Query Parameters

market
string
required

Perps trading market

Example:

"AAPL-USD.P"

resolution
string
required

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).

Example:

"1"

from
integer
required

Start of the requested time range (Unix timestamp in seconds)

Example:

1684814400

to
integer
required

End of the requested time range (Unix timestamp in seconds)

Example:

1684900800

Response

Array of OHLCV candles

success
boolean
required

Whether the request was successful

Example:

true

error
string

Error message, present only on failure

Example:

""

error_code
string

Semantic error code. See each endpoint's error responses for the specific codes it can return.

deprecated
string

Deprecation notice, if applicable

Example:

""

result
object[]