Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get actual stock prices with yfinance?

import yfinance as yf

stock = yf.Ticker("ABEV3.SA")

data1= stock.info


print(data1)

There is "bid" and "ask", but no actual stock price.

like image 847
Tiago Godoy Avatar asked Apr 08 '20 15:04

Tiago Godoy


1 Answers

Try this:

import yfinance as yf

stock = yf.Ticker("ABEV3.SA")
price = stock.info['regularMarketPrice']
print(price)
 
like image 97
cgrtamb Avatar answered Oct 18 '22 05:10

cgrtamb