You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

jh-finance-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jh-finance-api

Discovering Financial Market Secrets

0.1.20
PyPI
Maintainers
1

Ecosystem

⭐ Portal: https://bit.ly/finance_analytics
📊 Blog: https://slashpage.com/jh-analytics

📈 Softrader: https://pypi.org/project/softrader

🐍 Python: https://github.com/jhvissotto/Project_Finance_Api_Python
🐍 Pypi: https://pypi.org/project/jh-finance-api

🟦 TScript: https://github.com/jhvissotto/Project_Finance_Api_TScript
🟦 NPM: https://www.npmjs.com/package/finance-analytics-api

🧮 PyHelpers: https://github.com/jhvissotto/Library_Python_Helpers

🔌 Server: https://bit.ly/jh_finance_api
🔌 Swagger: https://bit.ly/jh_finance_api_swagger

Library

!pip install jh_finance_api
from typing import Literal as Lit
import jh_finance_api as jh

Indexes

jh.index_us_dowjones.get()
#CompanySymbolWeightPriceChg% Chg
1Unitedhealth Group IncUNH8.19235525.05-15.39(-2.85%)
2Goldman Sachs Group IncGS7.74957470.81-40.42(-7.91%)
3Microsoft CorpMSFT5.65585359.84-13.27(-3.56%)
4Home Depot IncHD5.39512353.9-2.01(-0.56%)
5Sherwin Williams CoSHW5.1638332.06-8.59(-2.52%)
jh.index_us_nasdaq100.get()
#CompanySymbolPortfolio%PriceChg% Chg
1Apple IncAAPL8.83%188.38-14.81(-7.29%)
2Microsoft CorpMSFT8.35%359.84-13.27(-3.56%)
3NVIDIA CorpNVDA7.18%94.31-7.49(-7.36%)
4Amazon.com IncAMZN5.66%171-7.41(-4.15%)
5Broadcom IncAVGO3.54%146.29-7.72(-5.01%)
jh.index_us_sp500.get()
#CompanySymbolWeightPriceChg% Chg
1Apple Inc.AAPL6.67%188.38-14.81(-7.29%)
2Microsoft CorpMSFT6.06%359.84-13.27(-3.56%)
3Nvidia CorpNVDA5.45%94.31-7.49(-7.36%)
4Amazon.com IncAMZN3.68%171-7.41(-4.15%)
5Meta Platforms, Inc. Class AMETA2.54%504.73-26.89(-5.06%)

Info

info = jh.info.get(TICKER='MSFT')

Market

assert jh.market_history.PERIODS == Lit['1m','2m','5m','15m','30m','60m','90m','1h','1d','5d','1wk','1mo','3mo']
assert jh.market_history.UNTILS  == Lit['1d','5d','1mo','3mo','6mo','1y','2y','5y','10y','ytd','max']

jh.market_history.get(TICKER='MSFT', period='1mo', until='max')
DateAdj CloseCloseHighLowOpenVolume
2025-04-01 00:00:00373.11373.11385.08369.35374.6595966917
2025-03-01 00:00:00375.39375.39402.15367.24398.82491786600
2025-02-01 00:00:00396.196396.99419.31386.57411.6432448900
2025-01-01 00:00:00414.229415.06448.38410.72425.53462562700
2024-12-01 00:00:00420.657421.5456.16420.66421.57439902400

Financials

jh.financial_list.get(pages=10)
CountryTickerNameSlug
USAAAPLAppleapple
USANVDANVIDIAnvidia
USAMSFTMicrosoftmicrosoft
USAAMZNAmazonamazon
USAGOOGAlphabet (Google)alphabet-google
jh.financial_raw.get(slug='microsoft')
YearSharesCapitalDYieldRevenueIncomeAssetEquity
202574302.815e+060.8261800113610512160268470
202474303.2e+060.73227580101210411970206220
202374502.794e+060.7420409082580364840166540
202275001.787e+061.0618490079680333770141980
202175502.522e+060.6815328060720301310118300
Raw, Ratios = jh.financial_ratios.get(slug='microsoft')

print(Ratios)
NYearCap VarRev GrwAst GrwDYEYP/SP/AMarginROAE/A
02025-12.0315.0424.320.814.0410.755.543.422.252.4
-1202414.5311.5112.920.733.1614.067.7744.524.650.1
-2202356.3510.389.310.742.9613.697.6640.522.645.6
-32022-29.1420.6310.771.064.469.665.3543.123.942.5
-4202150.0314.185.150.682.4116.458.3739.620.239.3

Options

jh.options_stack.get(TICKER='MSFT')
CodeTickerPriceOptionExpiryStrikeVolumeOIAskBidIV
MSFT250411C00230000MSFT359.84CALL2025-04-1123030132.5128.151.71485
MSFT250411C00260000MSFT359.84CALL2025-04-1126021102.598.151.2959
MSFT250411C00290000MSFT359.84CALL2025-04-11290117368.71.05176
MSFT250411C00300000MSFT359.84CALL2025-04-11300303246358.850.930665
MSFT250411C00305000MSFT359.84CALL2025-04-11305nan158.558.71.20948
jh.options_stack_2.get(TICKER='MSFT')
CodeTickerPriceOptionExpiryStrikeVolumeOIAskMidBid
MSFT250411C00230000MSFT351.08CALL2025-04-1123003118.8120.52122.25
MSFT250411C00240000MSFT351.08CALL2025-04-1124000108.85110.55112.25
MSFT250411C00250000MSFT351.08CALL2025-04-112500099.15100.65102.15
MSFT250411C00260000MSFT351.08CALL2025-04-112600189.190.7592.4
MSFT250411C00270000MSFT351.08CALL2025-04-112700079.2581.1283

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts