Skip to main content

Discovering Financial Market Secrets

Project description

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()
# Company Symbol Weight Price Chg % Chg
1 Unitedhealth Group Inc UNH 8.19235 525.05 -15.39 (-2.85%)
2 Goldman Sachs Group Inc GS 7.74957 470.81 -40.42 (-7.91%)
3 Microsoft Corp MSFT 5.65585 359.84 -13.27 (-3.56%)
4 Home Depot Inc HD 5.39512 353.9 -2.01 (-0.56%)
5 Sherwin Williams Co SHW 5.1638 332.06 -8.59 (-2.52%)
jh.index_us_nasdaq100.get()
# Company Symbol Portfolio% Price Chg % Chg
1 Apple Inc AAPL 8.83% 188.38 -14.81 (-7.29%)
2 Microsoft Corp MSFT 8.35% 359.84 -13.27 (-3.56%)
3 NVIDIA Corp NVDA 7.18% 94.31 -7.49 (-7.36%)
4 Amazon.com Inc AMZN 5.66% 171 -7.41 (-4.15%)
5 Broadcom Inc AVGO 3.54% 146.29 -7.72 (-5.01%)
jh.index_us_sp500.get()
# Company Symbol Weight Price Chg % Chg
1 Apple Inc. AAPL 6.67% 188.38 -14.81 (-7.29%)
2 Microsoft Corp MSFT 6.06% 359.84 -13.27 (-3.56%)
3 Nvidia Corp NVDA 5.45% 94.31 -7.49 (-7.36%)
4 Amazon.com Inc AMZN 3.68% 171 -7.41 (-4.15%)
5 Meta Platforms, Inc. Class A META 2.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')
Date Adj Close Close High Low Open Volume
2025-04-01 00:00:00 373.11 373.11 385.08 369.35 374.65 95966917
2025-03-01 00:00:00 375.39 375.39 402.15 367.24 398.82 491786600
2025-02-01 00:00:00 396.196 396.99 419.31 386.57 411.6 432448900
2025-01-01 00:00:00 414.229 415.06 448.38 410.72 425.53 462562700
2024-12-01 00:00:00 420.657 421.5 456.16 420.66 421.57 439902400

Financials

jh.financial_list.get(pages=10)
Country Ticker Name Slug
USA AAPL Apple apple
USA NVDA NVIDIA nvidia
USA MSFT Microsoft microsoft
USA AMZN Amazon amazon
USA GOOG Alphabet (Google) alphabet-google
jh.financial_raw.get(slug='microsoft')
Year Shares Capital DYield Revenue Income Asset Equity
2025 7430 2.815e+06 0.8 261800 113610 512160 268470
2024 7430 3.2e+06 0.73 227580 101210 411970 206220
2023 7450 2.794e+06 0.74 204090 82580 364840 166540
2022 7500 1.787e+06 1.06 184900 79680 333770 141980
2021 7550 2.522e+06 0.68 153280 60720 301310 118300
Raw, Ratios = jh.financial_ratios.get(slug='microsoft')

print(Ratios)
N Year Cap Var Rev Grw Ast Grw DY EY P/S P/A Margin ROA E/A
0 2025 -12.03 15.04 24.32 0.81 4.04 10.75 5.5 43.4 22.2 52.4
-1 2024 14.53 11.51 12.92 0.73 3.16 14.06 7.77 44.5 24.6 50.1
-2 2023 56.35 10.38 9.31 0.74 2.96 13.69 7.66 40.5 22.6 45.6
-3 2022 -29.14 20.63 10.77 1.06 4.46 9.66 5.35 43.1 23.9 42.5
-4 2021 50.03 14.18 5.15 0.68 2.41 16.45 8.37 39.6 20.2 39.3

Options

jh.options_stack.get(TICKER='MSFT')
Code Ticker Price Option Expiry Strike Volume OI Ask Bid IV
MSFT250411C00230000 MSFT 359.84 CALL 2025-04-11 230 3 0 132.5 128.15 1.71485
MSFT250411C00260000 MSFT 359.84 CALL 2025-04-11 260 2 1 102.5 98.15 1.2959
MSFT250411C00290000 MSFT 359.84 CALL 2025-04-11 290 1 1 73 68.7 1.05176
MSFT250411C00300000 MSFT 359.84 CALL 2025-04-11 300 303 24 63 58.85 0.930665
MSFT250411C00305000 MSFT 359.84 CALL 2025-04-11 305 nan 1 58.5 58.7 1.20948
jh.options_stack_2.get(TICKER='MSFT')
Code Ticker Price Option Expiry Strike Volume OI Ask Mid Bid
MSFT250411C00230000 MSFT 351.08 CALL 2025-04-11 230 0 3 118.8 120.52 122.25
MSFT250411C00240000 MSFT 351.08 CALL 2025-04-11 240 0 0 108.85 110.55 112.25
MSFT250411C00250000 MSFT 351.08 CALL 2025-04-11 250 0 0 99.15 100.65 102.15
MSFT250411C00260000 MSFT 351.08 CALL 2025-04-11 260 0 1 89.1 90.75 92.4
MSFT250411C00270000 MSFT 351.08 CALL 2025-04-11 270 0 0 79.25 81.12 83

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

jh_finance_api-0.1.21.tar.gz (251.5 kB view details)

Uploaded Source

Built Distribution

jh_finance_api-0.1.21-py2.py3-none-any.whl (273.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file jh_finance_api-0.1.21.tar.gz.

File metadata

  • Download URL: jh_finance_api-0.1.21.tar.gz
  • Upload date:
  • Size: 251.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Windows/10

File hashes

Hashes for jh_finance_api-0.1.21.tar.gz
Algorithm Hash digest
SHA256 a4cb6b8359dcf51a4459c0d07e2e9a451e7d37fa2d3071808ebc0ad2c0040639
MD5 858bc5fd21e0fbc74da564befdb87de2
BLAKE2b-256 3a6ef38aaedaab7a1238f5984b6c66f108e334172f6b090b3f7af3da2b1719f4

See more details on using hashes here.

File details

Details for the file jh_finance_api-0.1.21-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for jh_finance_api-0.1.21-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 460a8e4003eda94e48353a990bf322e0784cab4f2158fe0dd6d56b9eae5e6eca
MD5 30c4d276a16f66cf1a76253708c7ed33
BLAKE2b-256 2916162141d344ff39f57b4c3bfb00035a1fd2fb629edf96362bda1b95c9c6ba

See more details on using hashes here.

Supported by

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