Yahoo Finance API

From NovaOrdis Knowledge Base
Revision as of 07:06, 14 October 2023 by Ovidiu (talk | contribs) (→‎download())
Jump to navigation Jump to search

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().