Yahoo Finance API: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 28: Line 28:
=Ticker=
=Ticker=
{{Internal|Yahoo Finance API Ticker|Ticker}}
{{Internal|Yahoo Finance API Ticker|Ticker}}
=<tt>download()</tt>=
Provides both closing and [[Trading#Adjusted_Closing|adjusted closing]] price, unlike [[Yahoo Finance API Ticker|Ticker]] <code>history()</code>.

Revision as of 06:48, 14 October 2023

External

Internal

Overview

Installation

pip3 install yfinance

Usage

import yfinance as yf

m = yf.Ticker('FCOM').info
print("Close Price", m['regularMarketPreviousClose'])

# historical data, return a Pandas DataFrame.
data = yf.download('FCOM', '2023-10-01', '2023-10-13')

Ticker

Ticker

download()

Provides both closing and adjusted closing price, unlike Ticker history().