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 15 3090
1-hour60 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 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 or D/W.

    1235153060240480DW
  • fromintegerint64required

    Window start, Unix seconds (UTC).

  • tointegerint64required

    Window end, Unix seconds (UTC).

  • countbackintegermin 1

    When set, return exactly this many bars ending at to (takes precedence over from, per the UDF spec).

  • extendedbooleandefault false

    Include extended-hours (pre / post-market) bars. Default is regular trading hours only (09:30–16:00 ET).

Responses

  • 200

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

  • 400

    The requested range is wider than the resolution's tier allows. Refunded, like every failed call.

  • 401

    Missing or invalid API key.

  • 402

    Credit balance is below the request cost.

  • 403

    Account is not API-eligible (suspended).

  • 429

    Per-minute rate limit exceeded.

  • 503

    The credit ledger or datafeed is temporarily unavailable.

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?