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

18 Replies, 1146 Views

Yfinance python real time quotes and percentage change can be a bit finicky, but it’s a good starting point. The delay is usually around 15 mins, so keep that in mind.

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

data = yf.download("TSLA", period="1d", interval="1m")
data['Pct_Change'] = data['Close'].pct_change() * 100
print(data[['Close', 'Pct_Change']].tail())
```
If you’re looking for more reliable real-time data, check out TradeStation or eSignal. They’re paid but worth it if you’re serious.

Messages In This Thread



Users browsing this thread: 1 Guest(s)