Asish Karthikeya Gogineni commited on
Commit
318edb7
·
1 Parent(s): b9116fc

Fix: Mock data timestamps for intraday ranges to prevent overwriting points

Browse files
Files changed (1) hide show
  1. alphavantage_mcp.py +1 -1
alphavantage_mcp.py CHANGED
@@ -164,7 +164,7 @@ async def get_market_data(payload: dict):
164
  t = current_time - (time_delta * (num_points - i - 1))
165
 
166
  # Format timestamp based on data type
167
- if time_range == "INTRADAY":
168
  timestamp_str = t.strftime("%Y-%m-%d %H:%M:%S")
169
  else:
170
  timestamp_str = t.strftime("%Y-%m-%d")
 
164
  t = current_time - (time_delta * (num_points - i - 1))
165
 
166
  # Format timestamp based on data type
167
+ if time_range in ["INTRADAY", "1D", "3D", "1W"]:
168
  timestamp_str = t.strftime("%Y-%m-%d %H:%M:%S")
169
  else:
170
  timestamp_str = t.strftime("%Y-%m-%d")