- Live API Reference
- Trade Flow Data
- Stocks
- Recent Trades
Stocks Recent Trades API
Recent stock trades for a symbol, newest first. Each row carries timestamp, price, size, side, block flag, and the prevailing bid/ask.
Endpoint
X-Api-Key)
Rate Limited: Yes
Plan: Alpha+
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
symbol |
path | string | required | - | Stock symbol |
limit |
query | integer | 50 | Number of trades, clamped to 1..500. Non-numeric values return a 400 problem-details body. |
Request
curl -H "X-Api-Key: YOUR_API_KEY" \
"https://lab.flashalpha.com/v1/flow/stocks/SPY/recent?limit=10"import requests
resp = requests.get(
"https://lab.flashalpha.com/v1/flow/stocks/SPY/recent",
headers={"X-Api-Key": "YOUR_API_KEY"}
)
resp.raise_for_status()
data = resp.json()
print(f"{data['count']} of {data['totalAvailable']} buffered trades")const resp = await fetch(
"https://lab.flashalpha.com/v1/flow/stocks/SPY/recent",
{ headers: { "X-Api-Key": "YOUR_API_KEY" } }
);
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
const data = await resp.json();
console.log(data.count + " of " + data.totalAvailable + " buffered trades");Try it live
Runs on live market data and uses 1 request from your daily quota.
Response
{
"symbol": "SPY",
"count": 3,
"totalAvailable": 3,
"trades": [
{
"ts": "2026-10-30T13:46:04.5470833Z",
"price": 760.21,
"size": 159,
"side": "buy",
"isBlock": false,
"bid": 760.19,
"ask": 760.21
},
{
"ts": "2026-10-30T13:46:04.5138083Z",
"price": 760.2,
"size": 2,
"side": "mid",
"isBlock": false,
"bid": 760.19,
"ask": 760.22
}
],
"endpoint_version": "2026.09.30",
"data_as_of": {
"node": "fa4",
"equity_feed": "2026-10-30T13:46:04.46Z",
"equity_options_feed": "2026-10-30T13:46:03Z",
"index_feed": "2026-10-30T13:46:03.107Z",
"index_options_feed": "2026-10-30T13:46:03Z",
"futures_feed": "2026-10-30T13:45:53.139Z",
"futures_options_feed": "2026-10-30T13:45:49.971Z",
"flow_feed": "2026-10-30T13:45:00Z",
"oi_feed": "2026-10-29T20:00:00Z",
"macro_feed": "2026-10-29T21:00:20Z"
}
}Sending request…
See this endpoint on live data
Send this exact request and the real response shows up here, right next to the example.
Response Fields
| Field | Type | Description |
|---|---|---|
symbol | string | Uppercase stock symbol |
count | integer | Number of trades returned |
totalAvailable | integer | Trades available in the in-memory buffer |
trades[] | array | Recent trade rows: ts, price, size, side, isBlock, bid, ask |
trades[].ts | string | Timestamp of the trade (UTC) |
trades[].price | number | Trades: price |
trades[].size | number | Trades: size |
trades[].side | string | Trades: side |
trades[].isBlock | boolean | Trades: is block |
trades[].bid | number | Trades: bid |
trades[].ask | number | Trades: ask |
endpoint_version, data_as_of | string, object | Response envelope, see Response envelope. |
Errors
| Status | Error | When |
|---|---|---|
400 | - | A query value has the wrong type, or a required value is missing. The body is an RFC 7807 problem-details object with errors.<param>. |
401 | - | Missing or invalid X-Api-Key. The body is empty; check the status code before parsing JSON. |
403 | tier_restricted | Your plan is below Alpha. The body includes current_plan and required_plan. |
429 | Quota exceeded | Daily quota used up. Retry-After gives the seconds until the reset at 00:00 UTC. Rejected requests (including 403) count toward the quota. |
502 | - | Upstream flow data source unavailable. |
About
Returns the most recent equity trades for a symbol, newest first. side is bid-ask side classification, and isBlock marks prints above the block threshold.
Common Use Cases
- Render a live time-and-sales feed - stream
trades[]newest-first, coloring each row byside(buy/sell/mid) to show aggressor flow on an equity ticker - Estimate slippage from the spread - pair each
pricewith the prevailingbid/askon the same row to measure how far through the quote the print executed - Alert on institutional prints - filter on
isBlockto fire a notification the moment a trade clears the block-size threshold - Backfill a chart or replay buffer - pull the last N rows with
limit(up to 500) and usetotalAvailableto know how deep the in-memory buffer goes - Classify aggressor pressure - bucket
sizebysideover the returned window to gauge whether buyers or sellers are lifting offers vs hitting bids - Gate on tape freshness - read the newest
tsagainst wall clock to confirm the name is actively trading before acting on a signal
Related
Related reading
- Options flow API: recent trades, blocks & leaderboard - the matching trade-tape workflow on the options side of the same pipeline
- Real-time options data: polling vs streaming - how to poll this buffer efficiently for a low-latency tape
Complementary endpoints
- Stocks Summary - collapse the same tape into headline buy/sell/net totals
- Stocks Blocks - the same prints pre-filtered to block size
- Stocks Bars - roll these trades into OHLCV + flow candles
- Options Recent - the matching per-trade options tape for the same symbol
Unlock DEX, VEX and CHEX with Basic
Everything in Free, plus:
- DEX, VEX and CHEX exposure
- Full max pain
- ETF & index symbols SPY, QQQ, SPX, VIX
Go full-chain with Growth
Everything in Basic, plus:
- Full-chain GEX Every expiration
- 0DTE analytics
- Exposure summary & AI narrative
- CME futures & live screener
Add history and vol surfaces with Alpha
Everything in Growth, plus:
- Historical API replay Since 2017
- SVI vol surfaces
- VRP analytics
- Greeks surfaces Vanna, charm, volga and speed grids