

Output: contractSymbol lastTradeDate strike lastPrice. Let's look at the call options: opt.calls Now, we can download the option chain for a specific expiration date: opt = aapl.option_chain('') To download option chains, let's first get the list of expirations: aapl.options ('', Same goes for the cashflow: aapl.cashflow Let's download Apple's financials: aapl.financials Show only actions (dividends + splits): aapl.actions Output: Open High Low Close Volume Dividends Stock Splits Getting historical market data hist = aapl.history(period="max") 'quoteSourceName': 'Nasdaq Real Time Price',

Next, let's get information about the stock Here's how.įirst, import yfinance and create a ticker object: import yfinance as yf You can now download fundamental data, including company financials, balance sheet and cashflow, as well as option chain data. The recently updated yfinance added a lot more capabilities to this already popular library.
