Stock Flow Bars API - OHLCV Plus Flow Bars - FlashAlpha Lab API
Lab API Stock Flow Bars

Stock Flow Bars API

Multi-resolution OHLCV plus flow bars derived from the live trade tape, returned oldest-first for chart consumers across 1s to 4h resolutions.

Endpoint

GET /v1/flow/stocks/{symbol}/bars
Auth required (X-Api-Key) Rate Limited: Yes Alpha plan+

Parameters

Name In Required Default Description
symbol path yes - Stock symbol (uppercased server-side)
resolution query yes - One of 1s, 1m, 5m, 15m, 30m, 1h, 4h. Anything else returns 400 {"error":"invalid_resolution"}.
minutes query no 60 Look-back window. Clamped to [1, 1440] (24h matches the in-memory ring cap).
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://lab.flashalpha.com/v1/flow/stocks/SPY/bars?resolution=5m&minutes=60"
import requests

resp = requests.get(
    "https://lab.flashalpha.com/v1/flow/stocks/SPY/bars",
    headers={"X-Api-Key": "YOUR_API_KEY"},
    params={"resolution": "5m", "minutes": 60}
)
data = resp.json()
print(f"Bars returned: {data['count']}")
const resp = await fetch(
  "https://lab.flashalpha.com/v1/flow/stocks/SPY/bars?resolution=5m&minutes=60",
  { headers: { "X-Api-Key": "YOUR_API_KEY" } }
);
const data = await resp.json();
console.log("Bars returned: " + data.count);

Response

{
  "symbol": "SPY",
  "resolution": "5m",
  "minutes": 60,
  "count": 12,
  "dataStartUtc": "2026-05-30T13:30:00Z",
  "bars": [
    {
      "ts": "2026-05-30T15:00:00Z",
      "closed": true,
      "open": 531.12,
      "high": 531.88,
      "low": 530.94,
      "close": 531.55,
      "vwap": 531.41,
      "buyVolume": 184200,
      "sellVolume": 152800,
      "midVolume": 21400,
      "netVolume": 31400,
      "tradeCount": 5820,
      "biggestTrade": 12000
    }
  ]
}

Key Response Fields

Field Type Description
symbolstringUppercase symbol
resolutionstringEcho of requested resolution
minutesintegerEffective window
countintegerNumber of bars returned
dataStartUtcstring | nullTimestamp of the oldest 1-second bucket in the in-memory ring (UTC), or null when no history exists. Use this to detect partial coverage when requesting minutes=1440 against a process that started recently - if dataStartUtc > now - minutes*60, the response covers a shorter window than requested.
bars[]arrayOldest-first bars. Each entry: ts (bar start, UTC), closed (bool), open, high, low, close, vwap, buyVolume, sellVolume, midVolume, netVolume, tradeCount, biggestTrade.
bars[].closedbooleantrue once wall-clock time has advanced past [ts, ts + resolution) - i.e. the bar is final. The right-edge bar is typically false (still accumulating). Chart libraries should use this flag directly rather than re-deriving it client-side.

Errors

Status Description
400 invalid_resolutionUnrecognized resolution (must be one of 1s, 1m, 5m, 15m, 30m, 1h, 4h).
403Requires Alpha plan or higher.

About

Stock Flow Bars return multi-resolution OHLCV plus flow bars derived from the live trade tape, backed by an in-memory 1-second ring per symbol. Higher resolutions are computed on read by streaming roll-up. Bars are returned oldest-first for chart consumers, in contrast to /history, which is newest-first. The leftmost bar's start time is always boundary-aligned to the resolution, and the right-most bar may be partial while the current bar is still accumulating.

1-second history is in-memory only and dropped across container restarts; dataStartUtc surfaces the effective coverage so clients can distinguish "process is too young to answer" from "symbol is quiet." Use /history for long-term replay and /bars for live chart feeds.

Common Use Cases

  • Feed live candlestick charts - request any resolution from 1s to 4h and plot each oldest-first bar's open/high/low/close for an intraday price feed
  • Overlay flow on price - shade each bar by buyVolume/sellVolume and the signed netVolume to read aggressor pressure under the candle
  • Drive TradingView or Lightweight Charts correctly - use the per-bar closed flag to update the in-progress right-edge bar in place rather than re-deriving finality client-side
  • Detect partial coverage - compare dataStartUtc to now - minutes*60 to tell "process too young" from "symbol is quiet" before trusting a long window
  • Spot participation spikes - flag bars where tradeCount or biggestTrade jumps above a rolling baseline
  • Track intrabar VWAP - compare close to the bar's vwap for a fast mean-reversion read at the chart resolution

Related reading

Complementary endpoints

  • Stocks History - newest-first minute buckets for long-term replay (vs these live, oldest-first bars)
  • Stocks Cumulative - the running net-flow line to overlay on the price bars
  • Stocks Recent - the per-trade tape these bars roll up
  • Options History - the matching minute-flow series for the options tape

Ready to build?

Get your free API key and start pulling live options data in 30 seconds.