fix: reduce Alpaca multi-bar batch_size 200 → 100

Community reports 502 above ~100 symbols per request. Official docs have
no stated limit but 200 appears to be a ceiling. 100 is a safe conservative
default that avoids the 502 edge case with minimal performance impact
(500 tickers = 5 batches instead of 3).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
I Luk Kim 4 months ago
parent 22c1d975d4
commit bb2a06ce6e

@ -215,7 +215,7 @@ class AlpacaClient:
start: Optional[str] = None, start: Optional[str] = None,
end: Optional[str] = None, end: Optional[str] = None,
limit: int = 10000, limit: int = 10000,
batch_size: int = 200, batch_size: int = 100,
feed: Optional[str] = None, feed: Optional[str] = None,
) -> Dict[str, List[Dict]]: ) -> Dict[str, List[Dict]]:
""" """
@ -231,7 +231,7 @@ class AlpacaClient:
start: RFC-3339 date/datetime string start: RFC-3339 date/datetime string
end: RFC-3339 date/datetime string end: RFC-3339 date/datetime string
limit: Max bars per page (Alpaca max 10000) limit: Max bars per page (Alpaca max 10000)
batch_size: Max symbols per Alpaca request (default 200, ~1KB URL) batch_size: Max symbols per Alpaca request (default 100, conservative safe limit)
Returns: Returns:
Dict mapping normalized Alpaca symbol list of bar dicts Dict mapping normalized Alpaca symbol list of bar dicts

Loading…
Cancel
Save