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 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 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.0.3.tar.gz (67.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

finnhub_python-1.0.3-py3-none-any.whl (121.4 kB view details)

Uploaded Python 3

File details

Details for the file finnhub-python-1.0.3.tar.gz.

File metadata

  • Download URL: finnhub-python-1.0.3.tar.gz
  • Upload date:
  • Size: 67.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for finnhub-python-1.0.3.tar.gz
Algorithm Hash digest
SHA256 93dfc0cb423a6a0611ded3f69006d7c03aeb7808c3cee3a6721a5a0d4ba21936
MD5 8b6d776f9458688cf131f3e98fab84cd
BLAKE2b-256 a71396abfbf8ae0ac1265f469542a6409cc7af98e2a0f015c9186cb5262cf0c7

See more details on using hashes here.

File details

Details for the file finnhub_python-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: finnhub_python-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 121.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

File hashes

Hashes for finnhub_python-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a4cc15209389f5fef296f44190793e5090910cd3c1e8d6b2f3a42060537982c4
MD5 758e168420d0921183a304bc49fc6e73
BLAKE2b-256 271c18813833c01d3e2cb23033c4a8cbb82c9301f301b9ab344cb4d19e10d4a3

See more details on using hashes here.

Supported by

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