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
- Live time-and-sales feed for an equity ticker
- Spread context: pair last price with quoted bid/ask for slippage estimates
- Block alerting: stream prints above a block-size threshold
- Replay buffer: pull the last N prints for charting or backfill
Ready to build?
Get your free API key and start pulling live options data in 30 seconds.