Stock trades
market_tradesFetch historical US stock trades with price and share size for one or more tickers, filtering by time window; large results return a result_id for later SQL query.
Instructions
Historical trades for US stocks (price USD, size shares), one row per trade; trades Alpaca marks canceled or incorrect are dropped and counted in notes. Window by start/end or lookback (default PT20M). Large results are stored, not shown: you get a result_id to query with results_query.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Window end (same format). Default: now (Alpaca's latest available). | |
| sort | No | Time order of the rows: asc (oldest first, default) or desc (newest first). | asc |
| start | No | Window start: ISO date (00:00 UTC) or datetime with a zone, e.g. 2026-01-02T14:30:00Z. | |
| tickers | Yes | Stock tickers, e.g. ["AAPL", "BRK-B"] (1-200). | |
| lookback | No | Window length back from end as an ISO-8601 duration (P5D, P1Y, PT20M); only when start is omitted. Default PT20M. | |
| page_token | No | Continue a truncated fetch: the page_token from the previous response's pagination. |