My App

Get historical candles for a product

Retrieve historical candlestick (OHLCV) data for a specific product over a given time range and interval.

GET
/products/{product_id}/candles
OBSIDIAN-KEY<token>

In: header

OBSIDIAN-SECRET<token>

In: header

Path Parameters

product_idstring

Product ID to retrieve candles for (e.g., "BTC-PERP", "ETH-PERP", "SOL-PERP")

Query Parameters

interval?string

Candle interval duration in nanoseconds (default: 1 hour if not set)

Formatint64
from?string

Start time in nanoseconds (default: now() - 1 hour if not set)

Formatint64
to?string

End time in nanoseconds (default: now() if not set)

Formatint64

Response Body

application/json

application/json

curl -X GET "https://api.dev.obsidian.exchange/products/string/candles"
{
  "data": [
    {
      "product_id": "string",
      "interval": "string",
      "time": "string",
      "low": "string",
      "high": "string",
      "open": "string",
      "close": "string",
      "volume": "string"
    }
  ]
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string",
      "property1": null,
      "property2": null
    }
  ]
}