English
luckfu's notes.

Never forget your dreams!


  • Home

  • Archive

  • About

  • Page404

  • Search

Python uses the yahoo_financials_stmt package to get stock financial data from Yahoo Finance

Published at: 2022/05/21   |   Categories: python   finance   | Words: 181 words | Reading: 1 minutes | Visited:

    It is difficult to find a free stock financial data interface now. Extracting financial data from Yahoo Finance may be the easiest method in the free solution. Since yahoo Finance canceled API support, you can only write your own crawler or use a third-party library, but yahoo occasionally Page changes and regional restrictions also cause great trouble for crawling data.

    This article introduces the yahoo_financials_stmt package I recently submitted to get stock financial data Project address:https://github.com/luckfu/yahoo_financials_stmt

Usage:

Install yahoo_financials_stmt

pip install git+https://github.com/luckfu/yahoo_financials_stmt.git

Get Financials data

import datetime
from yahoo_financials_stmt import YahooFinancialsStmt
yfs = YahooFinancialsStmt()
finances=yfs.get_financials('box')

View Financials data

import datetime
from yahoo_financials_stmt import YahooFinancialsStmt
yfs = YahooFinancialsStmt()
finances.keys()

返回:

dict_keys(['balance_annual', 'balance_quarterly', 'earnings_annual', 'earnings_quarterly', 'income_annual', 'income_quarterly', 'cashflow_annual', 'cashflow_quarterly'])

balance annual

finances['balance_annual']

#python# #stock# #financials#

Declaration:Python uses the yahoo_financials_stmt package to get stock financial data from Yahoo Finance

Link:http://www.luckfu.com/en/post/python_yahoo_finances/

Author:luckfu

Declaration: This blog post article is under the CC BY-NC-SA 3.0 license,Please indicate the source!

If it can help you, you can give tips for blogger that how much you want. ^_^
WeChat Pay

Wechat Pay

Alipay

Ali Pay

paypal Pay

PayPal

Metabase Connect to Oracle Autonomous Database using wallet
Where is the Bluetooth PAN in macOS Monterey? 😡
  • Table of Content
  • Site Information
luckfu

luckfu

In a flash, all of the past away from you, the rest of the only memories.

5 Blogs
11 Categories
14 Tags
GitHub
TagCloud
  • Oracle cloud
  • Free vps
  • Vm.standard.a1.flex
  • Automation script
  • Bluetooth pan
  • Docker
  • Financials
  • Macos
  • Metabase
  • Monterey
  • Install yahoo_financials_stmt
  • Get Financials data
  • View Financials data
  • balance annual
© 2010 - 2025 luckfu's notes.
Powered by - Hugo v0.127.0 / Theme by - NexT
0%