---
title: "OHLCV price bars for a symbol and resolution"
method: GET
path: "/v1/history"
tags: ["History"]
---

# OHLCV price bars for a symbol and resolution

`GET /v1/history`

TradingView UDF history bars for one `symbol` at one `resolution`,
covering `[from, to)` (Unix seconds; `to` is exclusive). Returns column arrays (`t`, `o`,
`h`, `l`, `c`, `v`) of equal length, oldest-first. When the window
holds no bars the response is a `200` with `{ "s": "no_data" }` (plus
`nextTime` pointing at the nearest earlier bar when one exists), per the
UDF contract. Equity bars also carry sided-volume columns (`bv`/`sv`/`uv`
= buy / sell / unclassified) where available.

Cache-Control tracks data freshness: today `max-age=2`, the prior
session `max-age=60`, older complete days `immutable`.

## Query parameters

- `symbol` string, required
- `resolution` '1' | '2' | '3' | '5' | '15' | '30' | '60' | '240' | '480' | 'D' | 'W', required
- `from` integer, required
- `to` integer, required
- `countback` integer
- `extended` boolean

## Response `200`

Bars, or a `no_data` marker — both `200` per UDF.

- union
  - HistoryOk
    - `s` 'ok', required — Status flag.
    - `t` integer[], required — Bar open times, Unix seconds (UTC), oldest-first.
    - `o` number[], required — Opens.
    - `h` number[], required — Highs.
    - `l` number[], required — Lows.
    - `c` number[], required — Closes.
    - `v` number[], required — Volumes.
    - `bv` number[] — Buy (aggressor) volume per bar, equities where available.
    - `sv` number[] — Sell (aggressor) volume per bar.
    - `uv` number[] — Unclassified volume per bar.
  - HistoryNoData
    - `s` 'no_data', required
    - `nextTime` integer — Unix seconds of the nearest earlier bar, when one exists.

## Other responses

- `401` — Missing or invalid API key.
- `402` — The account's shared Skylit credit balance is lower than this route's cost. Top up to continue. Carries `X-Credits-Remaining: 0`.
- `403` — Account is not API-eligible (suspended).
- `429` — Per-minute rate limit exceeded.
- `503` — Underlying data source temporarily unavailable, or the credit balance could not be verified (`credit_check_failed`). Safe to retry.

---

[API](https://skmtc.net/skylit/apis/flowseeker-skylit-public-api.md) · [All operations](https://skmtc.net/skylit/apis/flowseeker-skylit-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/skylit/flowseeker-skylit-public-api/revisions/3280190b1b24/schema)
