loneknightpy / yahoo-finance

Python module to get stock data from Yahoo! Finance

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yahoo-finance

Python module to get stock data from Yahoo! Finance

image

Yahoo! Finance backend is http://datatables.org/. If this service is down or has network problems you will receive errors from group YQL*, eg. YQLQueryError.

You can monitor this service via https://www.datatables.org/healthchecker/

More details yahoo-finance#44

Install

From PyPI with pip:

From development repo (requires git)

Usage examples

Get shares data

Example: Yahoo! Inc. (YHOO)

Refresh data from market

Historical data

More readable output :)

Available methods

  • get_price()
  • get_change()
  • get_percent_change()
  • get_volume()
  • get_prev_close()
  • get_open()
  • get_avg_daily_volume()
  • get_stock_exchange()
  • get_market_cap()
  • get_book_value()
  • get_ebitda()
  • get_dividend_share()
  • get_dividend_yield()
  • get_earnings_share()
  • get_days_high()
  • get_days_low()
  • get_year_high()
  • get_year_low()
  • get_50day_moving_avg()
  • get_200day_moving_avg()
  • get_price_earnings_ratio()
  • get_price_earnings_growth_ratio()
  • get_price_sales()
  • get_price_book()
  • get_short_ratio()
  • get_trade_datetime()
  • get_historical(start_date, end_date)
  • get_name()
  • refresh()
  • get_percent_change_from_year_high()
  • get_percent_change_from_year_low()
  • get_change_from_year_low()
  • get_change_from_year_high()
  • get_percent_change_from_200_day_moving_average()
  • get_change_from_200_day_moving_average()
  • get_percent_change_from_50_day_moving_average()
  • get_change_from_50_day_moving_average()
  • get_EPS_estimate_next_quarter()
  • get_EPS_estimate_next_year()
  • get_ex_dividend_date()
  • get_EPS_estimate_current_year()
  • get_price_EPS_estimate_next_year()
  • get_price_EPS_estimate_current_year()
  • get_one_yr_target_price()
  • get_change_percent_change()
  • get_dividend_pay_date()
  • get_currency()
  • get_last_trade_with_time()
  • get_days_range()
  • get_year_range()

Get currency data

Example: EUR/PLN (EURPLN=X)

Refresh data from market

Avalible methods

  • get_bid()
  • get_ask()
  • get_rate()
  • get_trade_datetime()
  • refresh()

Requirements

See requirements.txt

About

Python module to get stock data from Yahoo! Finance


Languages

Language:Python 100.0%