cpatino10 commited on
Commit
9b5970b
·
verified ·
1 Parent(s): 5ee84ca

Updated fmp URL

Browse files
Files changed (1) hide show
  1. app.py +2 -5
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
- f"https://financialmodelingprep.com/api/v3/historical-price-full/"
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: