> ## Documentation Index
> Fetch the complete documentation index at: https://api.unusualwhales.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> API requests use the base URL https://api.unusualwhales.com and require a bearer token in the `Authorization` header (`Authorization: Bearer <API_KEY>`). Create and manage API tokens at https://unusualwhales.com/dashboard/api.
> For live market data inside an AI tool, use the Unusual Whales MCP server at https://unusualwhales.com/public-api/mcp.
> Instructions for agents using Unusual Whales tools: https://unusualwhales.com/skill.md

# Net flow

> Receive live net call/put premium and volume aggregates for the specified ticker to build a net prem view.

**NOTE:**
This is the documentation for websocket channel `net_flow:<TICKER>`.
Websocket access for personal use is only available through the [Advanced plan](https://unusualwhales.com/pricing?product=api).

You can find fully-functional examples that stream data from many channels here:

* Python: [https://github.com/unusual-whales/api-examples/tree/main/examples/ws-multi-channel-multi-output](https://github.com/unusual-whales/api-examples/tree/main/examples/ws-multi-channel-multi-output)
* Javascript: [https://github.com/unusual-whales/api-examples/tree/main/examples/ws-multi-channel-multi-output-nodejs](https://github.com/unusual-whales/api-examples/tree/main/examples/ws-multi-channel-multi-output-nodejs)

Connect to the websocket URI:

`wss://api.unusualwhales.com/socket?token=<YOUR_API_TOKEN>`

then `join` the channel you wish to stream, for example `net_flow:SPY` for live net call/put premium and volume aggregates for SPY.

Payload format:

```
[
  "net_flow:SPY",
  {
    "ticker": "SPY",
    "net_call_prem": "1716.00",
    "net_call_vol": 6,
    "net_put_prem": "1990.00",
    "net_put_vol": 17,
    "time": 1777300076003
  }
]
```

### Field reference

| Field | Type | Description |
| - | - | - |
| `ticker` | string | Underlying ticker. Same as the `:` suffix on the channel name. |
| `net_call_prem` | decimal string | Cumulative net call premium for the session (`ask_side - bid_side`) in dollars. |
| `net_call_vol` | int | Cumulative net call volume for the session (`ask_side - bid_side`). |
| `net_put_prem` | decimal string | Cumulative net put premium for the session (`ask_side - bid_side`) in dollars. |
| `net_put_vol` | int | Cumulative net put volume for the session (`ask_side - bid_side`). |
| `time` | int (ms) | Last update time, unix epoch milliseconds (UTC). |
