New data API: how to get RECENT trades?

The docs at GitHub - alpacahq/alpaca-trade-api-python: Python client for Alpaca's trade API give an example of the API command to get trades:

api.get_trades(“AAPL”, “2021-02-08”, “2021-02-08”, limit=10)

in which the start and end are DATES. During the trading day, I want to get recent trades over the last few minutes for assets that have 100k’s of trades per day. So it would be crazy to pull the trades since the beginning of the day every time I want to get only the recent trades. Can I specify start and end TIMESTAMPS instead of DATES? Or, as an alternative, could I get a certain number (“limit”) of MOST RECENT trades rather than the first “limit” trades since the beginning of the day?

1 Like