Update app.py
#1
by
eshan6704
- opened
app.py
CHANGED
|
@@ -8,7 +8,7 @@ import gradio as gr
|
|
| 8 |
|
| 9 |
API_KEY = "ITWJ6NDTF45CBTDO" # Consider using environment variables for API keys
|
| 10 |
|
| 11 |
-
def get_stock_candlestick_data(symbol, interval="
|
| 12 |
"""Fetch stock candlestick data from Alpha Vantage."""
|
| 13 |
url = f"https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol={symbol}&interval={interval}&apikey={API_KEY}&outputsize={output_size}"
|
| 14 |
response = requests.get(url)
|
|
|
|
| 8 |
|
| 9 |
API_KEY = "ITWJ6NDTF45CBTDO" # Consider using environment variables for API keys
|
| 10 |
|
| 11 |
+
def get_stock_candlestick_data(symbol, interval="15min", output_size="compact"):
|
| 12 |
"""Fetch stock candlestick data from Alpha Vantage."""
|
| 13 |
url = f"https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol={symbol}&interval={interval}&apikey={API_KEY}&outputsize={output_size}"
|
| 14 |
response = requests.get(url)
|