FinnhubApi

interface FinnhubApi

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun aggregateIndicator(symbol: String, resolution: String): AggregateIndicators

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 here.

Link copied to clipboard
abstract suspend fun bondPrice(isin: String, from: Long, to: Long): Candles

Bond price data Get bond's price data. The following datasets are supported: Exchange Segment Delay US Government Bonds Government Bonds End-of-day FINRA Trace BTDS: US Corporate Bonds Delayed 4h FINRA Trace 144A Bonds Delayed 4h

Link copied to clipboard
abstract suspend fun bondProfile(isin: String?, cusip: String?, figi: String?): BondProfile

Bond Profile Get general information of a bond. You can query by FIGI, ISIN or CUSIP

Link copied to clipboard
abstract suspend fun bondTick(isin: String, date: LocalDate, limit: Long, skip: Long, exchange: String): BondTickData

Bond Tick Data Get trade-level data for bonds. The following datasets are supported: Exchange Segment Delay FINRA Trace BTDS: US Corporate Bonds Delayed 4h FINRA Trace 144A Bonds Delayed 4h

Link copied to clipboard
abstract suspend fun bondYieldCurve(code: String): BondYieldCurve

Bond Yield Curve

Link copied to clipboard
abstract suspend fun companyBasicFinancials(symbol: String, metric: String): BasicFinancials

Basic Financials Get company basic financials such as margin, P/E ratio, 52-week high/low etc.

Link copied to clipboard
abstract suspend fun companyEarnings(symbol: String, limit: Long?): List<EarningResult>

Earnings Surprises Get company historical quarterly earnings surprise going back to 2000.

Link copied to clipboard

Company Earnings Quality Score This endpoint provides Earnings Quality Score for global companies. Earnings quality refers to the extent to which current earnings predict future earnings. \"High-quality\" earnings are expected to persist, while \"low-quality\" earnings do not. A higher score means a higher earnings quality. Finnhub uses a proprietary model which takes into consideration 4 criteria:

Link copied to clipboard
abstract suspend fun companyEbitdaEstimates(symbol: String, freq: String?): EbitdaEstimates

EBITDA Estimates Get company's ebitda estimates.

Link copied to clipboard
abstract suspend fun companyEbitEstimates(symbol: String, freq: String?): EbitEstimates

EBIT Estimates Get company's ebit estimates.

Link copied to clipboard
abstract suspend fun companyEpsEstimates(symbol: String, freq: String?): EarningsEstimates

Earnings Estimates Get company's EPS estimates.

Link copied to clipboard
abstract suspend fun companyEsgScore(symbol: String): CompanyESG

Company ESG Scores This endpoint provides ESG scores and important indicators for 1000+ global companies. The data is collected through company's public ESG disclosure and public sources. Our ESG scoring models takes into account more than 150 different inputs to calculate the level of ESG risks and how well a company is managing them. A higher score means lower ESG risk or better ESG management. ESG scores are in the the range of 0-100. Some key indicators might contain letter-grade score from C- to A+ with C- is the lowest score and A+ is the highest score.

Link copied to clipboard
abstract suspend fun companyExecutive(symbol: String): CompanyExecutive

Company Executive Get a list of company's executives and members of the Board.

Link copied to clipboard
abstract suspend fun companyNews(symbol: String, from: LocalDate, to: LocalDate): List<CompanyNews>

Company News List latest company news by symbol. This endpoint is only available for North American companies.

Link copied to clipboard
abstract suspend fun companyPeers(symbol: String, grouping: String?): List<String>

Peers Get company peers. Return a list of peers operating in the same country and sector/industry.

Link copied to clipboard
abstract suspend fun companyProfile(symbol: String?, isin: String?, cusip: String?): CompanyProfile

Company Profile Get general information of a company. You can query by symbol, ISIN or CUSIP

Link copied to clipboard
abstract suspend fun companyProfile2(symbol: String?, isin: String?, cusip: String?): CompanyProfile2

Company Profile 2 Get general information of a company. You can query by symbol, ISIN or CUSIP. This is the free version of companyProfile.

Link copied to clipboard
abstract suspend fun companyRevenueEstimates(symbol: String, freq: String?): RevenueEstimates

Revenue Estimates Get company's revenue estimates.

Link copied to clipboard
abstract suspend fun country(): List<CountryMetadata>

Country Metadata List all countries and metadata.

Link copied to clipboard
abstract suspend fun covid19(): List<CovidInfo>

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 here

Link copied to clipboard
abstract suspend fun cryptoCandles(symbol: String, resolution: String, from: Long, to: Long): Candles

Crypto Candles Get candlestick data for crypto symbols.

