Skip to main content
GET
Python (SDK)

Authorizations

Authorization
string
header
required

OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.

Scopes

market:supplemental

News, company profiles, financials, filings, ETF data, technical analysis

Query Parameters

symbol
string
required

Stock ticker to query. Send the plain uppercase symbol exactly as you'd type it on a brokerage screen, e.g. AAPL, MSFT, TSLA.

resolution
enum<string>
required

How long each bar covers. Supported values are minutes (1, 5, 15, 30, 60) or daily/weekly/monthly (D, W, M). Other values return 400 Bad Request with error code VALIDATION_ERROR. Bar size: minutes (1, 5, 15, 30, 60), or daily, weekly, or monthly (D, W, M).

Available options:
1,
5,
15,
30,
60,
D,
W,
M
indicator
enum<string>
required

Which technical indicator to compute. Common picks: sma (simple moving average), ema (exponential moving average), rsi (relative strength index), macd (moving-average convergence-divergence), bbands (Bollinger Bands). See TechnicalIndicatorType for the full list of supported slugs. Technical indicator slug (e.g. sma, ema, rsi, macd, bbands). Pass this with the indicator endpoint to compute that indicator over the requested bars.

Available options:
sma,
ema,
rsi,
macd,
bbands,
stoch,
adx,
cci,
willr,
mfi
Example:

"rsi"

from
integer<int64>
required

Start timestamp (Unix seconds)

to
integer<int64>
required

End timestamp (Unix seconds)

timeperiod
integer

(Optional) Period for SMA/RSI/BBANDS

fast_period
integer

MACD fast EMA length, in bars. The shorter of the two moving averages used to compute MACD. Standard value is 12. Only used when indicator=macd.

slow_period
integer

MACD slow EMA length, in bars. The longer of the two moving averages used to compute MACD. Standard value is 26. Only used when indicator=macd.

signal_period
integer

MACD signal EMA length, in bars. Used to smooth the MACD line into the signal line; crossovers between the two are the basic MACD trading cue. Standard value is 9. Only used when indicator=macd.

Response

Successful response

Technical indicator values for a symbol over a time range, as returned by Finnhub; the keys present depend on the requested indicator.

sma
number[]

Simple moving average values, one per timestamp in t.

t
integer[]

Timestamps corresponding to each indicator value.