Developer Portal
Trader APIsHTTP APIPublic endpoints

Guest OHLCV BarsGET

Returns historical OHLCV bars for one active symbol. At least one of `from` or `count` is required. When both are supplied, `count` takes precedence and `from` is ignored. A request may not ask for more than 5,000 bars: `count` directly, or — in range mode — the bars the timeframe implies over `[from, to]`, so the permitted span scales with the timeframe (5,000 minutes on `1M`, 5,000 days on `D`). Bounds are rejected with HTTP 400 rather than truncated. No authentication required.

View as Markdown
GET
/public/history/bars

Query Parameters

sidRequiredstring

Active symbol ID

timeframeRequiredstring

Bar timeframe/resolution

Value in: "1M" | "2M" | "3M" | "5M" | "15M" | "30M" | "1H" | "4H" | "12H" | "D" | "W" | "M"
frominteger

Positive start timestamp in Unix seconds. Required when count is omitted; ignored when count is supplied. In range mode (to - from) may not imply more than 5,000 bars at the requested timeframe.

Format: "int64"
toRequiredinteger

Positive end timestamp in Unix seconds

Format: "int64"
countinteger

Maximum bars to return. Required when from is omitted and takes precedence when both are supplied.

Minimum: 1Maximum: 5000Format: "int64"
curl -X GET "http://localhost:8081/api/v1/public/history/bars?sid=EURUSD&timeframe=1H&from=0&to=0&count=1"

Historical bars

{
  "bars": [
    {
      "open": 1.1234,
      "high": 1.1256,
      "low": 1.122,
      "close": 1.1245,
      "volume": 1000,
      "datetime": "2023-01-01T12:00:00Z"
    }
  ]
}