yh-finance

A Python package that wraps YH Finance API endpoints and returns financial data in JSON.

https://github.com/ag3ntz3r0/yh-finance

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.2%) to scientific vocabulary

Keywords

finance python stock stock-market yahoo-finance yahoo-finance-api
Last synced: 4 months ago · JSON representation ·

Repository

A Python package that wraps YH Finance API endpoints and returns financial data in JSON.

Basic Info
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 2
  • Open Issues: 1
  • Releases: 6
Topics
finance python stock stock-market yahoo-finance yahoo-finance-api
Created almost 4 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Contributing License Code of conduct Citation Security

README.md

yh_finance

A Python package that wraps YH Finance API endpoints and returns financial data in JSON. The API queries markets, stocks, news and conversations on Yahoo! Finance in real time to streamline the development of financial applications.

#### IMPORTANT LEGAL DISCLAIMER --- yh-finance is **not** affiliated, endorsed, or vetted by Yahoo, Inc. It is an open-source tool that uses a publicly available API and is intended for research and educational purposes.

Install

shell pip install yh_finance

Subscribe to YH Finance API

Tutorial

python import yh_finance as yhf

Default

Get auto complete suggestions by term or phrase. python json_resp = yhf.auto_complete(query='tesla', region='US', api_key='YOUR_API_KEY')

Market

Get live price quotes. python json_resp = yhf.get_quotes(region='US', symbols='AMD,IBM,AAPL', api_key='YOUR_API_KEY')

The live day gainers, losers, and actives in a specific region. python json_resp = yhf.get_movers(region='US', lang='en-US', count=5, api_key='YOUR_API_KEY')

Get live summary information of market by region. python json_resp = yhf.get_summary(region='US', api_key='YOUR_API_KEY')

Used with gettrendingtickers endpoint together to draw brief chart. python json_resp = yhf.get_spark(symbols='AMZN,AAPL,WDC,REYN,AZN', interval='1m', time_range='1d', api_key='YOUR_API_KEY')

Get recent earnings in the market. python json_resp = yhf.get_earnings(region='US', start_date='1585155600000', end_date='1589475600000', size=10, api_key='YOUR_API_KEY')

Get latest trending tickers in the market (Count 20). python json_resp = yhf.get_trending_tickers(region='US', api_key='YOUR_API_KEY')

Get popular watchlists in the market. python json_resp = yhf.get_popular_watchlists(api_key='YOUR_API_KEY')

Get performance information of specific watchlist. python json_resp = yhf.get_watchlist_performance(user_id='X3NJ2A7VDSABUI4URBWME2PZNM', portfolio_id='the_berkshire_hathaway_portfolio', symbols='^GSPC', region='US', api_key='YOUR_API_KEY')

Get detail information of specific watchlist. python json_resp = yhf.get_watchlist_detail(user_id='X3NJ2A7VDSABUI4URBWME2PZNM', portfolio_id='the_berkshire_hathaway_portfolio', api_key='YOUR_API_KEY')

Stock

Get data in summary section. python json_resp = yhf.get_summary(symbol='AMRN', region='US', api_key='YOUR_API_KEY')

Get symbols similar to the specified one. python json_resp = yhf.get_recommendations(symbol='INTC', api_key='YOUR_API_KEY')

Get upgrade and downgrade data. python json_resp = yhf.get_upgrades_downgrades(symbol='INTC', region='US', api_key='YOUR_API_KEY')

Get data to draw full screen chart. python json_resp = yhf.get_chart(interval='1mo', symbol='AMRN', time_range='1y', region='US', include_pre_post='false', use_yahoo_id='true', include_adj_close='true', events='capitalGain,div,split', api_key='YOUR_API_KEY')

Get data in statistics section. python json_resp = yhf.get_statistics(symbol='JD', api_key='YOUR_API_KEY')

Get data in historical section. python json_resp = yhf.get_historical_data(symbol='AMRN', region='US', api_key='YOUR_API_KEY')

Get data in profile section. python json_resp = yhf.get_profile(symbol='AMRN', region='US', api_key='YOUR_API_KEY')

Get income statement and annual data in financial section. python json_resp = yhf.get_financials(symbol='AMRN', region='US', api_key='YOUR_API_KEY')

Get quarterly data in financial section. python json_resp = yhf.get_timeseries(symbol='AMRN', start_date='493578000', end_date='1625011200', region='US', api_key='YOUR_API_KEY')

Get cash flow data in financial section. python json_resp = yhf.get_cash_flow(symbol='AMRN', region='US', api_key='YOUR_API_KEY')

Get balance sheet data in financial section. python json_resp = yhf.get_balance_sheet(symbol='AMRN', region='US', api_key='YOUR_API_KEY')

Get data in analysis section. python json_resp = yhf.get_analysis(symbol='AMRN', region='US', api_key='YOUR_API_KEY')

Get data in options section. python json_resp = yhf.get_options(symbol='AMRN', date='1562284800', region='US', api_key='YOUR_API_KEY')

Get major holders in holders section. python json_resp = yhf.get_holders(symbol='AMRN', region='US', api_key='YOUR_API_KEY')

Get data in holdings section. The symbol must be a mutual fund stock. python json_resp = yhf.get_holdings(symbol='AMRN', api_key='YOUR_API_KEY')

Get brief reports relating to the symbol. python json_resp = yhf.get_insights(symbol='AAPL', api_key='YOUR_API_KEY')

Get insider transaction data in the holders section. python json_resp = yhf.get_insider_transactions(symbol='AMRN', region='US', api_key='YOUR_API_KEY')

Get insider roster data in the holders section. python json_resp = yhf.get_insider_roster(symbol='AMRN', region='US', api_key='YOUR_API_KEY')

Conversation

Get conversations list relating to a symbol. python json_resp = yhf.get_conversation_list(symbol='AAPL', message_board_id='finmb_24937', region='US', user_activity='true', sort_by='createdAt', off='0', api_key='YOUR_API_KEY')

Owner

  • Name: Brandon J. Lacy
  • Login: AG3NTZ3R0
  • Kind: user

b i g d a t a - p y t h o n - f i n a n c e

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Lacy"
  given-names: "Brandon"
title: "yh-finance"
version: 0.0.6
date-released: 2022-03-10
url: "https://github.com/AG3NTZ3R0/yh-finance"

GitHub Events

Total
  • Watch event: 1
  • Fork event: 2
Last Year
  • Watch event: 1
  • Fork event: 2

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 7 hours
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 7 hours
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • AG3NTZ3R0 (1)
Pull Request Authors
  • AG3NTZ3R0 (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 42 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 6
  • Total maintainers: 1
pypi.org: yh-finance

A Python package that wraps YH Finance API endpoints and returns financial data in JSON format.

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 42 Last month
Rankings
Dependent packages count: 10.0%
Dependent repos count: 21.7%
Average: 25.0%
Forks count: 29.8%
Downloads: 31.3%
Stargazers count: 31.9%
Maintainers (1)
Last synced: 5 months ago

Dependencies

.github/workflows/pylint.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
pyproject.toml pypi
requirements.txt pypi
.github/workflows/unittest.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
requirements_dev.txt pypi
  • pylint ==3.0.3 development
  • requests ==2.31.0 development