# Flow Data `GET` `https://api.unusualwhales.com/api/option-contract/{id}/flow` Returns the last 50 option trades for the given option chain. Optionally a min premium and a side can be supplied in the query for further filtering. If no date is specified data for the last trading day is being returned. ## Authentication ``` Authorization: Bearer YOUR_API_KEY ``` ## Path Parameters | Name | Type | Required | Description | |------|------|----------|-------------| | `id` | OptionContract | Yes | An option contract in the OSI format. | ## Query Parameters | Name | Type | Required | Description | |------|------|----------|-------------| | `side` | Side | No | The side of a stock trade. Must be one of ASK, BID, MID. If not set, will return all side's trades. | | `min_premium` | StockTradesMinPremium | No | The minimum premium requested trades should have. | | `limit` | Min Limit 1 | No | How many items to return. If no limit is given, returns all matching data. Min: 1. | | `date` | Optional Market Date | No | A trading date in the format of YYYY-MM-DD. This is optional and by default the last trading date. | ## Response (200) | Field | Type | Description | |-------|------|-------------| | `ask_vol` | Option Contract Ask Volume | The amount of volume that happened on the ask side. Ask side is defined as (ask + bid) / 2 < fill price. | | `bid_vol` | Option Contract Bid Volume | The amount of volume that happened on the bid side. Bid side is defined as (ask + bid) / 2 > fill price. | | `canceled` | Canceled | Whether the option trade was canceled. | | `delta` | Delta | The delta of the option trade. | | `er_time` | Stock Earnings time | The time when the earnings will be released. | | `ewma_nbbo_ask` | EWMA NBBO Ask | The exponentially weighted moving average of the National Best Bid and Offer ask side. | | `ewma_nbbo_bid` | EWMA NBBO Bid | The exponentially weighted moving average of the National Best Bid and Offer bid side. | | `exchange` | Exchange | The exchange the option trade was executed on. | | `executed_at` | Executed At | The time the option trade was executed. | | `expiry` | Option Contract Expiry | The contract expiry date in ISO format. | | `flow_alert_id` | Flow Alert ID | The flow alert ID of the option trade. If the flow alert ID is null, it means that there is no flow alert associated with the option trade. | | `full_name` | Stock Full Name | Full name of the ticker. | | `gamma` | Gamma | The gamma of the option trade. | | `id` | Option Trade ID | The ID of the option trade. | | `implied_volatility` | Implied Volatility | The implied volatility of the option trade. | | `industry_type` | Stock Industry Type | The industry type of the ticker. | | `is_agg` | boolean | Whether this response item combines related option transactions executed at the same time into a single transaction. | | `issue_type` | string | | | `marketcap` | Stock Marketcap AUM | The marketcap of the underlying ticker. If the issue type of the ticker is ETF then the marketcap represents the AUM. | | `mid_vol` | Option Contract Mid Volume | The amount of volume that happened in the middle of the ask and bid. Mid is defined as (ask + bid) / 2 == fill price. | | `multi_vol` | Option Contract Multi Leg Volume | The amount of volume that happened as part of a multileg trade with another contract. This can be spreads/rolls/condors/butterflies and more. | | `nbbo_ask` | NBBO Ask | The National Best Bid and Offer (NBBO) ask price. | | `nbbo_bid` | NBBO Bid | The National Best Bid and Offer (NBBO) bid price. | | `next_earnings_date` | Stock Next Earnings Date | The next earnings date of the ticker. Null if either unknown as of now or if the ticker does not have any earnings such as an ETF | | `no_side_vol` | Option Contract No Side Volume | The amount of volume that happened on no identifiable side. This can be late, out of sequence and/or cross transactions. | | `open_interest` | Option Contract Open interest | The open interest for the contract. | | `option_chain_id` | Option Contract Symbol | The option symbol of the contract. You can use the following regex to extract underlying ticker, option type, expiry & strike: `^(?[\w]*)(?(\d{2})(\d{2})(\d{2}))(?[PC])(?\d{8})$` Keep in mind that the strike needs to be multiplied by 1,000. | | `option_type` | Option Contract Option Type | The option type of the contract. | | `premium` | Premium | The premium of the option trade. | | `price` | Fill Price | The fill price of the option trade. | | `report_flags` | Report Flags | The report flags of the option trade. | | `rho` | Rho | The rho of the option trade. | | `rule_id` | Rule ID | The rule ID of the option trade that represents the rule that made up the flow alert | | `sector` | Market General Sector | The financial sector of the ticker. Empty if unknown or not applicable such as ETF/Index. | | `size` | Option Trade Size | The size of the option trade. | | `stock_multi_vol` | Option Contract Stock Multi Leg Volume | The amount of volume that happened as part of a stock transaction and possibly other option contracts. This can be covered calls and more. | | `strike` | Option Contract Strike | The contract strike. | | `tags` | Tags | Tags related to the institution. | | `theo` | Theoretical Price | The theoretical price of the option trade. | | `theta` | Theta | The theta of the option trade. | | `trade_ids` | array[string] | The component trade IDs for an aggregated trade. | | `underlying_price` | Underlying Price | The price of the underlying asset. | | `underlying_symbol` | Option Contract Underlying Symbol | The underlying symbol of the contract. | | `upstream_condition_detail` | Upstream Condition Detail | The upstream condition detail/trade code of the option trade. | | `vega` | Vega | The vega of the option trade. | | `volume` | Option Trade Volume | The amount of contracts traded till this point. | ## Example ### curl ```bash curl -X GET "https://api.unusualwhales.com/api/option-contract/{id}/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/option-contract/{id}/flow", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` ## Response Example ```json { "underlying_symbol": "NVDA", "open_interest": 6016, "ask_vol": 2, "ewma_nbbo_bid": "21.45", "bid_vol": 1, "option_type": "call", "delta": "0.610546281537814", "full_name": "NVIDIA CORP", "ewma_nbbo_ask": "21.60", "multi_vol": 30, "industry_type": "Semiconductors", "implied_volatility": "0.604347250962543", "er_time": "postmarket", "theo": "21.49999999999999", "rule_id": null, "stock_multi_vol": 0, "theta": "-0.0640155364004474", "gamma": "0.00775013889662635", "option_chain_id": "NVDA250117C00124000", "premium": "2150.00", "flow_alert_id": null, "id": "8ef90a2d-d881-41de-98c9-c1de4318dcb5", "exchange": "MXOP", "price": "21.50", "nbbo_ask": "21.60", "tags": [ "bid_side", "bearish", "earnings_next_week" ], "size": 1, "expiry": "2025-01-17", "mid_vol": 30, "strike": "124.0000000000", "executed_at": "2024-08-21T13:50:52.278302Z", "canceled": false, "next_earnings_date": "2024-08-28", "report_flags": [], "underlying_price": "128.16", "volume": 33, "nbbo_bid": "21.45", "rho": "0.2316546330093438", "no_side_vol": 0, "upstream_condition_detail": "auto", "sector": "Technology", "vega": "0.3140468475903719", "marketcap": "3130350000000.00" } ```