Link copied to clipboard
abstract suspend fun cryptoExchanges(): List<String>

Crypto Exchanges List supported crypto exchanges

Link copied to clipboard
abstract suspend fun cryptoProfile(symbol: String): CryptoProfile

Crypto Profile Get crypto's profile.

Link copied to clipboard
abstract suspend fun cryptoSymbols(exchange: String): List<CryptoSymbol>

Crypto Symbol List supported crypto symbols by exchange

Link copied to clipboard
abstract suspend fun earningsCalendar(from: LocalDate?, to: LocalDate?, symbol: String?, international: Boolean?): EarningsCalendar

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.

Link copied to clipboard
abstract suspend fun economicCalendar(from: LocalDate?, to: LocalDate?): EconomicCalendar

Economic Calendar Get recent and upcoming economic releases.Historical events and surprises are available for Enterprise clients.

Link copied to clipboard
abstract suspend fun economicCode(): List<EconomicCode>

Economic Code List codes of supported economic data.

Link copied to clipboard
abstract suspend fun economicData(code: String): EconomicData

Economic Data Get economic data.

Link copied to clipboard
abstract suspend fun etfsCountryExposure(symbol: String): ETFsCountryExposure

ETFs Country Exposure Get ETF country exposure data.

Link copied to clipboard
abstract suspend fun etfsHoldings(symbol: String?, isin: String?, skip: Long?, date: String?): ETFsHoldings

ETFs Holdings Get full ETF holdings/constituents. This endpoint has global coverage. Widget only shows top 10 holdings.

Link copied to clipboard
abstract suspend fun etfsProfile(symbol: String?, isin: String?): ETFsProfile

ETFs Profile Get ETF profile information. This endpoint has global coverage.

Link copied to clipboard
abstract suspend fun etfsSectorExposure(symbol: String): ETFsSectorExposure

ETFs Sector Exposure Get ETF sector exposure data.

Link copied to clipboard

FDA Committee Meeting Calendar

Link copied to clipboard
abstract suspend fun filings(symbol: String?, cik: String?, accessNumber: String?, form: String?, from: LocalDate?, to: LocalDate?): List<Filing>

SEC Filings List company's filing. Limit to 250 documents at a time. This data is available for bulk download on here(https://www.kaggle.com/finnhub/sec-filings>Kaggle SEC Filings database).

Link copied to clipboard
abstract suspend fun filingsSentiment(accessNumber: String): SECSentimentAnalysis

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 Loughran and McDonald Sentiment Word Lists to calculate the sentiment for each filing.

Link copied to clipboard
abstract suspend fun financials(symbol: String, statement: String, freq: String): FinancialStatements

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 filings and internationalFilings endpoints.Wondering why our standardized data is different from Bloomberg, Reuters, Factset, S&P or Yahoo Finance ? Check out our here to learn more.

Link copied to clipboard
abstract suspend fun financialsReported(symbol: String?, cik: String?, accessNumber: String?, freq: String?, from: LocalDate?, to: LocalDate?): FinancialsAsReported

Financials As Reported Get financials as reported. This data is available for bulk download on Kaggle SEC Financials database.

Link copied to clipboard
abstract suspend fun forexCandles(symbol: String, resolution: String, from: Long, to: Long): Candles

Forex Candles Get candlestick data for forex symbols.

Link copied to clipboard
abstract suspend fun forexExchanges(): List<String>

Forex Exchanges List supported forex exchanges

Link copied to clipboard
abstract suspend fun forexRates(base: String?, date: String?): Forexrates

Forex rates Get rates for all forex pairs. Ideal for currency conversion

Link copied to clipboard
abstract suspend fun forexSymbols(exchange: String): List<ForexSymbol>

Forex Symbol List supported forex symbols.

Link copied to clipboard
abstract suspend fun fundOwnership(symbol: String, limit: Long?): FundOwnership

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 13F form, Schedule 13D and 13G for US market, UK Share Register for UK market, SEDI for Canadian market and equivalent filings for other international markets.

Link copied to clipboard
abstract suspend fun globalFilingsSearch(search: SearchBody): SearchResponse

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.This endpoint will return a list of documents that match your search criteria. If you would like to get the excerpts as well, please set highlighted to true. Once you have the list of documents, you can get a list of excerpts and positions to highlight the document using the searchInFiling endpoint. This endpoint is powered by here

Link copied to clipboard
abstract suspend fun globalFilingsSearchFilter(field: String, source: String?): SearchFilter

Search Filter

Link copied to clipboard
abstract suspend fun indicesConstituents(symbol: String): IndicesConstituents

