### Option Trade Flow Alerts API Response Example (200 OK) Source: https://api.unusualwhales.com/docs/operations/PublicApi.OptionTradeController.flow_alerts Example of a successful response from the Option Trade Flow Alerts API, detailing a specific trade alert. ```json { "data": [ { "alert_rule": "RepeatedHits", "all_opening_trades": false, "created_at": "2023-12-12T16:35:52.168490Z", "expiry": "2023-12-22", "expiry_count": 1, "has_floor": false, "has_multileg": false, "has_singleleg": true, "has_sweep": true, "issue_type": "Common Stock", "open_interest": 7913, "option_chain": "MSFT231222C00375000", "price": "4.05", "strike": "375", "ticker": "MSFT", "total_ask_side_prem": "151875", "total_bid_side_prem": "405", "total_premium": "186705", "total_size": 461, "trade_count": 32, "type": "call", "underlying_price": "372.99", "volume": 2442, "volume_oi_ratio": "0.30860609124226" } ] } ``` -------------------------------- ### Get Prediction Market Whales (Python) Source: https://api.unusualwhales.com/docs/operations/PublicApi.PredictionController.whales This Python script demonstrates how to make a GET request to the Prediction Market Whales endpoint. It uses the `http.client` library and requires your API token for authentication. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/predictions/whales", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### Option Trades WebSocket Payload Example Source: https://api.unusualwhales.com/docs/operations/PublicApi.SocketController.option_trades This is an example of the JSON payload received when subscribing to the 'option_trades' websocket channel. It contains detailed information about an options trade. ```json { "id":"a4dc6020-0611-4c23-b0bc-99944c7348ab", "underlying_symbol":"UVIX", "executed_at":1726670167412, "nbbo_bid":"0.01", "nbbo_ask":"0.09", "size":1, "price":"0.01", "option_symbol":"UVIX240920C00025000", "created_at":1726670167461, "report_flags":[ ], "tags":[ "bid_side", "bearish", "etf" ], "expiry":"2024-09-20", "option_type":"call", "open_interest":410, "strike":"25.0000000000", "premium":"1.00", "volume":105, "underlying_price":"4.9261", "ewma_nbbo_ask":"0.09", "ewma_nbbo_bid":"0.01", "implied_volatility":"8.46381958089369", "delta":"0.01132315610146539", "theta":"-0.02291485773244166", "gamma":"0.00962272181839715", "vega":"0.0001082948756510385", "rho":"0.000002508438316242667", "theo":"0.01", "trade_code":"slan", "exchange":"XCBO", "ask_vol":10, "bid_vol":95, "no_side_vol":0, "mid_vol":0, "multi_vol":0, "stock_multi_vol":0 } ``` -------------------------------- ### Response Example for Aggregate Stats Source: https://api.unusualwhales.com/docs/operations/PublicApi.UnusualTradesController.stats This is an example of the JSON response structure for the unusual trades aggregate statistics endpoint when successful (200 OK). The 'data' field may contain detailed statistics or be null. ```json { "data": null, "date": "string", "type": "overview" } ``` -------------------------------- ### Get Monthly Performers (Python) Source: https://api.unusualwhales.com/docs/operations/PublicApi.SeasonalityController.month_performers This Python script demonstrates how to make a GET request to the Seasonality Performers endpoint using the http.client library. Ensure you replace YOUR_API_KEY with your valid API key. The response is printed as a UTF-8 decoded string. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/seasonality/3/performers", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### Get Top Volatility Character Data (Python) Source: https://api.unusualwhales.com/docs/operations/PublicApi.VolatilityController.character_top This Python script demonstrates how to make a GET request to the Top Volatility Character endpoint using the http.client library. Replace YOUR_API_KEY with your valid API token. The script prints the response content. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/volatility/character/top", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### Ticker Exchange Mapping Response Example Source: https://api.unusualwhales.com/docs/operations/PublicApi.StockDirectoryController.ticker_exchanges A sample JSON response for the ticker-to-exchange mapping endpoint, showing a list of ticker and exchange pairs. ```json { "data": [ { "exchange": "nasdaq", "ticker": "AAPL" }, { "exchange": "nasdaq", "ticker": "MSFT" }, { "exchange": "nyse", "ticker": "JPM" }, { "exchange": "nyse", "ticker": "BAC" } ] } ``` -------------------------------- ### Fetch Option Contracts (cURL) Source: https://api.unusualwhales.com/docs/operations/PublicApi.ScreenerController.contract_screener Use this cURL command to make a GET request to the option contracts screener endpoint. Replace YOUR_API_KEY with your actual API token. ```bash curl -X GET "https://api.unusualwhales.com/api/screener/option-contracts" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json" ``` -------------------------------- ### Screener Controller 200 OK Response Example Source: https://api.unusualwhales.com/docs/operations/PublicApi.ScreenerController.contract_screener This JSON object represents a successful response (200 OK) from the Screener Controller, detailing various metrics for an option. ```json { "data": [ { "ask_side_volume": 119403, "avg_price": "1.0465802437910297887119234370", "bid_side_volume": 122789, "chain_prev_close": "1.29", "close": "0.03", "cross_volume": 0, "er_time": "unknown", "floor_volume": 142, "high": "2.95", "last_fill": "2023-09-08T17:45:32Z", "low": "0.02", "mid_volume": 22707, "multileg_volume": 7486, "next_earnings_date": "2023-10-18", "no_side_volume": 0, "open": "0.92", "open_interest": 18680, "option_symbol": "TSLA230908C00255000", "premium": "27723806.00", "sector": "Consumer Cyclical", "stock_multi_leg_volume": 52, "stock_price": "247.94", "sweep_volume": 18260, "ticker_vol": 2546773, "total_ask_changes": 44343, "total_bid_changes": 43939, "trades": 39690, "volume": 264899 } ] } ``` -------------------------------- ### Get Ticker Exchange Mapping (cURL) Source: https://api.unusualwhales.com/docs/operations/PublicApi.StockDirectoryController.ticker_exchanges Use this cURL command to fetch the ticker-to-exchange mapping. Ensure you replace 'YOUR_API_KEY' with your actual API token. ```bash curl -X GET "https://api.unusualwhales.com/api/stock-directory/ticker-exchanges" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json" ``` -------------------------------- ### Get Ticker Exchange Mapping (Python) Source: https://api.unusualwhales.com/docs/operations/PublicApi.StockDirectoryController.ticker_exchanges This Python script demonstrates how to retrieve the ticker-to-exchange mapping using the http.client library. Replace 'YOUR_API_KEY' with your valid API token. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/stock-directory/ticker-exchanges", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### List Institutions with Python Source: https://api.unusualwhales.com/docs/operations/PublicApi.InstitutionController.list This Python script demonstrates how to fetch a list of institutions using the http.client library. It includes setting up the connection, headers, and printing the response. Remember to replace YOUR_API_KEY. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/institutions", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### Get FX Spot Rate using Python http.client Source: https://api.unusualwhales.com/docs/operations/PublicApi.ForexController.rate Shows how to retrieve the real-time spot exchange rate between two currencies using Python's http.client library. Replace 'YOUR_API_KEY' with your valid API token. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/forex/rate?from=USD&to=EUR", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### Fetch Option Contracts (Python) Source: https://api.unusualwhales.com/docs/operations/PublicApi.ScreenerController.contract_screener This Python script demonstrates how to fetch option contract data using the http.client library. Ensure you replace YOUR_API_KEY with your valid API token. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/screener/option-contracts", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### Fetch Short Screener Data with Python http.client Source: https://api.unusualwhales.com/docs/operations/PublicApi.ShortController.short_screener This Python script demonstrates how to fetch data from the short screener endpoint using the `http.client` library. Remember to replace 'YOUR_API_KEY' with your valid API token. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/short_screener", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### Fetch Fixed-Window Analytics Data (Python) Source: https://api.unusualwhales.com/docs/operations/PublicApi.IntelController.analytics_window This Python script demonstrates how to fetch fixed-window analytics data using the http.client library. Replace YOUR_API_KEY with your actual token and customize the query parameters for your specific needs. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/analytics/window?symbols=AAPL,IBM,MSFT&range=2month&calculations=MEAN,STDDEV,CORRELATION", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### Get Company Stock Splits (cURL) Source: https://api.unusualwhales.com/docs/operations/PublicApi.CompaniesController.splits Use this cURL command to make a GET request to the Company Stock Splits API. Replace YOUR_API_KEY with your actual API key and {ticker} with the desired stock ticker. ```curl curl -X GET "https://api.unusualwhales.com/api/companies/{ticker}/splits" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json" ``` -------------------------------- ### Get Total Options Volume (Python) Source: https://api.unusualwhales.com/docs/operations/PublicApi.MarketController.total_options_volume This Python script demonstrates how to retrieve the total options volume and premium data using the http.client library. Replace YOUR_API_KEY with your valid API token. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/market/total-options-volume", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### Get Fundamental Breakdown (Python) Source: https://api.unusualwhales.com/docs/operations/PublicApi.FundamentalController.show This Python script demonstrates how to retrieve fundamental financial data using the http.client library. Remember to substitute YOUR_API_KEY with your valid API token. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/stock/AAPL/fundamental-breakdown", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### Get Fundamental Breakdown Source: https://api.unusualwhales.com/docs/operations/PublicApi.FundamentalController.show Fetches the fundamental financial data for a specified stock ticker. ```APIDOC ## GET /api/stock/{ticker}/fundamental-breakdown ### Description Returns the fundamental financial data for the given ticker, including earnings per share, revenue, dividends, share counts, RSU data, and revenue breakdowns by product and geography. ### Method GET ### Endpoint /api/stock/{ticker}/fundamental-breakdown ### Parameters #### Path Parameters - **ticker** (SingleTicker) - Required - A single ticker. Example: AAPL ### Request Example ```bash curl -X GET "https://api.unusualwhales.com/api/stock/AAPL/fundamental-breakdown" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json" ``` ### Response #### Success Response (200) - **data** (array) - Contains the fundamental financial data. #### Response Example ```json { "data": [] } ``` ``` -------------------------------- ### Get ETF Weights (Python) Source: https://api.unusualwhales.com/docs/operations/PublicApi.EtfController.weights This Python script demonstrates how to retrieve ETF weights using the http.client library. Remember to substitute YOUR_API_KEY with your valid API token. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/etfs/AAPL/weights", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### Get Option Trades Source: https://api.unusualwhales.com/docs/operations/PublicApi.SocketController.option_trades Retrieves real-time option trade data. Requires Bearer authentication. ```APIDOC ## GET /api/socket/option_trades ### Description Retrieves real-time option trade data. Requires Bearer authentication. ### Method GET ### Endpoint /api/socket/option_trades ### Request Headers - Authorization: Bearer - Accept: application/json ### Response #### Success Response (200) - data (array) - An array of option trade objects. ### Response Example ```json { "data": [] } ``` ``` -------------------------------- ### Get Spot GEX Exposures by Expiry and Strike (Python) Source: https://api.unusualwhales.com/docs/operations/PublicApi.TickerController.spot_exposures_by_strike_expiry_v2 This Python script demonstrates how to make a request to the spot GEX exposures endpoint using the http.client library. Remember to replace YOUR_API_KEY with your valid API token. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/stock/AAPL/spot-exposures/expiry-strike?expirations[]=2024-02-022024-01-26", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### Get Option Contract Volume Profile (Python) Source: https://api.unusualwhales.com/docs/operations/PublicApi.OptionContractController.volume_profile This Python script demonstrates how to retrieve the volume profile for an option contract using the http.client library. Remember to substitute YOUR_API_KEY with your valid API token. ```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/TSLA230526P00167500/volume-profile", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### Get Screener Data Source: https://api.unusualwhales.com/docs/operations/PublicApi.ScreenerController.contract_screener Retrieves screener data, likely for options or stocks, with detailed financial metrics. ```APIDOC ## GET /screener ### Description Retrieves screener data, likely for options or stocks, with detailed financial metrics. ### Method GET ### Endpoint /screener ### Response #### Success Response (200) - **data** (array) - An array of screener data objects. - **ask_side_volume** (integer) - Volume on the ask side. - **avg_price** (string) - Average price. - **bid_side_volume** (integer) - Volume on the bid side. - **chain_prev_close** (string) - Previous day's closing price for the chain. - **close** (string) - Closing price. - **cross_volume** (integer) - Cross volume. - **er_time** (string) - Earnings report time. - **floor_volume** (integer) - Floor volume. - **high** (string) - High price. - **last_fill** (string) - Timestamp of the last fill. - **low** (string) - Low price. - **mid_volume** (integer) - Mid volume. - **multileg_volume** (integer) - Multileg volume. - **next_earnings_date** (string) - Date of the next earnings report. - **no_side_volume** (integer) - Volume with no specific side. - **open** (string) - Opening price. - **open_interest** (integer) - Open interest. - **option_symbol** (string) - The option symbol. - **premium** (string) - Premium amount. - **sector** (string) - Sector of the underlying asset. - **stock_multi_leg_volume** (integer) - Stock multileg volume. - **stock_price** (string) - Price of the underlying stock. - **sweep_volume** (integer) - Sweep volume. - **ticker_vol** (integer) - Volume for the ticker. - **total_ask_changes** (integer) - Total changes on the ask side. - **total_bid_changes** (integer) - Total changes on the bid side. - **trades** (integer) - Number of trades. - **volume** (integer) - Total volume. #### Response Example { "data": [ { "ask_side_volume": 119403, "avg_price": "1.0465802437910297887119234370", "bid_side_volume": 122789, "chain_prev_close": "1.29", "close": "0.03", "cross_volume": 0, "er_time": "unknown", "floor_volume": 142, "high": "2.95", "last_fill": "2023-09-08T17:45:32Z", "low": "0.02", "mid_volume": 22707, "multileg_volume": 7486, "next_earnings_date": "2023-10-18", "no_side_volume": 0, "open": "0.92", "open_interest": 18680, "option_symbol": "TSLA230908C00255000", "premium": "27723806.00", "sector": "Consumer Cyclical", "stock_multi_leg_volume": 52, "stock_price": "247.94", "sweep_volume": 18260, "ticker_vol": 2546773, "total_ask_changes": 44343, "total_bid_changes": 43939, "trades": 39690, "volume": 264899 } ] } ``` -------------------------------- ### Connect to Option Trades WebSocket Source: https://api.unusualwhales.com/docs/operations/PublicApi.SocketController.option_trades Connect to the websocket URI using your API token. After connecting, join the desired channels, such as 'option_trades' for all tickers or 'option_trades:' for specific ones. ```bash wss://api.unusualwhales.com/socket?token= ``` -------------------------------- ### Get Option Contracts Source: https://api.unusualwhales.com/docs/operations/PublicApi.ScreenerController.contract_screener Retrieves a list of option contracts based on specified filters. Supports pagination and sorting. ```APIDOC ## GET /api/screener/option-contracts ### Description Retrieves a list of option contracts based on specified filters. Supports pagination and sorting. ### Method GET ### Endpoint /api/screener/option-contracts ### Query Parameters - **ticker_symbol** (string) - Ticker symbol for the underlying stock. - **sectors[]** (string) - Array of sector names to filter by. - **min_underlying_price** (string) - Minimum underlying stock price. - **max_underlying_price** (string) - Maximum underlying stock price. - **is_otm** (boolean) - Filter for out-of-the-money options. - **exclude_ex_div_ticker** (boolean) - Exclude tickers that have recently gone ex-dividend. - **min_dte** (integer) - Minimum days to expiration. - **max_dte** (integer) - Maximum days to expiration. - **min_diff** (string) - Minimum difference between strike price and underlying price. - **max_diff** (string) - Maximum difference between strike price and underlying price. - **min_strike** (string) - Minimum strike price. - **max_strike** (string) - Maximum strike price. - **type** (OptionType) - Type of option (e.g., CALL, PUT). - **expiry_dates[]** (string) - Array of specific expiry dates. - **min_marketcap** (string) - Minimum market capitalization of the underlying stock. - **max_marketcap** (string) - Maximum market capitalization of the underlying stock. - **min_volume** (integer) - Minimum trading volume for the option contract. - **max_volume** (integer) - Maximum trading volume for the option contract. - **min_ticker_30_d_avg_volume** (integer) - Minimum 30-day average volume of the underlying stock. - **max_ticker_30_d_avg_volume** (integer) - Maximum 30-day average volume of the underlying stock. - **min_contract_30_d_avg_volume** (integer) - Minimum 30-day average volume for the option contract. - **max_contract_30_d_avg_volume** (integer) - Maximum 30-day average volume for the option contract. - **min_multileg_volume_ratio** (string) - Minimum ratio of multi-leg volume to total volume. - **max_multileg_volume_ratio** (string) - Maximum ratio of multi-leg volume to total volume. - **min_floor_volume_ratio** (string) - Minimum ratio of floor volume to total volume. - **max_floor_volume_ratio** (string) - Maximum ratio of floor volume to total volume. - **min_perc_change** (string) - Minimum percentage change in option price. - **max_perc_change** (string) - Maximum percentage change in option price. - **min_daily_perc_change** (string) - Minimum daily percentage change in option price. - **max_daily_perc_change** (string) - Maximum daily percentage change in option price. - **min_premium** (string) - Minimum premium. - **max_premium** (string) - Maximum premium. - **min_avg_price** (string) - Minimum average price. - **max_avg_price** (string) - Maximum average price. - **min_volume_oi_ratio** (string) - Minimum volume to open interest ratio. - **max_volume_oi_ratio** (string) - Maximum volume to open interest ratio. - **min_open_interest** (integer) - Minimum open interest. - **max_open_interest** (integer) - Maximum open interest. - **min_floor_volume** (integer) - Minimum floor volume. - **max_floor_volume** (integer) - Maximum floor volume. - **vol_greater_oi** (boolean) - Filter for contracts where volume is greater than open interest. - **issue_types[]** (string) - Array of issue types to filter by. - **min_ask_perc** (string) - Minimum ask percentage. - **max_ask_perc** (string) - Maximum ask percentage. - **min_bid_perc** (string) - Minimum bid percentage. - **max_bid_perc** (string) - Maximum bid percentage. - **min_skew_perc** (string) - Minimum skew percentage. - **max_skew_perc** (string) - Maximum skew percentage. - **min_bull_perc** (string) - Minimum bull percentage. - **max_bull_perc** (string) - Maximum bull percentage. - **min_bear_perc** (string) - Minimum bear percentage. - **max_bear_perc** (string) - Maximum bear percentage. - **min_bid_side_perc_7_day** (string) - Minimum 7-day bid side percentage. - **max_bid_side_perc_7_day** (string) - Maximum 7-day bid side percentage. - **min_ask_side_perc_7_day** (string) - Minimum 7-day ask side percentage. - **max_ask_side_perc_7_day** (string) - Maximum 7-day ask side percentage. - **min_days_of_oi_increases** (integer) - Minimum days of open interest increases. - **max_days_of_oi_increases** (integer) - Maximum days of open interest increases. - **min_days_of_vol_greater_than_oi** (integer) - Minimum days where volume is greater than open interest. - **max_days_of_vol_greater_than_oi** (integer) - Maximum days where volume is greater than open interest. - **min_iv_perc** (string) - Minimum implied volatility percentage. - **max_iv_perc** (string) - Maximum implied volatility percentage. - **min_delta** (string) - Minimum delta. - **max_delta** (string) - Maximum delta. - **min_gamma** (string) - Minimum gamma. - **max_gamma** (string) - Maximum gamma. - **min_theta** (string) - Minimum theta. - **max_theta** (string) - Maximum theta. - **min_vega** (string) - Minimum vega. - **max_vega** (string) - Maximum vega. - **min_return_on_capital_perc** (string) - Minimum return on capital percentage. - **max_return_on_capital_perc** (string) - Maximum return on capital percentage. - **min_oi_change_perc** (string) - Minimum open interest change percentage. - **max_oi_change_perc** (string) - Maximum open interest change percentage. - **min_oi_change** (integer) - Minimum open interest change. - **max_oi_change** (integer) - Maximum open interest change. - **min_volume_ticker_vol_ratio** (string) - Minimum volume to ticker volume ratio. - **max_volume_ticker_vol_ratio** (string) - Maximum volume to ticker volume ratio. - **min_sweep_volume_ratio** (string) - Minimum sweep volume ratio. - **max_sweep_volume_ratio** (string) - Maximum sweep volume ratio. - **min_from_low_perc** (string) - Minimum percentage from the low price. - **max_from_low_perc** (string) - Maximum percentage from the low price. - **min_from_high_perc** (string) - Minimum percentage from the high price. - **max_from_high_perc** (string) - Maximum percentage from the high price. - **min_earnings_dte** (integer) - Minimum days to next earnings. - **max_earnings_dte** (integer) - Maximum days to next earnings. - **min_days_between_expiry_and_earnings** (MinDaysBetweenExpiryAndEarnings) - Minimum days between expiry and earnings. - **max_days_between_expiry_and_earnings** (MaxDaysBetweenExpiryAndEarnings) - Maximum days between expiry and earnings. - **min_transactions** (integer) - Minimum number of transactions. - **max_transactions** (integer) - Maximum number of transactions. - **min_close** (string) - Minimum closing price. - **max_close** (string) - Maximum closing price. - **order** (Screener contract order by field) - Field to order the results by. - **order_direction** (OrderDirection) - Direction of the order (ASC or DESC). - **limit** (integer) - Maximum number of results to return (Default 50, Max 250, Min 1). - **page** (integer) - Page number for pagination. - **date** (string) - Optional market date to retrieve data for. - **is_new** (boolean) - Filter for newly listed contracts. - **opex_only** (boolean) - Filter for contracts expiring on an options expiration Friday. ### Response #### Success Response (200) - **ask_side_volume** (integer) - Option Contract Ask Volume - **avg_price** (number) - Option Contract Avg Price - **bid_side_volume** (integer) - Option Contract Bid Volume - **chain_prev_close** (number) - Option Contract Previous Close Price - **close** (number) - Option Contract Close - **cross_volume** (integer) - Option Contract Cross Volume - **er_time** (string) - Stock Earnings time - **floor_volume** (integer) - Option Contract Floor Volume - **high** (number) - Option Contract High - **last_fill** (string) - Option Contract Last Transaction Time - **low** (number) - Option Contract Low - **mid_volume** (integer) - Option Contract Mid Volume - **multileg_volume** (integer) - Option Contract Multi Leg Volume - **next_earnings_date** (string) - Stock Next Earnings Date - **no_side_volume** (integer) - Option Contract No Side Volume - **open** (number) - Option Contract Open - **open_interest** (integer) - Option Contract Open interest - **option_symbol** (string) - Option Contract Symbol - **premium** (number) - Option Contract Premium - **sector** (string) - Market General Sector - **stock_multi_leg_volume** (integer) - Option Contract Stock Multi Leg Volume - **stock_price** (number) - Stock Close Price - **sweep_volume** (integer) - Option Contract Sweep Volume - **ticker_vol** (integer) - Stock Total Volume - **total_ask_changes** (integer) - Option Contract Total Ask Changes ### Request Example ```json { "example": "request body" } ``` ### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### GET /api/congress/congress-trader Source: https://api.unusualwhales.com/docs/operations/PublicApi.CongressController.congress_trader Fetches recent reports by a specified congress member. Supports pagination and date range filtering. ```APIDOC ## GET /api/congress/congress-trader ### Description Returns the recent reports by the given congress member. Supports pagination via `page` (0-indexed) and `limit` parameters. Date range filtering: use `date` for upper bound and `date_from` for lower bound. To query a single day, set both to the same date. ### Method GET ### Endpoint https://api.unusualwhales.com/api/congress/congress-trader ### Parameters #### Query Parameters - **limit** (integer) - Optional - How many items to return. Default: 100. Max: 200. Min: 1. - **date** (string) - Optional - A trading date in the format of YYYY-MM-DD. Defaults to the last trading date. - **ticker** (string) - Optional - Optional ticker symbol to filter results. - **name** (string) - Optional - The full name of a congress member. Spaces and characters may need to be URI encoded. - **page** (integer) - Optional - Page number (use with limit). Starts on page 0. - **date_from** (string) - Optional - A trading date in the format of YYYY-MM-DD. Defaults to the last trading date. ### Responses #### Success Response (200 OK) - **amounts** (string) - Insider Trades Amount Range - **filed_at_date** (string) - Insider Trades Filing Date - **is_active** (boolean) - Is Active - **issuer** (string) - Insider Trades Issuer - **member_type** (string) - Insider Trades Member Type - **name** (string) - Insider Trades Reporter's Standard Name - **notes** (string) - Insider Trades Filing Notes - **politician_id** (string) - Politician ID - **reporter** (string) - Insider Trades Reporter - **ticker** (string) - Stock Ticker - **transaction_date** (string) - Insider Trades Transaction Date - **txn_type** (string) - Insider Trades Transaction Type #### Response Example (200 OK) ```json { "data": [ { "amounts": "$15,001 - $50,000", "filed_at_date": "2023-02-13", "is_active": true, "issuer": "not-disclosed", "member_type": "house", "name": "Stephen Cohen", "notes": "Subholding Of: Stephens Advantage Account Description: FT UNIT 10479 PFD mutual-fund 32500", "politician_id": "18f9fc95-4661-444e-99f5-99d3778e0c31", "reporter": "Stephen C.", "ticker": "FHWVOX", "transaction_date": "2023-02-06", "txn_type": "Buy" } ] } ``` ``` -------------------------------- ### Get Economic Indicator Data (Python) Source: https://api.unusualwhales.com/docs/operations/PublicApi.EconomyController.show This Python script demonstrates how to retrieve US economic indicator data using the http.client library. Remember to substitute YOUR_API_KEY and {indicator} with appropriate values. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/economy/{indicator}", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` -------------------------------- ### GET /api/alerts Source: https://api.unusualwhales.com/docs/operations/PublicApi.AlertsController.alerts Returns all triggered alerts for the user. Supports time filtering and various query parameters to refine the results. ```APIDOC ## GET /api/alerts ### Description Retrieves all alerts triggered for the user. Time filtering is available using the `newer_than` and `older_than` parameters. The maximum lookback period is 14 days. If no time range is specified, it defaults to the last 14 days. If only one time parameter is provided, the other is automatically calculated to maintain the 14-day limit. If both parameters are provided but exceed 14 days, the range is adjusted to 14 days from the `older_than` timestamp. ### Method GET ### Endpoint `https://api.unusualwhales.com/api/alerts` ### Parameters #### Query Parameters - **limit** (int) - Optional - How many items to return. Default: 50. Max: 500. Min: 1. - **intraday_only** (boolean) - Optional - Boolean flag whether to return only intraday alerts. - **config_ids[]** (string) - Optional - A list of alert ids to filter by. - **ticker_symbols** (string) - Optional - A comma separated list of tickers. To exclude certain tickers prefix the first ticker with a `-`. - **noti_types[]** (string) - Optional - A list of notification types. Enum: stock, news, earnings, dividends, splits, option_contract, price_target, analyst_rating, option_contract_interval, insider_trades, trading_state, fda, economic_release, politician_trades, market_tide, sec_filings, flow_alerts, chain_oi_change, gex. - **newer_than** (string) - Optional - Filter alerts created after this timestamp. When used alone, the time range is limited to 14 days forward from this timestamp. The format can either be a timestamp in unix seconds or milliseconds or a string in ISO format. - **older_than** (string) - Optional - Filter alerts created before this timestamp. When used alone, the time range is limited to 14 days backward from this timestamp. The format can either be a timestamp in unix seconds or milliseconds or a string in ISO format. ### Request Example ```json { "data": [ { "created_at": "2024-12-11T14:00:00Z", "id": "fdc2cf91-d387-480f-a79e-28026447a6f5", "meta": { "alert_type": "PayDate", "date": "2024-11-21", "div_yield": "0.0503", "dividend": "0.1275", "frequency": "Quarterly", "payment_date": "2024-12-11", "prev_dividend": "0.125" }, "name": "S&P 500 Dividends", "noti_type": "dividends", "symbol": "AMCR", "symbol_type": "stock", "tape_time": "2024-12-11T14:00:00Z", "user_noti_config_id": "cb70c287-f10a-4e63-98ad-571b7dafc8e4" }, { "created_at": "2024-12-11T14:00:01Z", "id": "46a5cf8d-6b41-4a92-926d-80e21b729222", "meta": { "avg_vol_30": "431912.809523809524", "curr": "14.55", "curr_vol": 364977, "prev": "22.88", "reason": "", "sector": "Healthcare", "state": "trading" }, "name": "Trading halts", "noti_type": "trading_state", "symbol": "ANAB", "symbol_type": "stock", "tape_time": "2024-12-11T14:00:00Z", "user_noti_config_id": "5e476026-d01e-423b-9635-7ead39301665" } ] } ``` ### Response #### Success Response (200) - **created_at** (string) - The creation timestamp - **id** (string) - The alert id - **meta** (object) - The raw data of the alert - **name** (string) - The name of the alert - **noti_type** (string) - The type of the alert - **symbol** (string) - The stock ticker or option contract of the alert - **tape_time** (string) - Alert Tape Time - **user_noti_config_id** (string) - The alert id #### Response Example ```json { "data": [ { "created_at": "2024-12-11T14:00:00Z", "id": "fdc2cf91-d387-480f-a79e-28026447a6f5", "meta": { "alert_type": "PayDate", "date": "2024-11-21", "div_yield": "0.0503", "dividend": "0.1275", "frequency": "Quarterly", "payment_date": "2024-12-11", "prev_dividend": "0.125" }, "name": "S&P 500 Dividends", "noti_type": "dividends", "symbol": "AMCR", "symbol_type": "stock", "tape_time": "2024-12-11T14:00:00Z", "user_noti_config_id": "cb70c287-f10a-4e63-98ad-571b7dafc8e4" }, { "created_at": "2024-12-11T14:00:01Z", "id": "46a5cf8d-6b41-4a92-926d-80e21b729222", "meta": { "avg_vol_30": "431912.809523809524", "curr": "14.55", "curr_vol": 364977, "prev": "22.88", "reason": "", "sector": "Healthcare", "state": "trading" }, "name": "Trading halts", "noti_type": "trading_state", "symbol": "ANAB", "symbol_type": "stock", "tape_time": "2024-12-11T14:00:00Z", "user_noti_config_id": "5e476026-d01e-423b-9635-7ead39301665" } ] } ``` ``` -------------------------------- ### Get Commodity Price Series Source: https://api.unusualwhales.com/docs/operations/PublicApi.CommoditiesController.show Retrieves a long-running price series for a specified commodity. Requires an Advanced+ tier subscription. ```APIDOC ## GET /api/commodities/{name} ### Description Returns a long-running price series for a commodity. ### Method GET ### Endpoint https://api.unusualwhales.com/api/commodities/{name} ### Parameters #### Path Parameters - **name** (string) - Required - `enum: wti, brent, natural-gas, copper, aluminum, wheat, corn, cotton, sugar, coffee, all-commodities` #### Query Parameters - **interval** (string) - Optional - Series cadence. Defaults to monthly. `enum: daily, weekly, monthly, quarterly, annual` ### Request Example ```bash curl -X GET "https://api.unusualwhales.com/api/commodities/{name}" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json" ``` ### Response #### Success Response (200) - **data** (Macro Series) - The commodity price series data. #### Response Example ```json { "data": { "data": [ null ], "interval": "string", "name": "string", "unit": "string" } } ``` ``` -------------------------------- ### Get Insider Transactions with Python Source: https://api.unusualwhales.com/docs/operations/PublicApi.InsiderController.transactions This Python snippet demonstrates how to fetch insider transaction data using the http.client library. Ensure you replace 'YOUR_API_KEY' with your actual API key. ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/insider/transactions", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ```