Realtime and historical stock data
Alpha Vantage provides free APIs for realtime and historical stock, forex, crypto data, technical indicators, and market news.
import requests
url = "https://www.alphavantage.co/query"
params = {
"function": "TIME_SERIES_DAILY",
"symbol": "IBM",
"apikey": "YOUR_API_KEY"
}
response = requests.get(url, params=params)
print(response.json())Last 50 checks (10 min intervals)