Indices Constituents Get a list of index's constituents. A list of supported indices for this endpoint can be found here.

Link copied to clipboard

Indices Historical Constituents Get full history of index's constituents including symbols and dates of joining and leaving the Index. Currently support ^GSPC, ^NDX, ^DJI

Link copied to clipboard
abstract suspend fun insiderSentiment(symbol: String, from: LocalDate, to: LocalDate): InsiderSentiments

Insider Sentiment

Link copied to clipboard
abstract suspend fun insiderTransactions(symbol: String, from: LocalDate?, to: LocalDate?): InsiderTransactions

Insider Transactions Company insider transactions data sourced from Form 3,4,5, SEDI and relevant companies' filings. This endpoint covers US, Canada, Australia, and selected EU companies. Limit to 100 transactions per API call.

Link copied to clipboard
abstract suspend fun institutionalOwnership(symbol: String, cusip: String, from: String, to: String): InstitutionalOwnership

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.

Link copied to clipboard
abstract suspend fun institutionalPortfolio(cik: String, from: String, to: String): InstitutionalPortfolio

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 /api/v1/institutional/list?token=.

Link copied to clipboard
abstract suspend fun institutionalProfile(cik: String?): InstitutionalProfile

Institutional Profile Get a list of well-known institutional investors. Currently support 60+ profiles.

Link copied to clipboard
abstract suspend fun internationalFilings(symbol: String?, country: String?): List<InternationalFiling>

International Filings

Link copied to clipboard
abstract suspend fun investmentThemes(theme: String): InvestmentThemes

Investment Themes (Thematic Investing).

Link copied to clipboard
abstract suspend fun ipoCalendar(from: LocalDate, to: LocalDate): IPOCalendar

IPO Calendar. Get recent and upcoming IPO.

Link copied to clipboard
abstract suspend fun isinChange(from: String, to: String): IsinChange

ISIN Change Get a list of ISIN changes for EU-listed securities. Limit to 2000 events at a time.

Link copied to clipboard
abstract suspend fun marketNews(category: String, minId: Long?): List<MarketNews>

Market News Get latest market news.

Link copied to clipboard

Mutual Funds Country Exposure Get Mutual Funds country exposure data.

Link copied to clipboard
abstract suspend fun mutualFundEet(isin: String): MutualFundEet

Mutual Funds EET Get EET data for EU funds. For PAIs data, please see the EET PAI endpoint.

Link copied to clipboard
abstract suspend fun mutualFundEetPai(isin: String): MutualFundEetPai

Mutual Funds EET PAI Get EET PAI data for EU funds.

Link copied to clipboard
abstract suspend fun mutualFundHoldings(symbol: String?, isin: String?, skip: Long?): MutualFundHoldings

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.

Link copied to clipboard
abstract suspend fun mutualFundProfile(symbol: String?, isin: String?): MutualFundProfile

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.

Link copied to clipboard

Mutual Funds Sector Exposure Get Mutual Funds sector exposure data.

Link copied to clipboard
abstract suspend fun newsSentiment(symbol: String): NewsSentiment

News Sentiment Get company's news sentiment and statistics. This endpoint is only available for US companies.

Link copied to clipboard
abstract suspend fun ownership(symbol: String, limit: Long?): Ownership

Ownership Get a full list of shareholders of a company in descending order of the number of shares held. Data is sourced from 13F form, Schedule 13D and 13G for US market, UK Share Register for UK market, SEDI for Canadian market and equivalent filings for other international markets.

Link copied to clipboard
abstract suspend fun patternRecognition(symbol: String, resolution: String): PatternRecognition

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.

Link copied to clipboard
abstract suspend fun pressReleases(symbol: String, from: LocalDate?, to: LocalDate?): PressRelease

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.Full-text press releases data is available for Enterprise clients. here to learn more.

Link copied to clipboard
abstract suspend fun priceMetrics(symbol: String): PriceMetrics

Price Metrics Get company price performance statistics such as 52-week high/low, YTD return and much more.

Link copied to clipboard
abstract suspend fun priceTarget(symbol: String): PriceTarget

Price Target Get latest price target consensus.

Link copied to clipboard
abstract suspend fun quote(symbol: String): Quote

Quote Get real-time quote data for US stocks. Constant polling is not recommended. Use websocket if you need real-time updates.Real-time stock prices for international markets are supported for Enterprise clients via our partner's feed. here to learn more.

Link copied to clipboard
abstract suspend fun recommendationTrends(symbol: String): List<RecommendationTrend>

Recommendation Trends Get latest analyst recommendation trends for a company.

