> ## 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

# greek-flow

> Aggregated delta and vega flow of option trades per ticker and per expiry

Topic
messages**2**
routing**message key**
encoding**protobuf**

## Messages on this topic

[greek-flow
GreekFlow
Aggregated delta and vega flow of option trades for a ticker, bucketed to the minute. Each message is a partial sum flushed roughly once per second. Consumers need to add messages with the same timestamp together to get the full minute bucket. Values are not running daily totals. total\_\* fields carry the greek's own sign (calls positive delta, puts negative), so they represent net greek exposure regardless of who was the aggressor. dir\_\* fields instead sign the magnitude by trade sentiment: bullish trades (bought calls, sold puts) positive, bearish trades negative, mid/no-side trades excluded.
12 fields→](/docs/kafka/types/GreekFlow.md)

[greek-flow-expiry
GreekFlowExpiry
GreekFlow additionally broken out by option expiration date. See GreekFlow for the field semantics and aggregation behaviour.
13 fields→](/docs/kafka/types/GreekFlowExpiry.md)

The message type is determined by the Kafka message key.

## Consume the topic

```python Python theme={null}
from confluent_kafka import Consumer
from unusualwhales.schema_pb2 import GreekFlow, GreekFlowExpiry

# The record key selects the message type.
BY_KEY = {
    b"greek-flow": GreekFlow,
    b"greek-flow-expiry": GreekFlowExpiry,
}

# CONFIG comes from the Connecting section of the Kafka overview.
consumer = Consumer(CONFIG | {"group.id": "my-greek-flow-consumer"})
consumer.subscribe(["greek-flow"])

while True:
    msg = consumer.poll(1.0)
    if msg is None or msg.error():
        continue

    message_type = BY_KEY.get(msg.key())
    if message_type is None:
        continue

    event = message_type()
    event.ParseFromString(msg.value())
    print(event)
```
