|
|
|
@ -333,13 +333,13 @@ async def get_snapshot(ticker: str):
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
async def get_snapshots(
|
|
|
|
async def get_snapshots(
|
|
|
|
tickers: str = Query(..., description="Comma-separated ticker symbols, e.g. AAPL,MSFT,NVDA"),
|
|
|
|
tickers: str = Query(..., description="Comma-separated ticker symbols, e.g. AAPL,MSFT,NVDA (max 1000)"),
|
|
|
|
):
|
|
|
|
):
|
|
|
|
symbols = [s.strip().upper() for s in tickers.split(",") if s.strip()]
|
|
|
|
symbols = [s.strip().upper() for s in tickers.split(",") if s.strip()]
|
|
|
|
if not symbols:
|
|
|
|
if not symbols:
|
|
|
|
raise HTTPException(status_code=400, detail="No tickers provided.")
|
|
|
|
raise HTTPException(status_code=400, detail="No tickers provided.")
|
|
|
|
if len(symbols) > 100:
|
|
|
|
if len(symbols) > 1000:
|
|
|
|
raise HTTPException(status_code=400, detail="Maximum 100 tickers per request.")
|
|
|
|
raise HTTPException(status_code=400, detail="Maximum 1000 tickers per request.")
|
|
|
|
|
|
|
|
|
|
|
|
client = AlpacaClient()
|
|
|
|
client = AlpacaClient()
|
|
|
|
if not client.is_configured():
|
|
|
|
if not client.is_configured():
|
|
|
|
|