How to Get yfinance Python Real-Time Quotes and Percentage Change for Stocks?

18 Replies, 1145 Views

Yfinance python real time quotes and percentage change can be a bit hit or miss. I’ve found that the delay varies depending on the stock and market conditions.

For percentage change, I use this:
```python
import yfinance as yf

data = yf.download("AMZN", period="1d", interval="1m")
data['Pct_Change'] = data['Close'].pct_change() * 100
print(data[['Close', 'Pct_Change']].tail())
```
If you’re looking for alternatives, check out Quandl or Tiingo. They’ve got some good options for real-time data.

Messages In This Thread



Users browsing this thread: 1 Guest(s)