Skip to main content

Finnhub API

Project description

finnhub-python

Requirements.

Python 2.7 and 3.4+

Installation

Install package

pip install finnhub-python

Getting Started

from __future__ import print_function

import time
import finnhub
from finnhub.rest import ApiException
from pprint import pprint

# Configure API key
configuration = finnhub.Configuration(
    api_key = {
        'token': 'YOUR_API_KEY'
    }
)

# Enter a context with an instance of the API client
with finnhub.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = finnhub.DefaultApi(api_client)
    symbol = 'AAPL' # str | symbol
    resolution = 'D' # str | Supported resolution includes <code>1, 5, 15, 30, 60, D, W, M </code>.Some timeframes might not be available depending on the exchange.

    try:
        # Aggregate Indicators
        api_response = api_instance.aggregate_indicator(symbol, resolution)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DefaultApi->aggregate_indicator: %s\n" % e)

API Endpoints

All URIs are relative to https://finnhub.io/api/v1

Class Method HTTP request Description
DefaultApi aggregate_indicator GET /scan/technical-indicator Aggregate Indicators
DefaultApi company_basic_financials GET /stock/metric Basic Financials
DefaultApi company_earnings GET /stock/earnings Earnings Surprises
DefaultApi company_eps_estimates GET /stock/eps-estimate Earnings Estimates
DefaultApi company_executive GET /stock/executive Company Executive
DefaultApi company_news GET /company-news Company News
DefaultApi company_peers GET /stock/peers Peers
DefaultApi company_profile GET /stock/profile Company Profile
DefaultApi company_profile2 GET /stock/profile2 Company Profile 2
DefaultApi company_revenue_estimates GET /stock/revenue-estimate Revenue Estimates
DefaultApi country GET /country Country Metadata
DefaultApi covid19 GET /covid19/us COVID-19
DefaultApi crypto_candles GET /crypto/candle Crypto Candles
DefaultApi crypto_exchanges GET /crypto/exchange Crypto Exchanges
DefaultApi crypto_symbols GET /crypto/symbol Crypto Symbol
DefaultApi earnings_calendar GET /calendar/earnings Earnings Calendar
DefaultApi economic_code GET /economic/code Economic Code
DefaultApi economic_data GET /economic Economic Data
DefaultApi filings GET /stock/filings Filings
DefaultApi financials GET /stock/financials Financial Statements
DefaultApi financials_reported GET /stock/financials-reported Financials As Reported
DefaultApi forex_candles GET /forex/candle Forex Candles
DefaultApi forex_exchanges GET /forex/exchange Forex Exchanges
DefaultApi forex_rates GET /forex/rates Forex rates
DefaultApi forex_symbols GET /forex/symbol Forex Symbol
DefaultApi fund_ownership GET /stock/fund-ownership Fund Ownership
DefaultApi general_news GET /news General News
DefaultApi investors_ownership GET /stock/investor-ownership Investors Ownership
DefaultApi ipo_calendar GET /calendar/ipo IPO Calendar
DefaultApi major_developments GET /major-development Major Developments
DefaultApi news_sentiment GET /news-sentiment News Sentiment
DefaultApi pattern_recognition GET /scan/pattern Pattern Recognition
DefaultApi price_target GET /stock/price-target Price Target
DefaultApi quote GET /quote Quote
DefaultApi recommendation_trends GET /stock/recommendation Recommendation Trends
DefaultApi stock_candles GET /stock/candle Stock Candles
DefaultApi stock_dividends GET /stock/dividend Dividends
DefaultApi stock_splits GET /stock/split Splits
DefaultApi stock_symbols GET /stock/symbol Stock Symbol
DefaultApi stock_tick GET /stock/tick Tick Data
DefaultApi support_resistance GET /scan/support-resistance Support/Resistance
DefaultApi technical_indicator GET /indicator Technical Indicators
DefaultApi transcripts GET /stock/transcripts Earnings Call Transcripts
DefaultApi transcripts_list GET /stock/transcripts/list Earnings Call Transcripts List
DefaultApi upgrade_downgrade GET /stock/upgrade-downgrade Stock Upgrade/Downgrade

Models

License

Apache License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

finnhub-python-1.1.1.tar.gz (71.0 kB view hashes)

Uploaded Source

Built Distribution

finnhub_python-1.1.1-py3-none-any.whl (137.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page