OHLCV price bars for a symbol and resolution
https://atlas-api.skylit.ai/v1/historyTradingView 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.
Request-window limit
One call may span at most a fixed number of trading days, set by the
bar tier the resolution reads from — not by the resolution itself. 240
and 60 share the 1-hour tier and therefore share its allowance.
| Tier | Resolutions | Max trading days / request |
|---|---|---|
| 1-min | 1 2 3 5 10 15 30 45 | 90 |
| 1-hour | 60 120 240 480 | 720 |
| 1-day | D W | 2,600 |
A window wider than the cap is rejected with 400, carrying the two
numbers a client needs to react (requested_days, max_days). It is
never silently shortened — a short { "s": "ok" } always means the data
ends there, never that your range was clipped. Page through anything
wider in windows of max_days or fewer.
A rejected 400 is refunded (failed calls are free); the credit header
reflects the refund once applied, or the charged balance if the refund
write fails. The caps are
fixed and published here, so check your range before sending it rather
than discovering the limit by retrying. /v1/config is free if you
would rather read the feed's capabilities first.
Cache-Control tracks data freshness: today max-age=2, the prior
session max-age=60, older complete days immutable. A 400 is
no-store.
Authorization
Authorization: Bearer <your API key>Required. A missing header returns 401; an invalid, revoked or expired key returns 403.
Query parameters
symbolstringrequiredTicker (e.g.
SPY).resolutionstringrequiredBar size: intraday minutes,
D(one day) orW(one week). Each bar is one candle of that size, built server-side;1Dand1Ware accepted asDandW. Any other value is a400(invalid_parameter).Anchoring. With
extended=false(the default) intraday bars anchor at the 09:30 ET open and cover regular hours only:5→ 09:30, 09:35 …;45→ 09:30, 10:15 …;60→ 09:30, 10:30 … 15:30 (the last hour covers 15:30–16:00);240→ 09:30, 13:30. A bar whose window would run past 16:00 ET ends at 16:00. Withextended=trueintraday bars sit on the clock grid (for example240→ 00:00, 04:00 … UTC).Dis one session;Wis one week, stamped Monday 00:00 UTC.Window. A bar belongs to the request whose
[from, to)holds its OPEN timet, and it is always complete: the bar opening just beforetoincludes its rows at and afterto(if it is the current bar, it is still forming). A bar opening beforefromis not returned. When the window holds no bar but an earlier one exists, the answer isno_datawithnextTime.12351015304560120240480DWfromintegerint64requiredWindow start, Unix seconds (UTC).
tointegerint64requiredWindow end, Unix seconds (UTC).
countbackintegermin 1Accepted for UDF compatibility and ignored: the response is always the bars of
[from, to), however many that is. A TradingView client sends it and pages by movingfrom/to, which works as is.extendedbooleandefaultfalseInclude extended-hours (pre / post-market) bars. Default is regular trading hours only (09:30–16:00 ET).
Changed 2026-10-08: regular-hours bars on the 1-hour tier are stamped on the half hour (09:30 … 15:30 ET), 30 minutes later than the clock hours they replace. Each bar covers a new one-hour window starting on the half hour, so its open, high, low, close and volume are recomputed over that window, not merely restamped. This applies to every date, so a 1-hour-tier response cached before the change (older days are served
immutable) still carries the old clock-hour bars; re-fetch it without the cache.extended=truekeeps clock-aligned hours.
Responses
- 200
Bars, or a
no_datamarker — both200per UDF. - 400
Invalid request: the requested range is wider than the resolution's tier allows, or a parameter is missing or invalid (for example an unsupported
resolution, a malformedsymbol, or afrom/tooutside the representable range), asinvalid_parameter. Never charged. A parameter refused before metering (missing or malformed, an unsupportedresolution, a malformed symbol) carries noX-Credits-Remaining; a range refused by the history handler (too wide, or an unusablefrom/to) reached metering, was refunded, and carries it. - 401
Missing or invalid API key.
- 402
Never charged. One of:
insufficient_credits: the balance is below the request cost. CarriesX-Credits-Remaining.monthly_cap_reached: the account's monthly spend cap is used up; it resets at the start of next month. CarriesX-Credits-Remaining.daily_cap_reached: the plan's daily credit limit is used up; it resets at midnight ET. Refused before metering, so it carries noX-Credits-Remaining; carriesRetry-After(seconds to the reset).
- 403
Never charged. One of:
- the gateway's
forbidden: an unknown, revoked or expired API key. account_suspended: the account is not API-eligible. Not retryable.account_blocked: API access for this account is blocked; contact support. Refused before metering (noX-Credits-Remaining).not_entitled: the plan does not include this feature or symbol, or the symbol is a futures contract, which the API does not serve. Refused before metering (noX-Credits-Remaining).
- the gateway's
- 404
Unknown symbol or OCC option symbol (
symbol_not_found). Refused before metering: never charged, noX-Credits-Remaining. - 405
Only GET and HEAD are supported (
method_not_allowed). Refused before metering, not charged. - 429
Never charged. The gateway's
rate_limited(per-minute ceiling; noRetry-After, wait forX-RateLimit-Reset), or the API'stoo_many_concurrent_requests(too many requests in flight for this account; refused before metering,Retry-After: 1). - 500
The bars could not be built (
internal_error). Never a partial or unbuilt answer; retry the request. Refunded. - 503
datafeed_unavailable: the bar store could not answer (a cache failure, or the server could not read its own clock); retry.history_busy: this server is serving other large history reads; retry after theRetry-Afterheader (1 s). Both refunded. Also every code of the sharedUnavailableresponse (api_paused,credit_check_failed). - 504
gateway_timeout: the request ran longer than 25 seconds and was cancelled. Refunded; retry, or narrow the range.
Response fields
sstringrequiredStatus flag.
oktinteger[]requiredBar open times, Unix seconds (UTC), oldest-first.
onumber[]requiredOpens.
hnumber[]requiredHighs.
lnumber[]requiredLows.
cnumber[]requiredCloses.
vnumber[]requiredVolumes.
bvnumber[]Buy (aggressor) volume per bar, equities where available.
svnumber[]Sell (aggressor) volume per bar.
uvnumber[]Unclassified volume per bar.
Last updated