View Source FinnhubAPI.Api.Default (finnhub_api v1.0.0)
API calls for all endpoints tagged Default
.
Summary
Functions
Aggregate Indicators Get aggregate signal of multiple technical indicators such as MACD, RSI, Moving Average v.v. A full list of indicators can be found <a href="https://docs.google.com/spreadsheets/d/1MWuy0WuT2yVlxr1KbPdggVygMZtJfunDnhe-C0GEXYM/edit?usp=sharing" target="_blank">here</a>.
Bond price data
Bond Profile Get general information of a bond. You can query by FIGI, ISIN or CUSIP. A list of supported bonds can be found <a href="/api/v1/bond/list?token=" target="_blank">here</a>.
Bond Yield Curve Get yield curve data for Treasury bonds.
Basic Financials Get company basic financials such as margin, P/E ratio, 52-week high/low etc.
Earnings Surprises Get company historical quarterly earnings surprise going back to 2000.
Company Earnings Quality Score
EBIT Estimates Get company's ebit estimates.
EBITDA Estimates Get company's ebitda estimates.
Earnings Estimates Get company's EPS estimates.
Company ESG Scores
Company Executive Get a list of company's executives and members of the Board.
Company News List latest company news by symbol. This endpoint is only available for North American companies.
Peers Get company peers. Return a list of peers operating in the same country and sector/industry.
Company Profile 2 Get general information of a company. You can query by symbol, ISIN or CUSIP. This is the free version of <a href="#company-profile">Company Profile</a>.
Company Profile Get general information of a company. You can query by symbol, ISIN or CUSIP
Revenue Estimates Get company's revenue estimates.
Congressional Trading Get stock trades data disclosed by members of congress.
Country Metadata List all countries and metadata.
COVID-19 Get real-time updates on the number of COVID-19 (Corona virus) cases in the US with a state-by-state breakdown. Data is sourced from CDC and reputable sources. You can also access this API <a href="https://rapidapi.com/Finnhub/api/finnhub-real-time-covid-19" target="_blank" rel="nofollow">here</a>
Crypto Candles Get candlestick data for crypto symbols.
Crypto Exchanges List supported crypto exchanges
Crypto Profile Get crypto's profile.
Crypto Symbol List supported crypto symbols by exchange
Earnings Calendar Get historical and coming earnings release. EPS and Revenue in this endpoint are non-GAAP, which means they are adjusted to exclude some one-time or unusual items. This is the same data investors usually react to and talked about on the media. Estimates are sourced from both sell-side and buy-side analysts.
Economic Calendar
Economic Code List codes of supported economic data.
Economic Data Get economic data.
ETFs Country Exposure Get ETF country exposure data.
ETFs Holdings Get full ETF holdings/constituents. This endpoint has global coverage. Widget only shows top 10 holdings. A list of supported ETFs can be found <a href="/api/v1/etf/list?token=" target="_blank">here</a>.
ETFs Profile Get ETF profile information. This endpoint has global coverage. A list of supported ETFs can be found <a href="/api/v1/etf/list?token=" target="_blank">here</a>.
ETFs Sector Exposure Get ETF sector exposure data.
FDA Committee Meeting Calendar FDA's advisory committees are established to provide functions which support the agency's mission of protecting and promoting the public health, while meeting the requirements set forth in the Federal Advisory Committee Act. Committees are either mandated by statute or established at the discretion of the Department of Health and Human Services. Each committee is subject to renewal at two-year intervals unless the committee charter states otherwise.
SEC Filings List company's filing. Limit to 250 documents at a time. This data is available for bulk download on <a href="https://www.kaggle.com/finnhub/sec-filings" target="_blank">Kaggle SEC Filings database</a>.
SEC Sentiment Analysis Get sentiment analysis of 10-K and 10-Q filings from SEC. An abnormal increase in the number of positive/negative words in filings can signal a significant change in the company's stock price in the upcoming 4 quarters. We make use of <a href= "https://sraf.nd.edu/textual-analysis/resources/" target="_blank">Loughran and McDonald Sentiment Word Lists</a> to calculate the sentiment for each filing.
Financial Statements
Financials As Reported Get financials as reported. This data is available for bulk download on <a href="https://www.kaggle.com/finnhub/reported-financials" target="_blank">Kaggle SEC Financials database</a>.
Forex Candles Get candlestick data for forex symbols.
Forex Exchanges List supported forex exchanges
Forex rates Get rates for all forex pairs. Ideal for currency conversion
Forex Symbol List supported forex symbols.
Fund Ownership Get a full list fund and institutional investors of a company in descending order of the number of shares held. Data is sourced from <code>13F form</code>, <code>Schedule 13D</code> and <code>13G</code> for US market, <code>UK Share Register</code> for UK market, <code>SEDI</code> for Canadian market and equivalent filings for other international markets.
Download Filings
Global Filings Search
Indices Constituents Get a list of index's constituents. A list of supported indices for this endpoint can be found <a href="/api/v1/index/list?token=" target="_blank">here</a>.
Indices Historical Constituents Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support <code>^GSPC</code>, <code>^NDX</code>, <code>^DJI</code>
Insider Sentiment Get insider sentiment data for US companies calculated using method discussed <a href="https://medium.com/@stock-api/finnhub-insiders-sentiment-analysis-cc43f9f64b3a" target="_blank">here</a>. The MSPR ranges from -100 for the most negative to 100 for the most positive which can signal price changes in the coming 30-90 days.
Insider Transactions Company insider transactions data sourced from <code>Form 3,4,5</code>, SEDI and relevant companies' filings. This endpoint covers US, UK, Canada, Australia, India, and all major EU markets. Limit to 100 transactions per API call.
Institutional Ownership Get a list institutional investors' positions for a particular stock overtime. Data from 13-F filings. Limit to 1 year of data at a time.
Institutional Portfolio Get the holdings/portfolio data of institutional investors from 13-F filings. Limit to 1 year of data at a time. You can get a list of supported CIK <a href="/api/v1/institutional/list?token=" target="_blank">here</a>.
Institutional Profile Get a list of well-known institutional investors. Currently support 60+ profiles.
International Filings List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data. Only support SEDAR and UK Companies House for normal usage. Enterprise clients who need access to the full filings for global markets should contact us for the access.
Investment Themes (Thematic Investing)
IPO Calendar Get recent and upcoming IPO.
ISIN Change Get a list of ISIN changes for EU-listed securities. Limit to 2000 events at a time.
Market Holiday Get a list of holidays for global exchanges.
Market News Get latest market news.
Market Status Get current market status for global exchanges (whether exchanges are open or close).
Mutual Funds Country Exposure Get Mutual Funds country exposure data.
Mutual Funds EET Get EET data for EU funds. For PAIs data, please see the EET PAI endpoint.
Mutual Funds EET PAI Get EET PAI data for EU funds.
Mutual Funds Holdings Get full Mutual Funds holdings/constituents. This endpoint covers both US and global mutual funds. For international funds, you must query the data using ISIN. A list of supported funds can be found <a href="/api/v1/mutual-fund/list?token=" target="_blank">here</a>.
Mutual Funds Profile Get mutual funds profile information. This endpoint covers both US and global mutual funds. For international funds, you must query the data using ISIN. A list of supported funds can be found <a href="/api/v1/mutual-fund/list?token=" target="_blank">here</a>.
Mutual Funds Sector Exposure Get Mutual Funds sector exposure data.
News Sentiment Get company's news sentiment and statistics. This endpoint is only available for US companies.
Ownership Get a full list of shareholders of a company in descending order of the number of shares held. Data is sourced from <code>13F form</code>, <code>Schedule 13D</code> and <code>13G</code> for US market, <code>UK Share Register</code> for UK market, <code>SEDI</code> for Canadian market and equivalent filings for other international markets.
Pattern Recognition Run pattern recognition algorithm on a symbol. Support double top/bottom, triple top/bottom, head and shoulders, triangle, wedge, channel, flag, and candlestick patterns.
Major Press Releases
Price Metrics Get company price performance statistics such as 52-week high/low, YTD return and much more.
Price Target Get latest price target consensus.
Recommendation Trends Get latest analyst recommendation trends for a company.
Revenue Breakdown Get revenue breakdown by product. This dataset is only available for US companies which disclose their revenue breakdown in the annual or quarterly reports.
Search In Filing
Sector Metrics Get ratios for different sectors and regions/indices.
Similarity Index
Social Sentiment
Dividends 2 (Basic) Get global dividends data.
Last Bid-Ask Get last bid/ask data for US stocks.
Dividends Get dividends data for common stocks going back 30 years.
Senate Lobbying Get a list of reported lobbying activities in the Senate and the House.
Historical NBBO
Splits Get splits data for stocks.
Stock Symbol List supported stocks. We use the following symbology to identify stocks on Finnhub <code>Exchange_Ticker.Exchange_Code</code>. A list of supported exchange codes can be found <a href="https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing" target="_blank">here</a>.
USA Spending Get a list of government's spending activities from USASpending dataset for public companies. This dataset can help you identify companies that win big government contracts which is extremely important for industries such as Defense, Aerospace, and Education.
USPTO Patents List USPTO patents for companies. Limit to 250 records per API call.
H1-B Visa Application Get a list of H1-B and Permanent visa applications for companies from the DOL. The data is updated quarterly.
Supply Chain Relationships
Support/Resistance Get support and resistance levels for a symbol.
Symbol Change Get a list of symbol changes for US-listed, EU-listed, NSE and ASX securities. Limit to 2000 events at a time.
Symbol Lookup Search for best-matching symbols based on your query. You can input anything from symbol, security's name to ISIN and Cusip.
Technical Indicators Return technical indicator with price data. List of supported indicators can be found <a href="https://docs.google.com/spreadsheets/d/1ylUvKHVYN2E87WdwIza8ROaCpd48ggEl1k5i5SgA29k/edit?usp=sharing" target="_blank">here</a>.
Earnings Call Transcripts
Earnings Call Transcripts List List earnings call transcripts' metadata. This endpoint is available for US, UK, European, Australian and Canadian companies.
Stock Upgrade/Downgrade Get latest stock upgrade and downgrade.
Functions
@spec aggregate_indicator(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.AggregateIndicators.t()} | {:error, Tesla.Env.t()}
Aggregate Indicators Get aggregate signal of multiple technical indicators such as MACD, RSI, Moving Average v.v. A full list of indicators can be found <a href="https://docs.google.com/spreadsheets/d/1MWuy0WuT2yVlxr1KbPdggVygMZtJfunDnhe-C0GEXYM/edit?usp=sharing" target="_blank">here</a>.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): symbolresolution
(String.t): Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.AggregateIndicators.t}
on success{:error, Tesla.Env.t}
on failure
@spec bond_price(Tesla.Env.client(), String.t(), integer(), integer(), keyword()) :: {:ok, FinnhubAPI.Model.BondCandles.t()} | {:error, Tesla.Env.t()}
Bond price data
Get bond's price data. The following datasets are supported:
Parameters
connection
(FinnhubAPI.Connection): Connection to serverisin
(String.t): ISIN.from
(integer()): UNIX timestamp. Interval initial value.to
(integer()): UNIX timestamp. Interval end value.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.BondCandles.t}
on success{:error, Tesla.Env.t}
on failure
@spec bond_profile( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.BondProfile.t()} | {:error, Tesla.Env.t()}
Bond Profile Get general information of a bond. You can query by FIGI, ISIN or CUSIP. A list of supported bonds can be found <a href="/api/v1/bond/list?token=" target="_blank">here</a>.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:isin
(String.t): ISIN:cusip
(String.t): CUSIP:figi
(String.t): FIGI
Returns
{:ok, FinnhubAPI.Model.BondProfile.t}
on success{:error, Tesla.Env.t}
on failure
bond_tick(connection, isin, date, limit, skip, exchange, opts \\ [])
View Source@spec bond_tick( Tesla.Env.client(), String.t(), Date.t(), integer(), integer(), String.t(), keyword() ) :: {:ok, FinnhubAPI.Model.BondTickData.t()} | {:error, Tesla.Env.t()}
Bond Tick Data
Get trade-level data for bonds. The following datasets are supported:
Parameters
connection
(FinnhubAPI.Connection): Connection to serverisin
(String.t): ISIN.date
(Date.t): Date: 2020-04-02.limit
(integer()): Limit number of ticks returned. Maximum value: <code>25000</code>skip
(integer()): Number of ticks to skip. Use this parameter to loop through the entire data.exchange
(String.t): Currently support the following values: <code>trace</code>.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.BondTickData.t}
on success{:error, Tesla.Env.t}
on failure
@spec bond_yield_curve(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.BondYieldCurve.t()} | {:error, Tesla.Env.t()}
Bond Yield Curve Get yield curve data for Treasury bonds.
Parameters
connection
(FinnhubAPI.Connection): Connection to servercode
(String.t): Bond's code. You can find the list of supported code <a href="https://docs.google.com/spreadsheets/d/1iA-lM0Kht7lsQZ7Uu_s6r2i1BbQNUNO9eGkO5-zglHg/edit?usp=sharing" target="_blank" rel="noopener">here</a>.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.BondYieldCurve.t}
on success{:error, Tesla.Env.t}
on failure
@spec company_basic_financials(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.BasicFinancials.t()} | {:error, Tesla.Env.t()}
Basic Financials Get company basic financials such as margin, P/E ratio, 52-week high/low etc.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.metric
(String.t): Metric type. Can be 1 of the following values <code>all</code>opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.BasicFinancials.t}
on success{:error, Tesla.Env.t}
on failure
@spec company_earnings(Tesla.Env.client(), String.t(), keyword()) :: {:ok, [FinnhubAPI.Model.EarningResult.t()]} | {:error, Tesla.Env.t()}
Earnings Surprises Get company historical quarterly earnings surprise going back to 2000.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.opts
(keyword): Optional parameters:limit
(integer()): Limit number of period returned. Leave blank to get the full history.
Returns
{:ok, [%EarningResult{}, ...]}
on success{:error, Tesla.Env.t}
on failure
company_earnings_quality_score(connection, symbol, freq, opts \\ [])
View Source@spec company_earnings_quality_score( Tesla.Env.client(), String.t(), String.t(), keyword() ) :: {:ok, FinnhubAPI.Model.CompanyEarningsQualityScore.t()} | {:error, Tesla.Env.t()}
Company Earnings Quality Score
This endpoint provides Earnings Quality Score for global companies.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol.freq
(String.t): Frequency. Currently support <code>annual</code> and <code>quarterly</code>opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.CompanyEarningsQualityScore.t}
on success{:error, Tesla.Env.t}
on failure
@spec company_ebit_estimates(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.EbitEstimates.t()} | {:error, Tesla.Env.t()}
EBIT Estimates Get company's ebit estimates.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.opts
(keyword): Optional parameters:freq
(String.t): Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code>
Returns
{:ok, FinnhubAPI.Model.EbitEstimates.t}
on success{:error, Tesla.Env.t}
on failure
@spec company_ebitda_estimates(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.EbitdaEstimates.t()} | {:error, Tesla.Env.t()}
EBITDA Estimates Get company's ebitda estimates.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.opts
(keyword): Optional parameters:freq
(String.t): Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code>
Returns
{:ok, FinnhubAPI.Model.EbitdaEstimates.t}
on success{:error, Tesla.Env.t}
on failure
@spec company_eps_estimates(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.EarningsEstimates.t()} | {:error, Tesla.Env.t()}
Earnings Estimates Get company's EPS estimates.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.opts
(keyword): Optional parameters:freq
(String.t): Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code>
Returns
{:ok, FinnhubAPI.Model.EarningsEstimates.t}
on success{:error, Tesla.Env.t}
on failure
@spec company_esg_score(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.CompanyEsg.t()} | {:error, Tesla.Env.t()}
Company ESG Scores
This endpoint provides ESG scores and important indicators for 7000+ global companies. The data is collected through company's public ESG disclosure and public sources.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.CompanyEsg.t}
on success{:error, Tesla.Env.t}
on failure
@spec company_executive(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.CompanyExecutive.t()} | {:error, Tesla.Env.t()}
Company Executive Get a list of company's executives and members of the Board.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.CompanyExecutive.t}
on success{:error, Tesla.Env.t}
on failure
@spec company_news(Tesla.Env.client(), String.t(), Date.t(), Date.t(), keyword()) :: {:ok, [FinnhubAPI.Model.CompanyNews.t()]} | {:error, Tesla.Env.t()}
Company News List latest company news by symbol. This endpoint is only available for North American companies.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Company symbol.from
(Date.t): From date <code>YYYY-MM-DD</code>.to
(Date.t): To date <code>YYYY-MM-DD</code>.opts
(keyword): Optional parameters
Returns
{:ok, [%CompanyNews{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec company_peers(Tesla.Env.client(), String.t(), keyword()) :: {:ok, [String.t()]} | {:error, Tesla.Env.t()}
Peers Get company peers. Return a list of peers operating in the same country and sector/industry.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.opts
(keyword): Optional parameters:grouping
(String.t): Specify the grouping criteria for choosing peers.Supporter values: <code>sector</code>, <code>industry</code>, <code>subIndustry</code>. Default to <code>subIndustry</code>.
Returns
{:ok, [%String{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec company_profile2( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.CompanyProfile2.t()} | {:error, Tesla.Env.t()}
Company Profile 2 Get general information of a company. You can query by symbol, ISIN or CUSIP. This is the free version of <a href="#company-profile">Company Profile</a>.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): Symbol of the company: AAPL e.g.:isin
(String.t): ISIN:cusip
(String.t): CUSIP
Returns
{:ok, FinnhubAPI.Model.CompanyProfile2.t}
on success{:error, Tesla.Env.t}
on failure
@spec company_profile( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.CompanyProfile.t()} | {:error, Tesla.Env.t()}
Company Profile Get general information of a company. You can query by symbol, ISIN or CUSIP
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): Symbol of the company: AAPL e.g.:isin
(String.t): ISIN:cusip
(String.t): CUSIP
Returns
{:ok, FinnhubAPI.Model.CompanyProfile.t}
on success{:error, Tesla.Env.t}
on failure
@spec company_revenue_estimates(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.RevenueEstimates.t()} | {:error, Tesla.Env.t()}
Revenue Estimates Get company's revenue estimates.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.opts
(keyword): Optional parameters:freq
(String.t): Can take 1 of the following values: <code>annual, quarterly</code>. Default to <code>quarterly</code>
Returns
{:ok, FinnhubAPI.Model.RevenueEstimates.t}
on success{:error, Tesla.Env.t}
on failure
@spec congressional_trading( Tesla.Env.client(), String.t(), Date.t(), Date.t(), keyword() ) :: {:ok, FinnhubAPI.Model.CongressionalTrading.t()} | {:error, Tesla.Env.t()}
Congressional Trading Get stock trades data disclosed by members of congress.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.from
(Date.t): From date <code>YYYY-MM-DD</code>.to
(Date.t): To date <code>YYYY-MM-DD</code>.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.CongressionalTrading.t}
on success{:error, Tesla.Env.t}
on failure
@spec country( Tesla.Env.client(), keyword() ) :: {:ok, [FinnhubAPI.Model.CountryMetadata.t()]} | {:error, Tesla.Env.t()}
Country Metadata List all countries and metadata.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters
Returns
{:ok, [%CountryMetadata{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec covid19( Tesla.Env.client(), keyword() ) :: {:ok, [FinnhubAPI.Model.CovidInfo.t()]} | {:error, Tesla.Env.t()}
COVID-19 Get real-time updates on the number of COVID-19 (Corona virus) cases in the US with a state-by-state breakdown. Data is sourced from CDC and reputable sources. You can also access this API <a href="https://rapidapi.com/Finnhub/api/finnhub-real-time-covid-19" target="_blank" rel="nofollow">here</a>
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters
Returns
{:ok, [%CovidInfo{}, ...]}
on success{:error, Tesla.Env.t}
on failure
crypto_candles(connection, symbol, resolution, from, to, opts \\ [])
View Source@spec crypto_candles( Tesla.Env.client(), String.t(), String.t(), integer(), integer(), keyword() ) :: {:ok, FinnhubAPI.Model.CryptoCandles.t()} | {:error, Tesla.Env.t()}
Crypto Candles Get candlestick data for crypto symbols.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Use symbol returned in <code>/crypto/symbol</code> endpoint for this field.resolution
(String.t): Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange.from
(integer()): UNIX timestamp. Interval initial value.to
(integer()): UNIX timestamp. Interval end value.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.CryptoCandles.t}
on success{:error, Tesla.Env.t}
on failure
@spec crypto_exchanges( Tesla.Env.client(), keyword() ) :: {:ok, [String.t()]} | {:error, Tesla.Env.t()}
Crypto Exchanges List supported crypto exchanges
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters
Returns
{:ok, [%String{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec crypto_profile(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.CryptoProfile.t()} | {:error, Tesla.Env.t()}
Crypto Profile Get crypto's profile.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Crypto symbol such as BTC or ETH.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.CryptoProfile.t}
on success{:error, Tesla.Env.t}
on failure
@spec crypto_symbols(Tesla.Env.client(), String.t(), keyword()) :: {:ok, [FinnhubAPI.Model.CryptoSymbol.t()]} | {:error, Tesla.Env.t()}
Crypto Symbol List supported crypto symbols by exchange
Parameters
connection
(FinnhubAPI.Connection): Connection to serverexchange
(String.t): Exchange you want to get the list of symbols from.opts
(keyword): Optional parameters
Returns
{:ok, [%CryptoSymbol{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec earnings_calendar( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.EarningsCalendar.t()} | {:error, Tesla.Env.t()}
Earnings Calendar Get historical and coming earnings release. EPS and Revenue in this endpoint are non-GAAP, which means they are adjusted to exclude some one-time or unusual items. This is the same data investors usually react to and talked about on the media. Estimates are sourced from both sell-side and buy-side analysts.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:from
(Date.t): From date: 2020-03-15.:to
(Date.t): To date: 2020-03-16.:symbol
(String.t): Filter by symbol: AAPL.:international
(boolean()): Set to <code>true</code> to include international markets. Default value is <code>false</code>
Returns
{:ok, FinnhubAPI.Model.EarningsCalendar.t}
on success{:error, Tesla.Env.t}
on failure
@spec economic_calendar( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.EconomicCalendar.t()} | {:error, Tesla.Env.t()}
Economic Calendar
Get recent and upcoming economic releases.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:from
(Date.t): From date <code>YYYY-MM-DD</code>.:to
(Date.t): To date <code>YYYY-MM-DD</code>.
Returns
{:ok, FinnhubAPI.Model.EconomicCalendar.t}
on success{:error, Tesla.Env.t}
on failure
@spec economic_code( Tesla.Env.client(), keyword() ) :: {:ok, [FinnhubAPI.Model.EconomicCode.t()]} | {:error, Tesla.Env.t()}
Economic Code List codes of supported economic data.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters
Returns
{:ok, [%EconomicCode{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec economic_data(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.EconomicData.t()} | {:error, Tesla.Env.t()}
Economic Data Get economic data.
Parameters
connection
(FinnhubAPI.Connection): Connection to servercode
(String.t): Economic code.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.EconomicData.t}
on success{:error, Tesla.Env.t}
on failure
@spec etfs_country_exposure( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.EtfsCountryExposure.t()} | {:error, Tesla.Env.t()}
ETFs Country Exposure Get ETF country exposure data.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): ETF symbol.:isin
(String.t): ETF isin.
Returns
{:ok, FinnhubAPI.Model.EtfsCountryExposure.t}
on success{:error, Tesla.Env.t}
on failure
@spec etfs_holdings( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.EtfsHoldings.t()} | {:error, Tesla.Env.t()}
ETFs Holdings Get full ETF holdings/constituents. This endpoint has global coverage. Widget only shows top 10 holdings. A list of supported ETFs can be found <a href="/api/v1/etf/list?token=" target="_blank">here</a>.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): ETF symbol.:isin
(String.t): ETF isin.:skip
(integer()): Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set.:date
(String.t): Query holdings by date. You can use either this param or <code>skip</code> param, not both.
Returns
{:ok, FinnhubAPI.Model.EtfsHoldings.t}
on success{:error, Tesla.Env.t}
on failure
@spec etfs_profile( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.EtfsProfile.t()} | {:error, Tesla.Env.t()}
ETFs Profile Get ETF profile information. This endpoint has global coverage. A list of supported ETFs can be found <a href="/api/v1/etf/list?token=" target="_blank">here</a>.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): ETF symbol.:isin
(String.t): ETF isin.
Returns
{:ok, FinnhubAPI.Model.EtfsProfile.t}
on success{:error, Tesla.Env.t}
on failure
@spec etfs_sector_exposure( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.EtfsSectorExposure.t()} | {:error, Tesla.Env.t()}
ETFs Sector Exposure Get ETF sector exposure data.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): ETF symbol.:isin
(String.t): ETF isin.
Returns
{:ok, FinnhubAPI.Model.EtfsSectorExposure.t}
on success{:error, Tesla.Env.t}
on failure
@spec fda_committee_meeting_calendar( Tesla.Env.client(), keyword() ) :: {:ok, [FinnhubAPI.Model.FdaComitteeMeeting.t()]} | {:error, Tesla.Env.t()}
FDA Committee Meeting Calendar FDA's advisory committees are established to provide functions which support the agency's mission of protecting and promoting the public health, while meeting the requirements set forth in the Federal Advisory Committee Act. Committees are either mandated by statute or established at the discretion of the Department of Health and Human Services. Each committee is subject to renewal at two-year intervals unless the committee charter states otherwise.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters
Returns
{:ok, [%FdaComitteeMeeting{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec filings( Tesla.Env.client(), keyword() ) :: {:ok, [FinnhubAPI.Model.Filing.t()]} | {:error, Tesla.Env.t()}
SEC Filings List company's filing. Limit to 250 documents at a time. This data is available for bulk download on <a href="https://www.kaggle.com/finnhub/sec-filings" target="_blank">Kaggle SEC Filings database</a>.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): Symbol. Leave <code>symbol</code>,<code>cik</code> and <code>accessNumber</code> empty to list latest filings.:cik
(String.t): CIK.:accessNumber
(String.t): Access number of a specific report you want to retrieve data from.:form
(String.t): Filter by form. You can use this value <code>NT 10-K</code> to find non-timely filings for a company.:from
(Date.t): From date: 2020-03-15.:to
(Date.t): To date: 2020-03-16.
Returns
{:ok, [%Filing{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec filings_sentiment(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.SecSentimentAnalysis.t()} | {:error, Tesla.Env.t()}
SEC Sentiment Analysis Get sentiment analysis of 10-K and 10-Q filings from SEC. An abnormal increase in the number of positive/negative words in filings can signal a significant change in the company's stock price in the upcoming 4 quarters. We make use of <a href= "https://sraf.nd.edu/textual-analysis/resources/" target="_blank">Loughran and McDonald Sentiment Word Lists</a> to calculate the sentiment for each filing.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveraccess_number
(String.t): Access number of a specific report you want to retrieve data from.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.SecSentimentAnalysis.t}
on success{:error, Tesla.Env.t}
on failure
@spec financials(Tesla.Env.client(), String.t(), String.t(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.FinancialStatements.t()} | {:error, Tesla.Env.t()}
Financial Statements
Get standardized balance sheet, income statement and cash flow for global companies going back 30+ years. Data is sourced from original filings most of which made available through SEC Filings and International Filings endpoints.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.statement
(String.t): Statement can take 1 of these values <code>bs, ic, cf</code> for Balance Sheet, Income Statement, Cash Flow respectively.freq
(String.t): Frequency can take 1 of these values <code>annual, quarterly, ttm, ytd</code>. TTM (Trailing Twelve Months) option is available for Income Statement and Cash Flow. YTD (Year To Date) option is only available for Cash Flow.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.FinancialStatements.t}
on success{:error, Tesla.Env.t}
on failure
@spec financials_reported( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.FinancialsAsReported.t()} | {:error, Tesla.Env.t()}
Financials As Reported Get financials as reported. This data is available for bulk download on <a href="https://www.kaggle.com/finnhub/reported-financials" target="_blank">Kaggle SEC Financials database</a>.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): Symbol.:cik
(String.t): CIK.:accessNumber
(String.t): Access number of a specific report you want to retrieve financials from.:freq
(String.t): Frequency. Can be either <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>.:from
(Date.t): From date <code>YYYY-MM-DD</code>. Filter for endDate.:to
(Date.t): To date <code>YYYY-MM-DD</code>. Filter for endDate.
Returns
{:ok, FinnhubAPI.Model.FinancialsAsReported.t}
on success{:error, Tesla.Env.t}
on failure
forex_candles(connection, symbol, resolution, from, to, opts \\ [])
View Source@spec forex_candles( Tesla.Env.client(), String.t(), String.t(), integer(), integer(), keyword() ) :: {:ok, FinnhubAPI.Model.ForexCandles.t()} | {:error, Tesla.Env.t()}
Forex Candles Get candlestick data for forex symbols.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Use symbol returned in <code>/forex/symbol</code> endpoint for this field.resolution
(String.t): Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange.from
(integer()): UNIX timestamp. Interval initial value.to
(integer()): UNIX timestamp. Interval end value.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.ForexCandles.t}
on success{:error, Tesla.Env.t}
on failure
@spec forex_exchanges( Tesla.Env.client(), keyword() ) :: {:ok, [String.t()]} | {:error, Tesla.Env.t()}
Forex Exchanges List supported forex exchanges
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters
Returns
{:ok, [%String{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec forex_rates( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.Forexrates.t()} | {:error, Tesla.Env.t()}
Forex rates Get rates for all forex pairs. Ideal for currency conversion
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:base
(String.t): Base currency. Default to EUR.:date
(String.t): Date. Leave blank to get the latest data.
Returns
{:ok, FinnhubAPI.Model.Forexrates.t}
on success{:error, Tesla.Env.t}
on failure
@spec forex_symbols(Tesla.Env.client(), String.t(), keyword()) :: {:ok, [FinnhubAPI.Model.ForexSymbol.t()]} | {:error, Tesla.Env.t()}
Forex Symbol List supported forex symbols.
Parameters
connection
(FinnhubAPI.Connection): Connection to serverexchange
(String.t): Exchange you want to get the list of symbols from.opts
(keyword): Optional parameters
Returns
{:ok, [%ForexSymbol{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec fund_ownership(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.FundOwnership.t()} | {:error, Tesla.Env.t()}
Fund Ownership Get a full list fund and institutional investors of a company in descending order of the number of shares held. Data is sourced from <code>13F form</code>, <code>Schedule 13D</code> and <code>13G</code> for US market, <code>UK Share Register</code> for UK market, <code>SEDI</code> for Canadian market and equivalent filings for other international markets.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.opts
(keyword): Optional parameters:limit
(integer()): Limit number of results. Leave empty to get the full list.
Returns
{:ok, FinnhubAPI.Model.FundOwnership.t}
on success{:error, Tesla.Env.t}
on failure
@spec global_filings_download(Tesla.Env.client(), String.t(), keyword()) :: {:error, Tesla.Env.t()}
Download Filings
Download filings using document ids.
Parameters
connection
(FinnhubAPI.Connection): Connection to serverdocument_id
(String.t): Document's id. Note that this is different from filingId as 1 filing can contain multiple documents.opts
(keyword): Optional parameters
Returns
{:ok, nil}
on success{:error, Tesla.Env.t}
on failure
@spec global_filings_search( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.SearchResponse.t()} | {:error, Tesla.Env.t()}
Global Filings Search
Search for best-matched filings across global companies' filings, transcripts and press releases. You can filter by anything from symbol, ISIN to form type, and document sources.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:body
(SearchBody): Search body
Returns
{:ok, FinnhubAPI.Model.SearchResponse.t}
on success{:error, Tesla.Env.t}
on failure
@spec global_filings_search_filter(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.SearchFilter.t()} | {:error, Tesla.Env.t()}
Search Filter
Get available values for each filter in search body.
Parameters
connection
(FinnhubAPI.Connection): Connection to serverfield
(String.t): Field to get available filters. Available filters are "countries", "exchanges", "exhibits", "forms", "gics", "naics", "caps", "acts", and "sort".opts
(keyword): Optional parameters:source
(String.t): Get available forms for each source.
Returns
{:ok, FinnhubAPI.Model.SearchFilter.t}
on success{:error, Tesla.Env.t}
on failure
@spec indices_constituents(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.IndicesConstituents.t()} | {:error, Tesla.Env.t()}
Indices Constituents Get a list of index's constituents. A list of supported indices for this endpoint can be found <a href="/api/v1/index/list?token=" target="_blank">here</a>.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): symbolopts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.IndicesConstituents.t}
on success{:error, Tesla.Env.t}
on failure
@spec indices_historical_constituents(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.IndicesHistoricalConstituents.t()} | {:error, Tesla.Env.t()}
Indices Historical Constituents Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support <code>^GSPC</code>, <code>^NDX</code>, <code>^DJI</code>
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): symbolopts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.IndicesHistoricalConstituents.t}
on success{:error, Tesla.Env.t}
on failure
@spec insider_sentiment(Tesla.Env.client(), String.t(), Date.t(), Date.t(), keyword()) :: {:ok, FinnhubAPI.Model.InsiderSentiments.t()} | {:error, Tesla.Env.t()}
Insider Sentiment Get insider sentiment data for US companies calculated using method discussed <a href="https://medium.com/@stock-api/finnhub-insiders-sentiment-analysis-cc43f9f64b3a" target="_blank">here</a>. The MSPR ranges from -100 for the most negative to 100 for the most positive which can signal price changes in the coming 30-90 days.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.from
(Date.t): From date: 2020-03-15.to
(Date.t): To date: 2020-03-16.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.InsiderSentiments.t}
on success{:error, Tesla.Env.t}
on failure
@spec insider_transactions(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.InsiderTransactions.t()} | {:error, Tesla.Env.t()}
Insider Transactions Company insider transactions data sourced from <code>Form 3,4,5</code>, SEDI and relevant companies' filings. This endpoint covers US, UK, Canada, Australia, India, and all major EU markets. Limit to 100 transactions per API call.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL. Leave this param blank to get the latest transactions.opts
(keyword): Optional parameters:from
(Date.t): From date: 2020-03-15.:to
(Date.t): To date: 2020-03-16.
Returns
{:ok, FinnhubAPI.Model.InsiderTransactions.t}
on success{:error, Tesla.Env.t}
on failure
institutional_ownership(connection, symbol, cusip, from, to, opts \\ [])
View Source@spec institutional_ownership( Tesla.Env.client(), String.t(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, FinnhubAPI.Model.InstitutionalOwnership.t()} | {:error, Tesla.Env.t()}
Institutional Ownership Get a list institutional investors' positions for a particular stock overtime. Data from 13-F filings. Limit to 1 year of data at a time.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Filter by symbol.cusip
(String.t): Filter by CUSIP.from
(String.t): From date <code>YYYY-MM-DD</code>.to
(String.t): To date <code>YYYY-MM-DD</code>.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.InstitutionalOwnership.t}
on success{:error, Tesla.Env.t}
on failure
@spec institutional_portfolio( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, FinnhubAPI.Model.InstitutionalPortfolio.t()} | {:error, Tesla.Env.t()}
Institutional Portfolio Get the holdings/portfolio data of institutional investors from 13-F filings. Limit to 1 year of data at a time. You can get a list of supported CIK <a href="/api/v1/institutional/list?token=" target="_blank">here</a>.
Parameters
connection
(FinnhubAPI.Connection): Connection to servercik
(String.t): Fund's CIK.from
(String.t): From date <code>YYYY-MM-DD</code>.to
(String.t): To date <code>YYYY-MM-DD</code>.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.InstitutionalPortfolio.t}
on success{:error, Tesla.Env.t}
on failure
@spec institutional_profile( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.InstitutionalProfile.t()} | {:error, Tesla.Env.t()}
Institutional Profile Get a list of well-known institutional investors. Currently support 60+ profiles.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:cik
(String.t): Filter by CIK. Leave blank to get the full list.
Returns
{:ok, FinnhubAPI.Model.InstitutionalProfile.t}
on success{:error, Tesla.Env.t}
on failure
@spec international_filings( Tesla.Env.client(), keyword() ) :: {:ok, [FinnhubAPI.Model.InternationalFiling.t()]} | {:error, Tesla.Env.t()}
International Filings List filings for international companies. Limit to 250 documents at a time. These are the documents we use to source our fundamental data. Only support SEDAR and UK Companies House for normal usage. Enterprise clients who need access to the full filings for global markets should contact us for the access.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): Symbol. Leave empty to list latest filings.:country
(String.t): Filter by country using country's 2-letter code.
Returns
{:ok, [%InternationalFiling{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec investment_themes(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.InvestmentThemes.t()} | {:error, Tesla.Env.t()}
Investment Themes (Thematic Investing)
Thematic investing involves creating a portfolio (or portion of a portfolio) by gathering together a collection of companies involved in certain areas that you predict will generate above-market returns over the long term. Themes can be based on a concept such as ageing populations or a sub-sector such as robotics, and drones. Thematic investing focuses on predicted long-term trends rather than specific companies or sectors, enabling investors to access structural, one-off shifts that can change an entire industry.
Parameters
connection
(FinnhubAPI.Connection): Connection to servertheme
(String.t): Investment theme. A full list of themes supported can be found <a target="_blank" href="https://docs.google.com/spreadsheets/d/1ULj9xDh4iPoQj279M084adZ2_S852ttRthKKJ7madYc/edit?usp=sharing">here</a>.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.InvestmentThemes.t}
on success{:error, Tesla.Env.t}
on failure
@spec ipo_calendar(Tesla.Env.client(), Date.t(), Date.t(), keyword()) :: {:ok, FinnhubAPI.Model.IpoCalendar.t()} | {:error, Tesla.Env.t()}
IPO Calendar Get recent and upcoming IPO.
Parameters
connection
(FinnhubAPI.Connection): Connection to serverfrom
(Date.t): From date: 2020-03-15.to
(Date.t): To date: 2020-03-16.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.IpoCalendar.t}
on success{:error, Tesla.Env.t}
on failure
@spec isin_change(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.IsinChange.t()} | {:error, Tesla.Env.t()}
ISIN Change Get a list of ISIN changes for EU-listed securities. Limit to 2000 events at a time.
Parameters
connection
(FinnhubAPI.Connection): Connection to serverfrom
(String.t): From date <code>YYYY-MM-DD</code>.to
(String.t): To date <code>YYYY-MM-DD</code>.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.IsinChange.t}
on success{:error, Tesla.Env.t}
on failure
@spec market_holiday(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.MarketHoliday.t()} | {:error, Tesla.Env.t()}
Market Holiday Get a list of holidays for global exchanges.
Parameters
connection
(FinnhubAPI.Connection): Connection to serverexchange
(String.t): Exchange code.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.MarketHoliday.t}
on success{:error, Tesla.Env.t}
on failure
@spec market_news(Tesla.Env.client(), String.t(), keyword()) :: {:ok, [FinnhubAPI.Model.MarketNews.t()]} | {:error, Tesla.Env.t()}
Market News Get latest market news.
Parameters
connection
(FinnhubAPI.Connection): Connection to servercategory
(String.t): This parameter can be 1 of the following values <code>general, forex, crypto, merger</code>.opts
(keyword): Optional parameters:minId
(integer()): Use this field to get only news after this ID. Default to 0
Returns
{:ok, [%MarketNews{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec market_status(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.MarketStatus.t()} | {:error, Tesla.Env.t()}
Market Status Get current market status for global exchanges (whether exchanges are open or close).
Parameters
connection
(FinnhubAPI.Connection): Connection to serverexchange
(String.t): Exchange code.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.MarketStatus.t}
on success{:error, Tesla.Env.t}
on failure
@spec mutual_fund_country_exposure( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.MutualFundCountryExposure.t()} | {:error, Tesla.Env.t()}
Mutual Funds Country Exposure Get Mutual Funds country exposure data.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): Symbol.:isin
(String.t): Fund's isin.
Returns
{:ok, FinnhubAPI.Model.MutualFundCountryExposure.t}
on success{:error, Tesla.Env.t}
on failure
@spec mutual_fund_eet(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.MutualFundEet.t()} | {:error, Tesla.Env.t()}
Mutual Funds EET Get EET data for EU funds. For PAIs data, please see the EET PAI endpoint.
Parameters
connection
(FinnhubAPI.Connection): Connection to serverisin
(String.t): ISIN.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.MutualFundEet.t}
on success{:error, Tesla.Env.t}
on failure
@spec mutual_fund_eet_pai(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.MutualFundEetPai.t()} | {:error, Tesla.Env.t()}
Mutual Funds EET PAI Get EET PAI data for EU funds.
Parameters
connection
(FinnhubAPI.Connection): Connection to serverisin
(String.t): ISIN.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.MutualFundEetPai.t}
on success{:error, Tesla.Env.t}
on failure
@spec mutual_fund_holdings( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.MutualFundHoldings.t()} | {:error, Tesla.Env.t()}
Mutual Funds Holdings Get full Mutual Funds holdings/constituents. This endpoint covers both US and global mutual funds. For international funds, you must query the data using ISIN. A list of supported funds can be found <a href="/api/v1/mutual-fund/list?token=" target="_blank">here</a>.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): Fund's symbol.:isin
(String.t): Fund's isin.:skip
(integer()): Skip the first n results. You can use this parameter to query historical constituents data. The latest result is returned if skip=0 or not set.
Returns
{:ok, FinnhubAPI.Model.MutualFundHoldings.t}
on success{:error, Tesla.Env.t}
on failure
@spec mutual_fund_profile( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.MutualFundProfile.t()} | {:error, Tesla.Env.t()}
Mutual Funds Profile Get mutual funds profile information. This endpoint covers both US and global mutual funds. For international funds, you must query the data using ISIN. A list of supported funds can be found <a href="/api/v1/mutual-fund/list?token=" target="_blank">here</a>.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): Fund's symbol.:isin
(String.t): Fund's isin.
Returns
{:ok, FinnhubAPI.Model.MutualFundProfile.t}
on success{:error, Tesla.Env.t}
on failure
@spec mutual_fund_sector_exposure( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.MutualFundSectorExposure.t()} | {:error, Tesla.Env.t()}
Mutual Funds Sector Exposure Get Mutual Funds sector exposure data.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): Mutual Fund symbol.:isin
(String.t): Fund's isin.
Returns
{:ok, FinnhubAPI.Model.MutualFundSectorExposure.t}
on success{:error, Tesla.Env.t}
on failure
@spec news_sentiment(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.NewsSentiment.t()} | {:error, Tesla.Env.t()}
News Sentiment Get company's news sentiment and statistics. This endpoint is only available for US companies.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Company symbol.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.NewsSentiment.t}
on success{:error, Tesla.Env.t}
on failure
@spec ownership(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.Ownership.t()} | {:error, Tesla.Env.t()}
Ownership Get a full list of shareholders of a company in descending order of the number of shares held. Data is sourced from <code>13F form</code>, <code>Schedule 13D</code> and <code>13G</code> for US market, <code>UK Share Register</code> for UK market, <code>SEDI</code> for Canadian market and equivalent filings for other international markets.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.opts
(keyword): Optional parameters:limit
(integer()): Limit number of results. Leave empty to get the full list.
Returns
{:ok, FinnhubAPI.Model.Ownership.t}
on success{:error, Tesla.Env.t}
on failure
@spec pattern_recognition(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.PatternRecognition.t()} | {:error, Tesla.Env.t()}
Pattern Recognition Run pattern recognition algorithm on a symbol. Support double top/bottom, triple top/bottom, head and shoulders, triangle, wedge, channel, flag, and candlestick patterns.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbolresolution
(String.t): Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.PatternRecognition.t}
on success{:error, Tesla.Env.t}
on failure
@spec press_releases(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.PressRelease.t()} | {:error, Tesla.Env.t()}
Major Press Releases
Get latest major press releases of a company. This data can be used to highlight the most significant events comprised of mostly press releases sourced from the exchanges, BusinessWire, AccessWire, GlobeNewswire, Newsfile, and PRNewswire.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Company symbol.opts
(keyword): Optional parameters:from
(Date.t): From time: 2020-01-01.:to
(Date.t): To time: 2020-01-05.
Returns
{:ok, FinnhubAPI.Model.PressRelease.t}
on success{:error, Tesla.Env.t}
on failure
@spec price_metrics(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.PriceMetrics.t()} | {:error, Tesla.Env.t()}
Price Metrics Get company price performance statistics such as 52-week high/low, YTD return and much more.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.opts
(keyword): Optional parameters:date
(String.t): Get data on a specific date in the past. The data is available weekly so your date will be automatically adjusted to the last day of that week.
Returns
{:ok, FinnhubAPI.Model.PriceMetrics.t}
on success{:error, Tesla.Env.t}
on failure
@spec price_target(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.PriceTarget.t()} | {:error, Tesla.Env.t()}
Price Target Get latest price target consensus.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.PriceTarget.t}
on success{:error, Tesla.Env.t}
on failure
@spec quote(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.Quote.t()} | {:error, Tesla.Env.t()}
Quote
Get real-time quote data for US stocks. Constant polling is not recommended. Use websocket if you need real-time updates.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbolopts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.Quote.t}
on success{:error, Tesla.Env.t}
on failure
@spec recommendation_trends(Tesla.Env.client(), String.t(), keyword()) :: {:ok, [FinnhubAPI.Model.RecommendationTrend.t()]} | {:error, Tesla.Env.t()}
Recommendation Trends Get latest analyst recommendation trends for a company.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol of the company: AAPL.opts
(keyword): Optional parameters
Returns
{:ok, [%RecommendationTrend{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec revenue_breakdown( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.RevenueBreakdown.t()} | {:error, Tesla.Env.t()}
Revenue Breakdown Get revenue breakdown by product. This dataset is only available for US companies which disclose their revenue breakdown in the annual or quarterly reports.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): Symbol.:cik
(String.t): CIK.
Returns
{:ok, FinnhubAPI.Model.RevenueBreakdown.t}
on success{:error, Tesla.Env.t}
on failure
@spec search_in_filing( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.InFilingResponse.t()} | {:error, Tesla.Env.t()}
Search In Filing
Get a list of excerpts and highlight positions within a document using your query.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:body
(InFilingSearchBody): Search body
Returns
{:ok, FinnhubAPI.Model.InFilingResponse.t}
on success{:error, Tesla.Env.t}
on failure
@spec sector_metric(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.SectorMetric.t()} | {:error, Tesla.Env.t()}
Sector Metrics Get ratios for different sectors and regions/indices.
Parameters
connection
(FinnhubAPI.Connection): Connection to serverregion
(String.t): Region. A list of supported values for this field can be found <a href="https://docs.google.com/spreadsheets/d/1afedyv7yWJ-z7pMjaAZK-f6ENY3mI3EBCk95QffpoHw/edit?usp=sharing" target="_blank">here</a>.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.SectorMetric.t}
on success{:error, Tesla.Env.t}
on failure
@spec similarity_index( Tesla.Env.client(), keyword() ) :: {:ok, FinnhubAPI.Model.SimilarityIndex.t()} | {:error, Tesla.Env.t()}
Similarity Index
Calculate the textual difference between a company's 10-K / 10-Q reports and the same type of report in the previous year using Cosine Similarity. For example, this endpoint compares 2019's 10-K with 2018's 10-K. Companies breaking from its routines in disclosure of financial condition and risk analysis section can signal a significant change in the company's stock price in the upcoming 4 quarters.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): Symbol. Required if cik is empty:cik
(String.t): CIK. Required if symbol is empty:freq
(String.t): <code>annual</code> or <code>quarterly</code>. Default to <code>annual</code>
Returns
{:ok, FinnhubAPI.Model.SimilarityIndex.t}
on success{:error, Tesla.Env.t}
on failure
@spec stock_basic_dividends(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.Dividends2.t()} | {:error, Tesla.Env.t()}
Dividends 2 (Basic) Get global dividends data.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.Dividends2.t}
on success{:error, Tesla.Env.t}
on failure
@spec stock_bidask(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.LastBidAsk.t()} | {:error, Tesla.Env.t()}
Last Bid-Ask Get last bid/ask data for US stocks.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.LastBidAsk.t}
on success{:error, Tesla.Env.t}
on failure
stock_candles(connection, symbol, resolution, from, to, opts \\ [])
View Source@spec stock_candles( Tesla.Env.client(), String.t(), String.t(), integer(), integer(), keyword() ) :: {:ok, FinnhubAPI.Model.StockCandles.t()} | {:error, Tesla.Env.t()}
Stock Candles
Get candlestick data (OHLCV) for stocks.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol.resolution
(String.t): Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange.from
(integer()): UNIX timestamp. Interval initial value.to
(integer()): UNIX timestamp. Interval end value.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.StockCandles.t}
on success{:error, Tesla.Env.t}
on failure
@spec stock_dividends(Tesla.Env.client(), String.t(), Date.t(), Date.t(), keyword()) :: {:ok, [FinnhubAPI.Model.Dividends.t()]} | {:error, Tesla.Env.t()}
Dividends Get dividends data for common stocks going back 30 years.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol.from
(Date.t): YYYY-MM-DD.to
(Date.t): YYYY-MM-DD.opts
(keyword): Optional parameters
Returns
{:ok, [%Dividends{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec stock_lobbying(Tesla.Env.client(), String.t(), Date.t(), Date.t(), keyword()) :: {:ok, FinnhubAPI.Model.LobbyingResult.t()} | {:error, Tesla.Env.t()}
Senate Lobbying Get a list of reported lobbying activities in the Senate and the House.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol.from
(Date.t): From date <code>YYYY-MM-DD</code>.to
(Date.t): To date <code>YYYY-MM-DD</code>.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.LobbyingResult.t}
on success{:error, Tesla.Env.t}
on failure
@spec stock_nbbo( Tesla.Env.client(), String.t(), Date.t(), integer(), integer(), keyword() ) :: {:ok, FinnhubAPI.Model.HistoricalNbbo.t()} | {:error, Tesla.Env.t()}
Historical NBBO
Get historical best bid and offer for US stocks, LSE, TSX, Euronext and Deutsche Borse.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol.date
(Date.t): Date: 2020-04-02.limit
(integer()): Limit number of ticks returned. Maximum value: <code>25000</code>skip
(integer()): Number of ticks to skip. Use this parameter to loop through the entire data.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.HistoricalNbbo.t}
on success{:error, Tesla.Env.t}
on failure
@spec stock_splits(Tesla.Env.client(), String.t(), Date.t(), Date.t(), keyword()) :: {:ok, [FinnhubAPI.Model.Split.t()]} | {:error, Tesla.Env.t()}
Splits Get splits data for stocks.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol.from
(Date.t): YYYY-MM-DD.to
(Date.t): YYYY-MM-DD.opts
(keyword): Optional parameters
Returns
{:ok, [%Split{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec stock_symbols(Tesla.Env.client(), String.t(), keyword()) :: {:ok, [FinnhubAPI.Model.StockSymbol.t()]} | {:error, Tesla.Env.t()}
Stock Symbol List supported stocks. We use the following symbology to identify stocks on Finnhub <code>Exchange_Ticker.Exchange_Code</code>. A list of supported exchange codes can be found <a href="https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing" target="_blank">here</a>.
Parameters
connection
(FinnhubAPI.Connection): Connection to serverexchange
(String.t): Exchange you want to get the list of symbols from. List of exchange codes can be found <a href="https://docs.google.com/spreadsheets/d/1I3pBxjfXB056-g_JYf_6o3Rns3BV2kMGG1nCatb91ls/edit?usp=sharing" target="_blank">here</a>.opts
(keyword): Optional parameters:mic
(String.t): Filter by MIC code.:securityType
(String.t): Filter by security type used by OpenFigi standard.:currency
(String.t): Filter by currency.
Returns
{:ok, [%StockSymbol{}, ...]}
on success{:error, Tesla.Env.t}
on failure
@spec stock_tick( Tesla.Env.client(), String.t(), Date.t(), integer(), integer(), keyword() ) :: {:ok, FinnhubAPI.Model.TickData.t()} | {:error, Tesla.Env.t()}
Tick Data
Get historical tick data for global exchanges.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol.date
(Date.t): Date: 2020-04-02.limit
(integer()): Limit number of ticks returned. Maximum value: <code>25000</code>skip
(integer()): Number of ticks to skip. Use this parameter to loop through the entire data.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.TickData.t}
on success{:error, Tesla.Env.t}
on failure
@spec stock_usa_spending( Tesla.Env.client(), String.t(), Date.t(), Date.t(), keyword() ) :: {:ok, FinnhubAPI.Model.UsaSpendingResult.t()} | {:error, Tesla.Env.t()}
USA Spending Get a list of government's spending activities from USASpending dataset for public companies. This dataset can help you identify companies that win big government contracts which is extremely important for industries such as Defense, Aerospace, and Education.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol.from
(Date.t): From date <code>YYYY-MM-DD</code>. Filter for <code>actionDate</code>to
(Date.t): To date <code>YYYY-MM-DD</code>. Filter for <code>actionDate</code>opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.UsaSpendingResult.t}
on success{:error, Tesla.Env.t}
on failure
@spec stock_uspto_patent( Tesla.Env.client(), String.t(), Date.t(), Date.t(), keyword() ) :: {:ok, FinnhubAPI.Model.UsptoPatentResult.t()} | {:error, Tesla.Env.t()}
USPTO Patents List USPTO patents for companies. Limit to 250 records per API call.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol.from
(Date.t): From date <code>YYYY-MM-DD</code>.to
(Date.t): To date <code>YYYY-MM-DD</code>.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.UsptoPatentResult.t}
on success{:error, Tesla.Env.t}
on failure
@spec stock_visa_application( Tesla.Env.client(), String.t(), Date.t(), Date.t(), keyword() ) :: {:ok, FinnhubAPI.Model.VisaApplicationResult.t()} | {:error, Tesla.Env.t()}
H1-B Visa Application Get a list of H1-B and Permanent visa applications for companies from the DOL. The data is updated quarterly.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol.from
(Date.t): From date <code>YYYY-MM-DD</code>. Filter on the <code>beginDate</code> column.to
(Date.t): To date <code>YYYY-MM-DD</code>. Filter on the <code>beginDate</code> column.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.VisaApplicationResult.t}
on success{:error, Tesla.Env.t}
on failure
@spec supply_chain_relationships(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.SupplyChainRelationships.t()} | {:error, Tesla.Env.t()}
Supply Chain Relationships
This endpoint provides an overall map of public companies' key customers and suppliers. The data offers a deeper look into a company's supply chain and how products are created. The data will help investors manage risk, limit exposure or generate alpha-generating ideas and trading insights.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbol.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.SupplyChainRelationships.t}
on success{:error, Tesla.Env.t}
on failure
@spec support_resistance(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.SupportResistance.t()} | {:error, Tesla.Env.t()}
Support/Resistance Get support and resistance levels for a symbol.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Symbolresolution
(String.t): Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.SupportResistance.t}
on success{:error, Tesla.Env.t}
on failure
@spec symbol_change(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.SymbolChange.t()} | {:error, Tesla.Env.t()}
Symbol Change Get a list of symbol changes for US-listed, EU-listed, NSE and ASX securities. Limit to 2000 events at a time.
Parameters
connection
(FinnhubAPI.Connection): Connection to serverfrom
(String.t): From date <code>YYYY-MM-DD</code>.to
(String.t): To date <code>YYYY-MM-DD</code>.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.SymbolChange.t}
on success{:error, Tesla.Env.t}
on failure
@spec symbol_search(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.SymbolLookup.t()} | {:error, Tesla.Env.t()}
Symbol Lookup Search for best-matching symbols based on your query. You can input anything from symbol, security's name to ISIN and Cusip.
Parameters
connection
(FinnhubAPI.Connection): Connection to serverq
(String.t): Query text can be symbol, name, isin, or cusip.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.SymbolLookup.t}
on success{:error, Tesla.Env.t}
on failure
technical_indicator(connection, symbol, resolution, from, to, indicator, opts \\ [])
View Source@spec technical_indicator( Tesla.Env.client(), String.t(), String.t(), integer(), integer(), String.t(), keyword() ) :: {:ok, Map.t()} | {:error, Tesla.Env.t()}
Technical Indicators Return technical indicator with price data. List of supported indicators can be found <a href="https://docs.google.com/spreadsheets/d/1ylUvKHVYN2E87WdwIza8ROaCpd48ggEl1k5i5SgA29k/edit?usp=sharing" target="_blank">here</a>.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): symbolresolution
(String.t): Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange.from
(integer()): UNIX timestamp. Interval initial value.to
(integer()): UNIX timestamp. Interval end value.indicator
(String.t): Indicator name. Full list can be found <a href="https://docs.google.com/spreadsheets/d/1ylUvKHVYN2E87WdwIza8ROaCpd48ggEl1k5i5SgA29k/edit?usp=sharing" target="_blank">here</a>.opts
(keyword): Optional parameters:body
(map()): Check out <a href="https://docs.google.com/spreadsheets/d/1ylUvKHVYN2E87WdwIza8ROaCpd48ggEl1k5i5SgA29k/edit?usp=sharing" target="_blank">this page</a> to see which indicators and params are supported.
Returns
{:ok, map()}
on success{:error, Tesla.Env.t}
on failure
@spec transcripts(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.EarningsCallTranscripts.t()} | {:error, Tesla.Env.t()}
Earnings Call Transcripts
Get earnings call transcripts, audio and participants' list. Data is available for US, UK, European, Australian and Canadian companies.
15+ years of data is available with 220,000+ audio which add up to 7TB in size.
Parameters
connection
(FinnhubAPI.Connection): Connection to serverid
(String.t): Transcript's id obtained with <a href="#transcripts-list">Transcripts List endpoint</a>.opts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.EarningsCallTranscripts.t}
on success{:error, Tesla.Env.t}
on failure
@spec transcripts_list(Tesla.Env.client(), String.t(), keyword()) :: {:ok, FinnhubAPI.Model.EarningsCallTranscriptsList.t()} | {:error, Tesla.Env.t()}
Earnings Call Transcripts List List earnings call transcripts' metadata. This endpoint is available for US, UK, European, Australian and Canadian companies.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Company symbol: AAPL. Leave empty to list the latest transcriptsopts
(keyword): Optional parameters
Returns
{:ok, FinnhubAPI.Model.EarningsCallTranscriptsList.t}
on success{:error, Tesla.Env.t}
on failure
@spec upgrade_downgrade( Tesla.Env.client(), keyword() ) :: {:ok, [FinnhubAPI.Model.UpgradeDowngrade.t()]} | {:error, Tesla.Env.t()}
Stock Upgrade/Downgrade Get latest stock upgrade and downgrade.
Parameters
connection
(FinnhubAPI.Connection): Connection to serveropts
(keyword): Optional parameters:symbol
(String.t): Symbol of the company: AAPL. If left blank, the API will return latest stock upgrades/downgrades.:from
(Date.t): From date: 2000-03-15.:to
(Date.t): To date: 2020-03-16.
Returns
{:ok, [%UpgradeDowngrade{}, ...]}
on success{:error, Tesla.Env.t}
on failure
social_sentiment(connection, symbol, opts \\ [])
View SourceSocial Sentiment
Get social sentiment for stocks on Reddit and Twitter.
Parameters
connection
(FinnhubAPI.Connection): Connection to serversymbol
(String.t): Company symbol.opts
(keyword): Optional parameters:from
(Date.t): From date <code>YYYY-MM-DD</code>.:to
(Date.t): To date <code>YYYY-MM-DD</code>.Returns
{:ok, FinnhubAPI.Model.SocialSentiment.t}
on success{:error, Tesla.Env.t}
on failure