From f4bdc7242c0bf7b138d307221623d9648e2bbcbd Mon Sep 17 00:00:00 2001 From: "Amjad Ali (MJ)" Date: Mon, 14 Oct 2024 13:19:47 -0500 Subject: [PATCH] It is now possible to request more than 10,000 trades using get_trades_async [see Bug #790] --- alpaca_trade_api/rest_async.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)