Link copied to clipboard
abstract suspend fun revenueBreakdown(symbol: String?, cik: String?): RevenueBreakdown

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.

Link copied to clipboard
abstract suspend fun searchInFiling(search: InFilingSearchBody): InFilingResponse

Search In Filing Get a list of excerpts and highlight positions within a document using your query.This endpoint is powered by here

Link copied to clipboard
abstract suspend fun sectorMetric(region: String): SectorMetric

Sector Metrics Get ratios for different sectors and regions/indices.

Link copied to clipboard
abstract suspend fun similarityIndex(symbol: String?, cik: String?, freq: String?): SimilarityIndex

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.

Link copied to clipboard
abstract suspend fun socialSentiment(symbol: String, from: LocalDate?, to: LocalDate?): SocialSentiment

Social Sentiment Get social sentiment for stocks on Reddit and Twitter. This endpoint is currently in Beta.

Link copied to clipboard
abstract suspend fun stockBasicDividends(symbol: String): Dividends2

Dividends 2 (Basic)

Link copied to clipboard
abstract suspend fun stockBidask(symbol: String): LastBidMinusAsk

Last Bid-Ask Get last bid/ask data for US stocks.

Link copied to clipboard
abstract suspend fun stockCandles(symbol: String, resolution: String, from: Long, to: Long): Candles

Stock Candles

Link copied to clipboard
abstract suspend fun stockDividends(symbol: String, from: LocalDate, to: LocalDate): List<Dividends>

Dividends

Link copied to clipboard
abstract suspend fun stockLobbying(symbol: String, from: LocalDate, to: LocalDate): LobbyingResult

Senate Lobbying

Link copied to clipboard
abstract suspend fun stockNbbo(symbol: String, date: LocalDate, limit: Long, skip: Long): HistoricalNBBO

Historical NBBO

Link copied to clipboard
abstract suspend fun stockSplits(symbol: String, from: LocalDate, to: LocalDate): List<Split>

Splits

Link copied to clipboard
abstract suspend fun stockSymbols(exchange: String, mic: String?, securityType: String?, currency: String?): List<StockSymbol>

Stock Symbol

Link copied to clipboard
abstract suspend fun stockTick(symbol: String, date: LocalDate, limit: Long, skip: Long): TickData

Tick Data Get historical tick data for global exchanges. You can send the request directly to our tick server at here with the same path and parameters or get redirected there if you call our main server.For US market, you can visit our bulk download page in the Dashboard to speed up the download process. See doc for supported exchanges, segments and delays.

Link copied to clipboard
abstract suspend fun stockUsaSpending(symbol: String, from: LocalDate, to: LocalDate): UsaSpendingResult

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.

Link copied to clipboard
abstract suspend fun stockUsptoPatent(symbol: String, from: LocalDate, to: LocalDate): UsptoPatentResult

USPTO Patents List USPTO patents for companies. Limit to 250 records per API call.

Link copied to clipboard
abstract suspend fun stockVisaApplication(symbol: String, from: LocalDate, to: LocalDate): VisaApplicationResult

H1-B Visa Application Get a list of H1-B and Permanent visa applications for companies from the DOL. The data is updated quarterly.

Link copied to clipboard

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.

Link copied to clipboard
abstract suspend fun supportResistance(symbol: String, resolution: String): SupportResistance

Support/Resistance Get support and resistance levels for a symbol.

Link copied to clipboard
abstract suspend fun symbolChange(from: String, to: String): SymbolChange

Symbol Change Get a list of symbol changes for US-listed, EU-listed, NSE and ASX securities. Limit to 2000 events at a time.

Link copied to clipboard
abstract suspend fun symbolSearch(q: String): SymbolLookup

Symbol Lookup Search for best-matching symbols based on your query. You can input anything from symbol, security's name to ISIN and Cusip.

Link copied to clipboard
abstract suspend fun technicalIndicator(symbol: String, resolution: String, from: Long, to: Long, indicator: String, indicatorFields: Map<String, Any>): TechnicalIndicator

Technical Indicators Return technical indicator with price data. List of supported indicators can be found here.

Link copied to clipboard
abstract suspend fun transcripts(id: String): EarningsCallTranscripts

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.

Link copied to clipboard
abstract suspend fun transcriptsList(symbol: String): EarningsCallTranscriptsList

Earnings Call Transcripts List List earnings call transcripts' metadata. This endpoint is available for US, UK, European, Australian and Canadian companies.

Link copied to clipboard
abstract suspend fun upgradeDowngrade(symbol: String?, from: LocalDate?, to: LocalDate?): List<UpgradeDowngrade>

Stock Upgrade/Downgrade Get latest stock upgrade and downgrade.