diff --git a/alpaca_trade_api/rest_async.py b/alpaca_trade_api/rest_async.py index bad717d0..79bd2101 100644 --- a/alpaca_trade_api/rest_async.py +++ b/alpaca_trade_api/rest_async.py @@ -5,7 +5,7 @@ EntityList, TradeV2, QuoteV2 import pandas as pd from alpaca_trade_api.common import URL, get_credentials, get_data_url - +from alpaca_trade_api.rest import DATA_V2_MAX_LIMIT class AsyncRest: def __init__(self, @@ -80,7 +80,7 @@ async def get_trades_async(self, symbol, start, end, limit=1000): payload = { "start": start, "end": end, - "limit": limit, + "limit": min(DATA_V2_MAX_LIMIT, limit), } df = await self._iterate_requests(symbol, payload, limit, _type, TradesV2)