Skip to main content

Stock Candles

  • Last updated
  • View as Markdown

Get historical price candles for stocks or ETFs.

Endpoint

https://api.marketdata.app/v1/stocks/candles/{resolution}/{symbol}/

Method

GET

Request Example

Response Example

{
"s": "ok",
"c": [217.68, 221.03, 219.89],
"h": [222.49, 221.5, 220.94],
"l": [217.19, 217.1402, 218.83],
"o": [221.03, 218.55, 220],
"t": [1569297600, 1569384000, 1569470400],
"v": [33463820, 24018876, 20730608]
}

Request Parameters

  • resolution string

    The duration of each candle. Case-insensitive.

    Intraday Resolutions:

    • Minutely Resolutions: (minutely, 1, 3, 5, 15, 30, 45, ...)
    • Hourly Resolutions: (hourly, H, 1H, 2H, ...)

    Daily Resolutions:

    • Daily Resolutions: (daily, D, 1D, 2D, ...)
    • Weekly Resolutions: (weekly, W, 1W, 2W, ...)
    • Monthly Resolutions: (monthly, M, 1M, 2M, ...)
    • Yearly Resolutions: (yearly, Y, 1Y, 2Y, ...)
  • symbol string

    The company's ticker symbol.

Split and Dividend Adjustments

Only three price series are supported: raw, split-only, and fully adjusted (CRSP-style). There is no dividend-only series — no data source publishes one — so that combination is rejected with an HTTP 400.

Daily — the adjustsplits=false, adjustdividends=true combination is rejected. Because adjustdividends defaults to true on daily candles, this is most commonly triggered by passing adjustsplits=false alone. To receive raw prices on daily candles, set both adjustsplits=false and adjustdividends=false.

adjustsplitsadjustdividendsSeriesResult
falsefalseraw
truefalsesplit-only
truetruefully adjusted✅ (default)
falsetruedividend-only❌ HTTP 400

The rejected daily combination returns:

{"s":"error","errmsg":"Unsupported parameter combination: adjustsplits=false with adjustdividends=true. Note: adjustdividends defaults to true on daily candles, so if your request only sets adjustsplits=false (without explicitly setting adjustdividends), dividend adjustment is still being applied via the default. Dividend-only adjustment is not supported. To receive unadjusted prices, set both adjustsplits=false and adjustdividends=false explicitly. To keep CRSP-style full adjustment, omit adjustsplits (or set it to true)."}

Intraday — any adjustdividends=true is rejected regardless of adjustsplits, because no intraday data source implements dividend adjustment. The intraday default is false, so the error only occurs on an explicit adjustdividends=true.

adjustsplitsadjustdividendsSeriesResult
falsefalseraw✅ (default)
truefalsesplit-only
falsetruedividend-only❌ HTTP 400
truetruefully adjusted❌ HTTP 400

Both rejected intraday combinations return:

{"s":"error","errmsg":"adjustdividends=true is not supported for intraday candles. Dividend adjustment is only available for daily resolutions."}

Response Attributes

  • s string

    ll always be ok when there is data for the candles requested.

  • o array[number]

    Open price.

  • h array[number]

    High price.

  • l array[number]

    Low price.

  • c array[number]

    Close price.

  • v array[number]

    Volume.

  • t array[number]

    Candle time. For intraday candles, this is the candle's start time. For daily and longer resolutions, this is midnight US Eastern Time on the session date. All timestamps use US Eastern Time (America/New_York). See Response Timezone for details.

Usage Information

Data Availability

Real-time data is not available for this endpoint under any plan or entitlement. The type of candle data you receive depends on your user type and UTP entitlement. This may include 15-minute delayed candles or historical candles (1 day old), depending on the plan or access level.

User TypeUTP EntitlementCandle Type
Non-Professional15-min delayed
Non-ProfessionalHistorical (1 day old)
ProfessionalAnyHistorical (1 day old)
UnknownAnyHistorical (1 day old)
What are entitlements?

Entitlements are permissions granted by exchanges that allow access to their data. To get 15-minute delayed candles, non-professional users need to sign the UTP agreement. Learn more about entitlements.

Pricing

The cost of using the candle API endpoint is 1 credit per 1000 candles.

Data TypeCost BasisCredits Required per Unit
15-minute Delayed DataPer 1000 candles1 credit
Historical DataPer 1000 candles1 credit
Real-Time DataNot availableN/A