Spaces:
Sleeping
Sleeping
Updated fmp URL
Browse files
app.py
CHANGED
|
@@ -36,11 +36,8 @@ def fetch_historical_price_data(symbol: str, start_date: str, end_date: str) ->
|
|
| 36 |
except ValueError:
|
| 37 |
return [{"error": "Invalid date format. Use 'YYYY-MM-DD'."}]
|
| 38 |
|
| 39 |
-
url =
|
| 40 |
-
|
| 41 |
-
f"{symbol}?from={start_date}&to={end_date}&apikey={FMP_KEY}"
|
| 42 |
-
)
|
| 43 |
-
|
| 44 |
try:
|
| 45 |
response = requests.get(url)
|
| 46 |
if response.status_code != 200:
|
|
|
|
| 36 |
except ValueError:
|
| 37 |
return [{"error": "Invalid date format. Use 'YYYY-MM-DD'."}]
|
| 38 |
|
| 39 |
+
url = f"https://financialmodelingprep.com/stable/historical-price-eod/light?symbol={symbol}&from={start_date}&to={end_date}apikey={FMP_KEY}"
|
| 40 |
+
|
|
|
|
|
|
|
|
|
|
| 41 |
try:
|
| 42 |
response = requests.get(url)
|
| 43 |
if response.status_code != 200:
|