Atlas/API Reference/History

OHLCV price bars for a symbol and resolution

GEThttps://atlas-api.skylit.ai/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.

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.

TierResolutionsMax trading days / request
1-min1 2 3 5 10 15 30 4590
1-hour60 120 240 480720
1-dayD W2,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

  • symbolstringrequired

    Ticker (e.g. SPY).

  • resolutionstringrequired

    Bar size: intraday minutes, D (one day) or W (one week). Each bar is one candle of that size, built server-side; 1D and 1W are accepted as D and W. Any other value is a 400 (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. With extended=true intraday bars sit on the clock grid (for example 240 → 00:00, 04:00 … UTC). D is one session; W is one week, stamped Monday 00:00 UTC.

    Window. A bar belongs to the request whose [from, to) holds its OPEN time t, and it is always complete: the bar opening just before to includes its rows at and after to (if it is the current bar, it is still forming). A bar opening before from is not returned. When the window holds no bar but an earlier one exists, the answer is no_data with nextTime.

    12351015304560120240480DW
  • fromintegerint64required

    Window start, Unix seconds (UTC).

  • tointegerint64required

    Window end, Unix seconds (UTC).

  • countbackintegermin 1

    Accepted 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 moving from/to, which works as is.

  • extendedbooleandefault false

    Include 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=true keeps clock-aligned hours.

Responses

  • 200

    Bars, or a no_data marker — both 200 per 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 malformed symbol, or a from/to outside the representable range), as invalid_parameter. Never charged. A parameter refused before metering (missing or malformed, an unsupported resolution, a malformed symbol) carries no X-Credits-Remaining; a range refused by the history handler (too wide, or an unusable from/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. Carries X-Credits-Remaining.
    • monthly_cap_reached: the account's monthly spend cap is used up; it resets at the start of next month. Carries X-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 no X-Credits-Remaining; carries Retry-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 (no X-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 (no X-Credits-Remaining).
  • 404

    Unknown symbol or OCC option symbol (symbol_not_found). Refused before metering: never charged, no X-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; no Retry-After, wait for X-RateLimit-Reset), or the API's too_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 the Retry-After header (1 s). Both refunded. Also every code of the shared Unavailable response (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

  • sstringrequired

    Status flag.

    ok
  • tinteger[]required

    Bar open times, Unix seconds (UTC), oldest-first.

  • onumber[]required

    Opens.

  • hnumber[]required

    Highs.

  • lnumber[]required

    Lows.

  • cnumber[]required

    Closes.

  • vnumber[]required

    Volumes.

  • bvnumber[]

    Buy (aggressor) volume per bar, equities where available.

  • svnumber[]

    Sell (aggressor) volume per bar.

  • uvnumber[]

    Unclassified volume per bar.

Last updated

Was this page helpful?