### Gexbot API Request Example Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/README.md Example of a GET request to retrieve classic GEX chart data for SPX. Requires an API key in the Authorization header. ```http GET https://api.gex.bot/v2/SPX/classic/gex_full Authorization: Bearer gexbot_custom_ User-Agent: my-app/1.0 Accept: application/json ``` -------------------------------- ### Install wscat Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/docs/websocket.md Install the wscat command-line tool globally using npm to help diagnose WebSocket connectivity. ```sh npm install -g wscat ``` -------------------------------- ### Negotiate Response Example Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/docs/websocket.md This JSON structure is returned by the /negotiate endpoint, providing WebSocket URLs for different hubs and a prefix for group names. ```json { "websocket_urls": { "classic": "wss://ws.gex.bot:443/client/hubs/classic?access_token=", "state_gex": "wss://ws.gex.bot:443/client/hubs/state_gex?access_token=", "state_greeks_zero": "wss://ws.gex.bot:443/client/hubs/state_greeks_zero?access_token=", "state_greeks_one": "wss://ws.gex.bot:443/client/hubs/state_greeks_one?access_token=", "orderflow": "wss://ws.gex.bot:443/client/hubs/orderflow?access_token=" }, "prefix": "blue" } ``` -------------------------------- ### Gexbot API Response Example Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/README.md Example JSON response for a GEX chart data request, including timestamp, ticker, spot price, gamma exposure levels, and max prior data. ```json { "timestamp": 1777492800, "ticker": "SPX", "min_dte": 0, "sec_min_dte": 1, "spot": 7138.55, "zero_gamma": 7112.95, "major_pos_vol": 7135, "major_pos_oi": 7200, "major_neg_vol": 7100, "major_neg_oi": 6900, "strikes": [ [6890,-228.01,-86.9,[-240.55,-243.15,-245.22,-221.27,-220.12]], [6895,-48.47,69.76,[-49.05,-46.76,-45.55,-45.53,-42.97]], // Trimmed for brevity [7380,44.16,75.99,[0,47.7,47.3,0,40.55]], [7385,5.5,14.27,[0,0,0,0,0]]], "sum_gex_vol": 1712585.519, "sum_gex_oi": 51521.105, "delta_risk_reversal": 0.118, "max_priors": [ [7140,170979.742], [7135,1145886.722], [7135,997473.336], [7135,1106210.715], [7135,1128504.809], [7135,1131150.488] ] } ``` -------------------------------- ### Negotiate WebSocket Connection Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/README.md Initiates a WebSocket connection negotiation. ```APIDOC ## POST /negotiate ### Description Initiates a WebSocket connection negotiation. This endpoint is used to establish a real-time data feed connection. ### Method POST ### Endpoint `/negotiate` ### Request Body - **subscribe** (array) - Required - An array of subscription requests, each specifying a `package` and `category`. - **package** (string) - Required - The data package to subscribe to (e.g., "classic", "state", "orderflow", "quant"). - **category** (string) - Required - The category of data within the package (e.g., "gex_full", "gamma"). ### Request Example ```json { "subscribe": [ { "package": "classic", "category": "gex_full" }, { "package": "orderflow", "category": "orderflow" } ] } ``` ### Response #### Success Response (200) - **connection_id** (string) - A unique identifier for the WebSocket connection. - **websocket_url** (string) - The URL for the WebSocket endpoint. #### Response Example ```json { "connection_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "websocket_url": "wss://api.gex.bot/v2/ws" } ``` ``` -------------------------------- ### Connect to a Hub using wscat Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/docs/websocket.md Connect to a specific WebSocket hub using wscat, specifying the Azure Web PubSub subprotocol. Replace the placeholder access token with a valid one obtained from the /negotiate response. ```sh wscat -c "wss://ws.gex.bot:443/client/hubs/orderflow?access_token=" \ --subprotocol json.webpubsub.azure.v1 ``` -------------------------------- ### Key GEX Levels (Classic) Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/README.md Retrieves key GEX levels for classic data for a specified ticker and category. ```APIDOC ## GET /{ticker}/classic/{category}/majors ### Description Retrieves key GEX levels for classic data for a specified ticker and category. ### Method GET ### Endpoint `/{ticker}/classic/{category}/majors` ### Parameters #### Path Parameters - **ticker** (string) - Required - The ticker symbol (e.g., SPX). - **category** (string) - Required - The category of data (e.g., gex_full). ### Response #### Success Response (200) - **timestamp** (integer) - Unix timestamp of the data. - **ticker** (string) - The ticker symbol. - **major_pos_vol** (integer) - Major positive volume strike. - **major_pos_oi** (integer) - Major positive open interest strike. - **major_neg_vol** (integer) - Major negative volume strike. - **major_neg_oi** (integer) - Major negative open interest strike. #### Response Example ```json { "timestamp": 1777492800, "ticker": "SPX", "major_pos_vol": 7135, "major_pos_oi": 7200, "major_neg_vol": 7100, "major_neg_oi": 6900 } ``` ``` -------------------------------- ### Join a Group Message Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/docs/websocket.md Send a JSON message to join a specific group. The group name must be constructed using the prefix obtained from the /negotiate response, followed by the hub and group identifiers. ```json {"type":"joinGroup","group":"blue_SPX_orderflow_orderflow","ackId":1} ``` -------------------------------- ### Max GEX Change by Lookback (Classic) Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/README.md Retrieves max GEX change by lookback for classic data for a specified ticker and category. ```APIDOC ## GET /{ticker}/classic/{category}/maxchange ### Description Retrieves max GEX change by lookback for classic data for a specified ticker and category. ### Method GET ### Endpoint `/{ticker}/classic/{category}/maxchange` ### Parameters #### Path Parameters - **ticker** (string) - Required - The ticker symbol (e.g., SPX). - **category** (string) - Required - The category of data (e.g., gex_full). ### Response #### Success Response (200) - **timestamp** (integer) - Unix timestamp of the data. - **ticker** (string) - The ticker symbol. - **max_change_1d** (number) - Max GEX change over 1 day. - **max_change_5d** (number) - Max GEX change over 5 days. - **max_change_10d** (number) - Max GEX change over 10 days. - **max_change_20d** (number) - Max GEX change over 20 days. #### Response Example ```json { "timestamp": 1777492800, "ticker": "SPX", "max_change_1d": 500000, "max_change_5d": 1500000, "max_change_10d": 2500000, "max_change_20d": 4000000 } ``` ``` -------------------------------- ### List Available Ticker Symbols Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/README.md Retrieves a list of available ticker symbols supported by the API. ```APIDOC ## GET /tickers ### Description Retrieves a list of available ticker symbols supported by the API. ### Method GET ### Endpoint `/tickers` ### Response #### Success Response (200) - **tickers** (array) - An array of ticker symbols (strings). #### Response Example ```json { "tickers": ["SPX", "NDX", "DJX", "VXN"] } ``` ``` -------------------------------- ### Key GEX Levels (State) Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/README.md Retrieves key GEX levels for state data for a specified ticker and category. ```APIDOC ## GET /{ticker}/state/{category}/majors ### Description Retrieves key GEX levels for state data for a specified ticker and category. ### Method GET ### Endpoint `/{ticker}/state/{category}/majors` ### Parameters #### Path Parameters - **ticker** (string) - Required - The ticker symbol (e.g., SPX). - **category** (string) - Required - The category of data (e.g., gamma). ### Response #### Success Response (200) - **timestamp** (integer) - Unix timestamp of the data. - **ticker** (string) - The ticker symbol. - **max_pain** (number) - Max pain strike. - **gex** (number) - Gamma Exposure (GEX) value. #### Response Example ```json { "timestamp": 1777492800, "ticker": "SPX", "max_pain": 7100, "gex": 1712585.519 } ``` ``` -------------------------------- ### Orderflow Metrics Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/README.md Retrieves orderflow metrics for a specified ticker. ```APIDOC ## GET /{ticker}/orderflow/orderflow ### Description Retrieves orderflow metrics for a specified ticker. ### Method GET ### Endpoint `/{ticker}/orderflow/orderflow` ### Parameters #### Path Parameters - **ticker** (string) - Required - The ticker symbol (e.g., SPX). ### Response #### Success Response (200) - **timestamp** (integer) - Unix timestamp of the data. - **ticker** (string) - The ticker symbol. - **bid_size** (number) - Total bid size. - **ask_size** (number) - Total ask size. - **bid_volume** (number) - Total bid volume. - **ask_volume** (number) - Total ask volume. - **net_flow** (number) - Net order flow. - **gross_flow** (number) - Gross order flow. #### Response Example ```json { "timestamp": 1777492800, "ticker": "SPX", "bid_size": 15000, "ask_size": 12000, "bid_volume": 300000, "ask_volume": 250000, "net_flow": 50000, "gross_flow": 550000 } ``` ``` -------------------------------- ### Gexbot API Base URL Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/README.md The base URL for all Gexbot API v2 requests. ```text https://api.gex.bot/v2 ``` -------------------------------- ### Max GEX Change by Lookback (State) Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/README.md Retrieves max GEX change by lookback for state data for a specified ticker and category. ```APIDOC ## GET /{ticker}/state/{category}/maxchange ### Description Retrieves max GEX change by lookback for state data for a specified ticker and category. ### Method GET ### Endpoint `/{ticker}/state/{category}/maxchange` ### Parameters #### Path Parameters - **ticker** (string) - Required - The ticker symbol (e.g., SPX). - **category** (string) - Required - The category of data (e.g., gamma). ### Response #### Success Response (200) - **timestamp** (integer) - Unix timestamp of the data. - **ticker** (string) - The ticker symbol. - **max_change_1d** (number) - Max GEX change over 1 day. - **max_change_5d** (number) - Max GEX change over 5 days. - **max_change_10d** (number) - Max GEX change over 10 days. - **max_change_20d** (number) - Max GEX change over 20 days. #### Response Example ```json { "timestamp": 1777492800, "ticker": "SPX", "max_change_1d": 500000, "max_change_5d": 1500000, "max_change_10d": 2500000, "max_change_20d": 4000000 } ``` ``` -------------------------------- ### Download Historical Data Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/README.md Downloads historical data for a specified ticker, package, category, and date. ```APIDOC ## GET /hist/{ticker}/{package}/{category}/{date} ### Description Downloads historical data for a specified ticker, package, category, and date. ### Method GET ### Endpoint `/hist/{ticker}/{package}/{category}/{date}` ### Parameters #### Path Parameters - **ticker** (string) - Required - The ticker symbol (e.g., SPX). - **package** (string) - Required - The data package (e.g., classic, state, orderflow). - **category** (string) - Required - The category of data (e.g., gex_full). - **date** (string) - Required - The date in YYYY-MM-DD format. ### Response #### Success Response (200) - The response format depends on the requested package and category. It typically includes historical data points for the specified date. #### Response Example ```json { "ticker": "SPX", "date": "2023-10-27", "package": "classic", "category": "gex_full", "data": [ // Historical data points for the day ] } ``` ``` -------------------------------- ### Classic GEX Chart Data Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/README.md Retrieves classic GEX chart data for a specified ticker and category. ```APIDOC ## GET /{ticker}/classic/{category} ### Description Retrieves classic GEX chart data for a specified ticker and category. ### Method GET ### Endpoint `/{ticker}/classic/{category}` ### Parameters #### Path Parameters - **ticker** (string) - Required - The ticker symbol (e.g., SPX). - **category** (string) - Required - The category of data (e.g., gex_full). ### Request Example ```http request GET https://api.gex.bot/v2/SPX/classic/gex_full Authorization: Bearer gexbot_custom_ User-Agent: my-app/1.0 Accept: application/json ``` ### Response #### Success Response (200) - **timestamp** (integer) - Unix timestamp of the data. - **ticker** (string) - The ticker symbol. - **min_dte** (integer) - Minimum days to expiration. - **sec_min_dte** (integer) - Secondary minimum days to expiration. - **spot** (number) - Current spot price. - **zero_gamma** (number) - Zero gamma level. - **major_pos_vol** (integer) - Major positive volume strike. - **major_pos_oi** (integer) - Major positive open interest strike. - **major_neg_vol** (integer) - Major negative volume strike. - **major_neg_oi** (integer) - Major negative open interest strike. - **strikes** (array) - Array of strike data. - **sum_gex_vol** (number) - Sum of GEX volume. - **sum_gex_oi** (number) - Sum of GEX open interest. - **delta_risk_reversal** (number) - Delta risk reversal. - **max_priors** (array) - Array of max prior data. #### Response Example ```json { "timestamp": 1777492800, "ticker": "SPX", "min_dte": 0, "sec_min_dte": 1, "spot": 7138.55, "zero_gamma": 7112.95, "major_pos_vol": 7135, "major_pos_oi": 7200, "major_neg_vol": 7100, "major_neg_oi": 6900, "strikes": [ [6890,-228.01,-86.9,[-240.55,-243.15,-245.22,-221.27,-220.12]], [6895,-48.47,69.76,[-49.05,-46.76,-45.55,-45.53,-42.97]], [7380,44.16,75.99,[0,47.7,47.3,0,40.55]], [7385,5.5,14.27,[0,0,0,0,0]] ], "sum_gex_vol": 1712585.519, "sum_gex_oi": 51521.105, "delta_risk_reversal": 0.118, "max_priors": [ [7140,170979.742], [7135,1145886.722], [7135,997473.336], [7135,1106210.715], [7135,1128504.809], [7135,1131150.488] ] } ``` ``` -------------------------------- ### State Greeks Chart Data Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/README.md Retrieves state greeks chart data for a specified ticker and category. ```APIDOC ## GET /{ticker}/state/{category} ### Description Retrieves state greeks chart data for a specified ticker and category. ### Method GET ### Endpoint `/{ticker}/state/{category}` ### Parameters #### Path Parameters - **ticker** (string) - Required - The ticker symbol (e.g., SPX). - **category** (string) - Required - The category of data (e.g., gamma). ### Response #### Success Response (200) - **timestamp** (integer) - Unix timestamp of the data. - **ticker** (string) - The ticker symbol. - **spot** (number) - Current spot price. - **gamma_risk** (number) - Gamma risk value. - **delta_risk** (number) - Delta risk value. - **theta_risk** (number) - Theta risk value. - **vega_risk** (number) - Vega risk value. - **max_pain** (number) - Max pain strike. - **gex** (number) - Gamma Exposure (GEX) value. #### Response Example ```json { "timestamp": 1777492800, "ticker": "SPX", "spot": 7138.55, "gamma_risk": -150.25, "delta_risk": 10.5, "theta_risk": -5.75, "vega_risk": 25.1, "max_pain": 7100, "gex": 1712585.519 } ``` ``` -------------------------------- ### Join Group Acknowledgment Source: https://github.com/nfa-llc/gexbot-openapi/blob/master/docs/websocket.md A successful response to a joinGroup message, indicating the join operation was successful. ```json {"type":"ack","ackId":1,"success":true} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.