# Net flow `GET` `https://api.unusualwhales.com/api/socket/net_flow` **NOTE:** This is the documentation for websocket channel `net_flow:`. 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=` 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). | ## Authentication ``` Authorization: Bearer YOUR_API_KEY ``` ## Example ### curl ```bash curl -X GET "https://api.unusualwhales.com/api/socket/net_flow" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json" ``` ### Python ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/socket/net_flow", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` ## Response Example ```json { "data": [] } ```