Finnhub API
Project description
finnhub-python
- API documentation: https://finnhub.io/docs/api
- API version: 1.0.0
- Package version: 1.0.2
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_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_metrics | GET /stock/metric | Metrics |
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
- AggregateIndicators
- COVID19
- Company
- CompanyExecutive
- CompanyNewsStatistics
- CompanyProfile
- CompanyProfile2
- CryptoCandles
- CryptoSymbol
- Development
- Dividends
- EarningEstimate
- EarningRelease
- EarningResult
- EarningsCallTranscripts
- EarningsCallTranscriptsList
- EarningsEstimates
- Estimate
- Filing
- FinancialStatements
- FinancialsAsReported
- ForexCandles
- ForexSymbol
- Forexrates
- FundOwnership
- IPOEvent
- Indicator
- Investor
- InvestorsOwnership
- MajorDevelopments
- Metrics
- News
- NewsSentiment
- PriceTarget
- Quote
- RecommendationTrends
- Report
- RevenueEstimates
- Sentiment
- Splits
- Stock
- StockCandles
- StockTranscripts
- TechnicalAnalysis
- TechnicalIndicators
- TickData
- TranscriptContent
- TranscriptParticipant
- Trend
- UpgradeDowngrade
License
MIT License
Copyright (c) 2020 Finnhub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for finnhub_python-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eff980445f59404801f578cbc93cf114c09e07d4ea9374b17b0a61e260d7cc49 |
|
MD5 | 8f5dc6d965fe014b3e5ae94bcf6eaa2b |
|
BLAKE2b-256 | c3b498fbb71be1b34b365c0af3b42fd595485bd97c0995112f0f57f46e8057a9 |