Skip to content

It is now possible to request more than 10,000 trades using get_trades_async [see Bug #790] #791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions alpaca_trade_api/rest_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down