Lab API
Stocks Recent
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
Auth required (
X-Api-Key)
Rate Limited: Yes
Alpha plan+
Parameters
| Name | In | Required | Default | Description |
|---|---|---|---|---|
symbol |
path | yes | - | Stock symbol |
limit |
query | no | 50 | Number of trades, clamped to 1..500 |
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"}
)
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" } }
);
const data = await resp.json();
console.log(data.count + " of " + data.totalAvailable + " buffered trades");
Response
{
"symbol": "SPY",
"count": 3,
"totalAvailable": 320,
"trades": [
{
"ts": "2026-05-12T18:42:09.812Z",
"price": 597.51,
"size": 15000,
"side": "buy",
"isBlock": true,
"bid": 597.50,
"ask": 597.52
},
{
"ts": "2026-05-12T18:42:08.441Z",
"price": 597.50,
"size": 200,
"side": "sell",
"isBlock": false,
"bid": 597.50,
"ask": 597.51
},
{
"ts": "2026-05-12T18:42:07.205Z",
"price": 597.505,
"size": 100,
"side": "mid",
"isBlock": false,
"bid": 597.50,
"ask": 597.51
}
]
}
Key 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 |
Errors
| Status | Description |
|---|---|
403 | Requires Alpha plan or higher |
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
Ready to build?
Get your free API key and start pulling live options data in 30 seconds.