# Subscribe

Subscribe to real-time market data streaming. This interface allows you to subscribe to various types of market data including quotes, snapshots, and tick data for specified securities.

# OpenAPI definition

```json
{
  "info": {
    "title": "Webull Open API Reference",
    "description": "application.yml\\ncom\\ni18n\\nMETA-INF\\nstatic\\n\\r\\n",
    "contact": {
      "name": "",
      "url": "",
      "email": ""
    },
    "version": "2.0",
    "x-logo": {
      "url": "static/png/logo.png"
    }
  },
  "servers": [
    {
      "url": "https://us-global-openapi.uat.webullbroker.com"
    }
  ],
  "path": "/market-data/streaming/subscribe",
  "method": "post",
  "tags": [
    "Market Data/Streaming"
  ],
  "description": "Subscribe to real-time market data streaming. This interface allows you to subscribe to various types of market data including quotes, snapshots, and tick data for specified securities.",
  "operationId": "subscribeUsingPOST",
  "parameters": [
    {
      "name": "access_token",
      "in": "header",
      "description": "User's authenticated token.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "reqid",
      "in": "header",
      "description": "The unique ID for this request. Suggest using UUID.",
      "schema": {
        "type": "string"
      },
      "example": "2e46d5a4-bef9-4507-8cda-98f85d2f770c"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "required": [
            "category_symbols",
            "session_id",
            "sub_types"
          ],
          "type": "object",
          "properties": {
            "session_id": {
              "type": "string",
              "description": "The session_id used to create the connection, and the connection must be successfully established.",
              "example": "2d29ea02-8a35-11ec-8356-020017000b7b"
            },
            "category_symbols": {
              "type": "array",
              "description": "List of security symbols by category; maximum 100 symbols per query.",
              "items": {
                "required": [
                  "category",
                  "symbols"
                ],
                "type": "object",
                "properties": {
                  "category": {
                    "type": "string",
                    "description": "Security type. Category values are as shown in the enum.",
                    "example": "US_STOCK",
                    "enum": [
                      "US_STOCK"
                    ]
                  },
                  "symbols": {
                    "type": "array",
                    "description": "List of security symbols, supports JSON array format.",
                    "example": [
                      "AAPL",
                      "GOOG"
                    ],
                    "items": {
                      "type": "string",
                      "description": "List of security symbols, supports JSON array format.",
                      "example": "[\"AAPL\",\"GOOG\"]"
                    }
                  }
                },
                "description": "List of security symbols by security type",
                "title": "MultiCategory"
              }
            },
            "sub_types": {
              "type": "string",
              "description": "Subscription data type(s), multiple types separated by commas \",\", enum, refer to: SubType, e.g.: [SNAPSHOT]",
              "example": "[SNAPSHOT]",
              "enum": [
                "QUOTE",
                "SNAPSHOT",
                "TICK"
              ]
            },
            "depth": {
              "type": "string",
              "description": "LV2 subscription depth, default 10 levels, US stocks max 50 levels.",
              "example": "10"
            },
            "overnight_required": {
              "type": "boolean",
              "description": "Whether to include overnight session, true/false. For US stock subscriptions, includes overnight session, only effective for US stocks, default is not included.",
              "example": false
            }
          },
          "title": "SubscribeParams"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "OK"
    }
  },
  "jsonRequestBodyExample": {
    "session_id": "2d29ea02-8a35-11ec-8356-020017000b7b",
    "category_symbols": [
      {
        "category": "US_STOCK",
        "symbols": [
          "AAPL",
          "GOOG"
        ]
      }
    ],
    "sub_types": "[SNAPSHOT]",
    "depth": "10",
    "overnight_required": false
  },
  "postman": {
    "name": "Subscribe",
    "description": {
      "content": "Subscribe to real-time market data streaming. This interface allows you to subscribe to various types of market data including quotes, snapshots, and tick data for specified securities.",
      "type": "text/plain"
    },
    "url": {
      "path": [
        "market-data",
        "streaming",
        "subscribe"
      ],
      "host": [
        "{{baseUrl}}"
      ],
      "query": [],
      "variable": []
    },
    "header": [
      {
        "disabled": false,
        "description": {
          "content": "(Required) User's authenticated token.",
          "type": "text/plain"
        },
        "key": "access_token",
        "value": ""
      },
      {
        "disabled": false,
        "description": {
          "content": "The unique ID for this request. Suggest using UUID.",
          "type": "text/plain"
        },
        "key": "reqid",
        "value": ""
      },
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "method": "POST",
    "body": {
      "mode": "raw",
      "raw": "",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    }
  }
}
```
