---
title: "Get Flow By Contract"
method: GET
path: "/api/flow/by-contract"
tags: ["Options Flow"]
---

# Get Flow By Contract

`GET /api/flow/by-contract`

## Request

- Base URL: `https://api.zerogex.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.zerogex.io/api/flow/by-contract`
- Auth: HTTP bearer

Per-contract option flow in 5-min buckets with session-cumulative values.

Returns one row per (option_type, strike, expiration) per 5-min bucket.
raw_volume, raw_premium, net_volume and net_premium are day-to-date
cumulative for each contract as of the end of its bucket; counters reset
at 09:30 ET (TradeStation RTH open).

session=current returns today's open session (or most recent if closed);
session=prior returns the previous full session. Pass intervals=N to
limit the response to the most recent N 5-minute buckets.

## Query parameters

- `symbol` string
- `session` string
- `intervals` integer, nullable: Number of trailing 5-minute buckets to return. Defaults to the entire session (09:30–16:15 ET, ~81 buckets). Capped at 390 (one trading day at 1-minute resolution) to bound DB load.

## Response `200`

Successful Response

- FlowPoint[]
  - `timestamp` string, date-time, required
  - `symbol` string, required
  - `option_type` string, required
  - `strike` string, required
  - `expiration` string, date, required
  - `dte` integer, required
  - `raw_volume` integer, required
  - `raw_premium` string, required
  - `net_volume` integer, required
  - `net_premium` string, required
  - `underlying_price` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zerogex/apis/zerogex-api.md) · [All operations](https://skmtc.dev/zerogex/apis/zerogex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zerogex/apis/zerogex-api/revisions/753b26bf0592?raw)
