openapi: 3.0.2
info:
  title: Stocks Trading WebSocket Streams
  description: "WebSocket stream definitions for Binance Stocks Trading. Base URL: wss://nbstream.binance.com/equity"
  x-description-cn: Binance 股票交易的 WebSocket 流定义。基础 URL：wss://nbstream.binance.com/equity
  version: 1.0.0
  termsOfService: https://www.binance.com/en/terms
  contact:
    name: Binance API Support
    url: https://www.binance.com/en/support
x-product-type: ws-streams
x-stream-name-case: preserve
externalDocs:
  description: Stocks WebSocket Streams docs
  url: https://developers.binance.com/en/docs/products/stocks/websocket-streams-general-info
tags:
  - name: market-streams
    x-displayName: Market Streams
    x-displayName-cn: 行情流
  - name: user-streams
    x-displayName: User Streams
    x-displayName-cn: 用户流
servers:
  - url: wss://nbstream.binance.com/equity
paths:
  /price:
    post:
      summary: Price Stream
      x-summary-cn: 价格流
      description: >-
        Push-all price snapshot, polled every 3 seconds. One message carries the latest price for every active US-equity
        symbol. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see [Subscribing via
        RPC](https://developers.binance.com/en/docs/products/stocks/websocket-streams-general-info#subscribing-via-rpc).
      x-description-cn: >-
        全量价格快照，每 3 秒推送一次。每条消息包含所有活跃美股 symbol 的最新价格。也可以通过 SUBSCRIBE/UNSUBSCRIBE RPC 获取——见[通过 RPC
        订阅](https://developers.binance.com/zh-CN/docs/products/stocks/websocket-streams-general-info#通过-rpc-订阅)。
      tags:
        - market-streams
      operationId: priceStream
      externalDocs:
        url: >-
          https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#price-stream
      x-connectors-examples:
        ts: >-
          https://raw.githubusercontent.com/binance/binance-connector-js/master/clients/stocks/examples/websocket-streams/MarketStreamsApi/priceStream.ts
        rust: >-
          https://raw.githubusercontent.com/binance/binance-connector-rust/main/examples/stocks/websocket_streams/market_streams_api/price_stream.rs
        python: >-
          https://raw.githubusercontent.com/binance/binance-connector-python/master/clients/stocks/examples/websocket_streams/MarketStreams/price_stream.py
        java: >-
          https://raw.githubusercontent.com/binance/binance-connector-java/master/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/websocketmarketstreams/marketstreams/PriceStreamExample.java
        go: >-
          https://raw.githubusercontent.com/binance/binance-connector-go/main/clients/stocks/examples/websocketstreams//MarketStreamsAPI/PriceStream/PriceStream.go
      parameters:
        - name: id
          in: query
          required: false
          schema:
            type: string
            example: e9d6b4349871b40611412680b3445fac
          description: Unique WebSocket request ID.
          x-description-cn: 唯一的 WebSocket 请求 ID。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  description: WebSocket Streams method name.
                  x-description-cn: WebSocket 数据流方法名称。
                  enum:
                    - SUBSCRIBE
                  example: SUBSCRIBE
                params:
                  type: array
                  items:
                    type: string
                  description: List of streams to subscribe to.
                  x-description-cn: 要订阅的数据流列表。
                  example:
                    - price
                id:
                  type: string
                  example: e9d6b4349871b40611412680b3445fac
                  description: Unique WebSocket request ID.
                  x-description-cn: 唯一的 WebSocket 请求 ID。
              required:
                - method
                - params
                - id
              additionalProperties: false
            example:
              method: SUBSCRIBE
              params:
                - price
              id: e9d6b4349871b40611412680b3445fac
      responses:
        Raw Stream:
          description: Price Stream
          x-description-cn: 价格流
          content:
            application/json:
              schema:
                type: object
                properties:
                  e:
                    type: string
                    example: price
                    description: Event type, always `"price"`.
                    x-description-cn: 事件类型，固定为 `"price"`。
                  rates:
                    type: array
                    description: One entry per symbol.
                    x-description-cn: 每个 symbol 一条记录。
                    items:
                      type: object
                      properties:
                        s:
                          type: string
                          example: AAPL
                          description: Symbol (UPPERCASE ticker), e.g. `"AAPL"`.
                          x-description-cn: Symbol（大写 ticker），例如 `"AAPL"`。
                        ac:
                          type: string
                          example: EQ_AAPL
                          description: Internal asset code, `EQ_{symbol}`. Reference only; do not use as a trading identifier.
                          x-description-cn: 内部资产代码 `EQ_{symbol}`，仅供参考，不用作交易标识符。
                        p:
                          type: string
                          example: "182.5"
                          description: Latest price, trailing-zero stripped.
                          x-description-cn: 最新价格，末尾零已去除。
                        t:
                          type: integer
                          format: int64
                          nullable: true
                          example: 1710320400000
                          description: Price time (epoch milliseconds UTC); may be null.
                          x-description-cn: 价格时间（UTC epoch 毫秒），可能为 null。
                        pc:
                          type: string
                          example: "181.2000"
                          description: Previous day's RTH close price (reference); absent when unknown.
                          x-description-cn: 前一交易日 RTH 收盘价（参考值），不可知时不存在。
                        tc:
                          type: string
                          example: "182.0000"
                          description: Today's RTH close price; absent before After-Hours.
                          x-description-cn: 今日 RTH 收盘价，盘后前不存在。
                        mp:
                          type: string
                          example: O
                          enum:
                            - C
                            - true
                            - PRE
                            - O
                            - POST
                          description: >-
                            Per-symbol market phase: `C` Closed, `ON` Overnight, `PRE` Pre-Market, `O` Market Open,
                            `POST` Post-Market.
                          x-description-cn: 每 symbol 市场阶段：`C` 已收市、`ON` 夜盘、`PRE` 盘前、`O` 盘中、`POST` 盘后。
              example:
                e: price
                rates:
                  - s: AAPL
                    ac: EQ_AAPL
                    p: "182.5"
                    t: 1710320400000
                    pc: "181.2000"
                    tc: "182.0000"
                    mp: O
        Combined Stream:
          description: Stream payload with stream name.
          content:
            application/json:
              schema:
                type: object
                properties:
                  stream:
                    type: string
                    example: price
                  data:
                    type: object
                    properties:
                      e:
                        type: string
                        example: price
                        description: Event type, always `"price"`.
                        x-description-cn: 事件类型，固定为 `"price"`。
                      rates:
                        type: array
                        description: One entry per symbol.
                        x-description-cn: 每个 symbol 一条记录。
                        items:
                          type: object
                          properties:
                            s:
                              type: string
                              example: AAPL
                              description: Symbol (UPPERCASE ticker), e.g. `"AAPL"`.
                              x-description-cn: Symbol（大写 ticker），例如 `"AAPL"`。
                            ac:
                              type: string
                              example: EQ_AAPL
                              description: Internal asset code, `EQ_{symbol}`. Reference only; do not use as a trading identifier.
                              x-description-cn: 内部资产代码 `EQ_{symbol}`，仅供参考，不用作交易标识符。
                            p:
                              type: string
                              example: "182.5"
                              description: Latest price, trailing-zero stripped.
                              x-description-cn: 最新价格，末尾零已去除。
                            t:
                              type: integer
                              format: int64
                              nullable: true
                              example: 1710320400000
                              description: Price time (epoch milliseconds UTC); may be null.
                              x-description-cn: 价格时间（UTC epoch 毫秒），可能为 null。
                            pc:
                              type: string
                              example: "181.2000"
                              description: Previous day's RTH close price (reference); absent when unknown.
                              x-description-cn: 前一交易日 RTH 收盘价（参考值），不可知时不存在。
                            tc:
                              type: string
                              example: "182.0000"
                              description: Today's RTH close price; absent before After-Hours.
                              x-description-cn: 今日 RTH 收盘价，盘后前不存在。
                            mp:
                              type: string
                              example: O
                              enum:
                                - C
                                - true
                                - PRE
                                - O
                                - POST
                              description: >-
                                Per-symbol market phase: `C` Closed, `ON` Overnight, `PRE` Pre-Market, `O` Market Open,
                                `POST` Post-Market.
                              x-description-cn: 每 symbol 市场阶段：`C` 已收市、`ON` 夜盘、`PRE` 盘前、`O` 盘中、`POST` 盘后。
                required:
                  - stream
                  - data
                additionalProperties: false
              example:
                stream: price
                data:
                  e: price
                  rates:
                    - s: AAPL
                      ac: EQ_AAPL
                      p: "182.5"
                      t: 1710320400000
                      pc: "181.2000"
                      tc: "182.0000"
                      mp: O
  /{symbol}@quote:
    post:
      summary: Quote Stream
      x-summary-cn: 报价流
      description: >-
        Per-symbol real-time best-bid / best-ask. Each symbol has its own stream. Per-symbol throttle: at most one push
        per symbol every 200 ms. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see [Subscribing via
        RPC](https://developers.binance.com/en/docs/products/stocks/websocket-streams-general-info#subscribing-via-rpc).
      x-description-cn: >-
        每个 symbol 的实时最优买一 / 卖一报价，每只 symbol 独立 stream。每 symbol 限速：每 200 ms 最多推送一次。也可以通过 SUBSCRIBE/UNSUBSCRIBE RPC
        获取——见[通过 RPC
        订阅](https://developers.binance.com/zh-CN/docs/products/stocks/websocket-streams-general-info#通过-rpc-订阅)。
      tags:
        - market-streams
      operationId: quoteStream
      externalDocs:
        url: >-
          https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#quote-stream
      x-connectors-examples:
        ts: >-
          https://raw.githubusercontent.com/binance/binance-connector-js/master/clients/stocks/examples/websocket-streams/MarketStreamsApi/quoteStream.ts
        rust: >-
          https://raw.githubusercontent.com/binance/binance-connector-rust/main/examples/stocks/websocket_streams/market_streams_api/quote_stream.rs
        python: >-
          https://raw.githubusercontent.com/binance/binance-connector-python/master/clients/stocks/examples/websocket_streams/MarketStreams/quote_stream.py
        java: >-
          https://raw.githubusercontent.com/binance/binance-connector-java/master/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/websocketmarketstreams/marketstreams/QuoteStreamExample.java
        go: >-
          https://raw.githubusercontent.com/binance/binance-connector-go/main/clients/stocks/examples/websocketstreams//MarketStreamsAPI/QuoteStream/QuoteStream.go
      parameters:
        - name: id
          in: query
          required: false
          schema:
            type: string
            example: e9d6b4349871b40611412680b3445fac
          description: Unique WebSocket request ID.
          x-description-cn: 唯一的 WebSocket 请求 ID。
        - name: symbol
          in: path
          required: true
          schema:
            type: string
            example: AAPL
          description: US-equity ticker (UPPERCASE), e.g. `AAPL`.
          x-description-cn: 美股 ticker（大写），如 `AAPL`。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  description: WebSocket Streams method name.
                  x-description-cn: WebSocket 数据流方法名称。
                  enum:
                    - SUBSCRIBE
                  example: SUBSCRIBE
                params:
                  type: array
                  items:
                    type: string
                  description: List of streams to subscribe to.
                  x-description-cn: 要订阅的数据流列表。
                  example:
                    - AAPL@quote
                id:
                  type: string
                  example: e9d6b4349871b40611412680b3445fac
                  description: Unique WebSocket request ID.
                  x-description-cn: 唯一的 WebSocket 请求 ID。
              required:
                - method
                - params
                - id
              additionalProperties: false
            example:
              method: SUBSCRIBE
              params:
                - AAPL@quote
              id: e9d6b4349871b40611412680b3445fac
      responses:
        Raw Stream:
          description: Quote Stream
          x-description-cn: 报价流
          content:
            application/json:
              schema:
                type: object
                properties:
                  e:
                    type: string
                    example: quote
                    description: Event type, always `"quote"`.
                    x-description-cn: 事件类型，固定为 `"quote"`。
                  E:
                    type: integer
                    format: int64
                    example: 1710320400000
                    description: Event time — epoch milliseconds when the server pushed the message.
                    x-description-cn: 事件时间——服务端推送消息时的 epoch 毫秒数。
                  s:
                    type: string
                    example: AAPL
                    description: Symbol (UPPERCASE ticker), e.g. `"AAPL"`.
                    x-description-cn: Symbol（大写 ticker），例如 `"AAPL"`。
                  bp:
                    type: string
                    example: "182.50"
                    description: Best bid price.
                    x-description-cn: 最优买一价。
                  ap:
                    type: string
                    example: "182.55"
                    description: Best ask price.
                    x-description-cn: 最优卖一价。
                  bs:
                    type: integer
                    example: 100
                    description: Best bid size (shares).
                    x-description-cn: 最优买一量（股数）。
                  as:
                    type: integer
                    example: 200
                    description: Best ask size (shares).
                    x-description-cn: 最优卖一量（股数）。
                  T:
                    type: integer
                    format: int64
                    nullable: true
                    example: 1710320399500
                    description: Source quote timestamp (epoch milliseconds); may be null.
                    x-description-cn: 上游报价时间戳（epoch 毫秒），可能为 null。
              example:
                e: quote
                E: 1710320400000
                s: AAPL
                bp: "182.50"
                ap: "182.55"
                bs: 100
                as: 200
                T: 1710320399500
        Combined Stream:
          description: Stream payload with stream name.
          content:
            application/json:
              schema:
                type: object
                properties:
                  stream:
                    type: string
                    example: AAPL@quote
                  data:
                    type: object
                    properties:
                      e:
                        type: string
                        example: quote
                        description: Event type, always `"quote"`.
                        x-description-cn: 事件类型，固定为 `"quote"`。
                      E:
                        type: integer
                        format: int64
                        example: 1710320400000
                        description: Event time — epoch milliseconds when the server pushed the message.
                        x-description-cn: 事件时间——服务端推送消息时的 epoch 毫秒数。
                      s:
                        type: string
                        example: AAPL
                        description: Symbol (UPPERCASE ticker), e.g. `"AAPL"`.
                        x-description-cn: Symbol（大写 ticker），例如 `"AAPL"`。
                      bp:
                        type: string
                        example: "182.50"
                        description: Best bid price.
                        x-description-cn: 最优买一价。
                      ap:
                        type: string
                        example: "182.55"
                        description: Best ask price.
                        x-description-cn: 最优卖一价。
                      bs:
                        type: integer
                        example: 100
                        description: Best bid size (shares).
                        x-description-cn: 最优买一量（股数）。
                      as:
                        type: integer
                        example: 200
                        description: Best ask size (shares).
                        x-description-cn: 最优卖一量（股数）。
                      T:
                        type: integer
                        format: int64
                        nullable: true
                        example: 1710320399500
                        description: Source quote timestamp (epoch milliseconds); may be null.
                        x-description-cn: 上游报价时间戳（epoch 毫秒），可能为 null。
                required:
                  - stream
                  - data
                additionalProperties: false
              example:
                stream: AAPL@quote
                data:
                  e: quote
                  E: 1710320400000
                  s: AAPL
                  bp: "182.50"
                  ap: "182.55"
                  bs: 100
                  as: 200
                  T: 1710320399500
  /{symbol}@kline_{interval}:
    post:
      summary: Kline Stream
      x-summary-cn: K 线流
      description: >-
        Per-symbol candlestick updates. One stream per (symbol, interval) combination. Supported intervals: 5m, 1h, 1d,
        1w, 1M. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see [Subscribing via
        RPC](https://developers.binance.com/en/docs/products/stocks/websocket-streams-general-info#subscribing-via-rpc).
      x-description-cn: >-
        每个 symbol 的 K 线更新，每个（symbol, 周期）组合一个 stream。支持周期：5m、1h、1d、1w、1M。也可以通过 SUBSCRIBE/UNSUBSCRIBE RPC 获取——见[通过 RPC
        订阅](https://developers.binance.com/zh-CN/docs/products/stocks/websocket-streams-general-info#通过-rpc-订阅)。
      tags:
        - market-streams
      operationId: klineStream
      externalDocs:
        url: >-
          https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#kline-stream
      x-connectors-examples:
        ts: >-
          https://raw.githubusercontent.com/binance/binance-connector-js/master/clients/stocks/examples/websocket-streams/MarketStreamsApi/klineStream.ts
        rust: >-
          https://raw.githubusercontent.com/binance/binance-connector-rust/main/examples/stocks/websocket_streams/market_streams_api/kline_stream.rs
        python: >-
          https://raw.githubusercontent.com/binance/binance-connector-python/master/clients/stocks/examples/websocket_streams/MarketStreams/kline_stream.py
        java: >-
          https://raw.githubusercontent.com/binance/binance-connector-java/master/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/websocketmarketstreams/marketstreams/KlineStreamExample.java
        go: >-
          https://raw.githubusercontent.com/binance/binance-connector-go/main/clients/stocks/examples/websocketstreams//MarketStreamsAPI/KlineStream/KlineStream.go
      parameters:
        - name: id
          in: query
          required: false
          schema:
            type: string
            example: e9d6b4349871b40611412680b3445fac
          description: Unique WebSocket request ID.
          x-description-cn: 唯一的 WebSocket 请求 ID。
        - name: symbol
          in: path
          required: true
          schema:
            type: string
            example: AAPL
          description: US-equity ticker (UPPERCASE), e.g. `AAPL`.
          x-description-cn: 美股 ticker（大写），如 `AAPL`。
        - name: interval
          in: path
          required: true
          schema:
            type: string
            example: 5m
          description: Kline interval — `5m` / `1h` / `1d` / `1w` / `1M`.
          x-description-cn: K 线周期——`5m` / `1h` / `1d` / `1w` / `1M`。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  description: WebSocket Streams method name.
                  x-description-cn: WebSocket 数据流方法名称。
                  enum:
                    - SUBSCRIBE
                  example: SUBSCRIBE
                params:
                  type: array
                  items:
                    type: string
                  description: List of streams to subscribe to.
                  x-description-cn: 要订阅的数据流列表。
                  example:
                    - AAPL@kline_5m
                id:
                  type: string
                  example: e9d6b4349871b40611412680b3445fac
                  description: Unique WebSocket request ID.
                  x-description-cn: 唯一的 WebSocket 请求 ID。
              required:
                - method
                - params
                - id
              additionalProperties: false
            example:
              method: SUBSCRIBE
              params:
                - AAPL@kline_5m
              id: e9d6b4349871b40611412680b3445fac
      responses:
        Raw Stream:
          description: Kline Stream
          x-description-cn: K 线流
          content:
            application/json:
              schema:
                type: object
                properties:
                  e:
                    type: string
                    example: kline
                    description: Event type, always `"kline"`.
                    x-description-cn: 事件类型，固定为 `"kline"`。
                  E:
                    type: integer
                    format: int64
                    example: 1710320400000
                    description: Event time (epoch milliseconds); server-side system time when the message is pushed.
                    x-description-cn: 事件时间（epoch 毫秒），服务端推送消息时的系统时间。
                  s:
                    type: string
                    example: AAPL
                    description: Symbol (UPPERCASE ticker).
                    x-description-cn: Symbol（大写 ticker）。
                  k:
                    type: object
                    description: Candlestick payload.
                    x-description-cn: K 线数据。
                    properties:
                      t:
                        type: integer
                        format: int64
                        example: 1710316800000
                        description: Open time (epoch milliseconds).
                        x-description-cn: 开盘时间（epoch 毫秒）。
                      ct:
                        type: integer
                        format: int64
                        example: 1710317099999
                        description: >-
                          Close time (epoch milliseconds). For fixed intervals: `openTime + duration − 1ms`. For `1M`:
                          last day of month at 23:59:59.999 UTC.
                        x-description-cn: 收盘时间（epoch 毫秒）。固定周期：`openTime + 时长 − 1ms`；`1M`：当月最后一天 23:59:59.999 UTC。
                      s:
                        type: string
                        example: AAPL
                        description: Symbol (UPPERCASE ticker).
                        x-description-cn: Symbol（大写 ticker）。
                      i:
                        type: string
                        example: 5m
                        enum:
                          - 5m
                          - 1h
                          - 1d
                          - 1w
                          - 1M
                        description: Interval — `"5m"` / `"1h"` / `"1d"` / `"1w"` / `"1M"`.
                        x-description-cn: 周期——`"5m"` / `"1h"` / `"1d"` / `"1w"` / `"1M"`。
                      o:
                        type: string
                        example: "182.50"
                        description: Open price.
                        x-description-cn: 开盘价。
                      c:
                        type: string
                        example: "183.20"
                        description: Close price (latest print within the interval).
                        x-description-cn: 收盘价（区间内最新成交价）。
                      h:
                        type: string
                        example: "183.50"
                        description: High price.
                        x-description-cn: 最高价。
                      l:
                        type: string
                        example: "182.30"
                        description: Low price.
                        x-description-cn: 最低价。
                      v:
                        type: string
                        example: "15000"
                        description: Volume (shares), default `"0"`.
                        x-description-cn: 成交量（股数），默认 `"0"`。
                      "n":
                        type: integer
                        nullable: true
                        example: 120
                        description: Trade count; absent when upstream did not populate.
                        x-description-cn: 成交笔数，上游未填充时不存在。
                      x:
                        type: boolean
                        example: false
                        description: Candle is closed — `true` once the interval has ended.
                        x-description-cn: K 线是否已收盘——区间结束后为 `true`。
                      vw:
                        type: string
                        nullable: true
                        example: "182.95"
                        description: VWAP (volume-weighted average price); absent when upstream did not populate.
                        x-description-cn: VWAP（成交量加权平均价），上游未填充时不存在。
              example:
                e: kline
                E: 1710320400000
                s: AAPL
                k:
                  t: 1710316800000
                  ct: 1710317099999
                  s: AAPL
                  i: 5m
                  o: "182.50"
                  c: "183.20"
                  h: "183.50"
                  l: "182.30"
                  v: "15000"
                  "n": 120
                  x: false
                  vw: "182.95"
        Combined Stream:
          description: Stream payload with stream name.
          content:
            application/json:
              schema:
                type: object
                properties:
                  stream:
                    type: string
                    example: AAPL@kline_5m
                  data:
                    type: object
                    properties:
                      e:
                        type: string
                        example: kline
                        description: Event type, always `"kline"`.
                        x-description-cn: 事件类型，固定为 `"kline"`。
                      E:
                        type: integer
                        format: int64
                        example: 1710320400000
                        description: Event time (epoch milliseconds); server-side system time when the message is pushed.
                        x-description-cn: 事件时间（epoch 毫秒），服务端推送消息时的系统时间。
                      s:
                        type: string
                        example: AAPL
                        description: Symbol (UPPERCASE ticker).
                        x-description-cn: Symbol（大写 ticker）。
                      k:
                        type: object
                        description: Candlestick payload.
                        x-description-cn: K 线数据。
                        properties:
                          t:
                            type: integer
                            format: int64
                            example: 1710316800000
                            description: Open time (epoch milliseconds).
                            x-description-cn: 开盘时间（epoch 毫秒）。
                          ct:
                            type: integer
                            format: int64
                            example: 1710317099999
                            description: >-
                              Close time (epoch milliseconds). For fixed intervals: `openTime + duration − 1ms`. For
                              `1M`: last day of month at 23:59:59.999 UTC.
                            x-description-cn: 收盘时间（epoch 毫秒）。固定周期：`openTime + 时长 − 1ms`；`1M`：当月最后一天 23:59:59.999 UTC。
                          s:
                            type: string
                            example: AAPL
                            description: Symbol (UPPERCASE ticker).
                            x-description-cn: Symbol（大写 ticker）。
                          i:
                            type: string
                            example: 5m
                            enum:
                              - 5m
                              - 1h
                              - 1d
                              - 1w
                              - 1M
                            description: Interval — `"5m"` / `"1h"` / `"1d"` / `"1w"` / `"1M"`.
                            x-description-cn: 周期——`"5m"` / `"1h"` / `"1d"` / `"1w"` / `"1M"`。
                          o:
                            type: string
                            example: "182.50"
                            description: Open price.
                            x-description-cn: 开盘价。
                          c:
                            type: string
                            example: "183.20"
                            description: Close price (latest print within the interval).
                            x-description-cn: 收盘价（区间内最新成交价）。
                          h:
                            type: string
                            example: "183.50"
                            description: High price.
                            x-description-cn: 最高价。
                          l:
                            type: string
                            example: "182.30"
                            description: Low price.
                            x-description-cn: 最低价。
                          v:
                            type: string
                            example: "15000"
                            description: Volume (shares), default `"0"`.
                            x-description-cn: 成交量（股数），默认 `"0"`。
                          "n":
                            type: integer
                            nullable: true
                            example: 120
                            description: Trade count; absent when upstream did not populate.
                            x-description-cn: 成交笔数，上游未填充时不存在。
                          x:
                            type: boolean
                            example: false
                            description: Candle is closed — `true` once the interval has ended.
                            x-description-cn: K 线是否已收盘——区间结束后为 `true`。
                          vw:
                            type: string
                            nullable: true
                            example: "182.95"
                            description: VWAP (volume-weighted average price); absent when upstream did not populate.
                            x-description-cn: VWAP（成交量加权平均价），上游未填充时不存在。
                required:
                  - stream
                  - data
                additionalProperties: false
              example:
                stream: AAPL@kline_5m
                data:
                  e: kline
                  E: 1710320400000
                  s: AAPL
                  k:
                    t: 1710316800000
                    ct: 1710317099999
                    s: AAPL
                    i: 5m
                    o: "182.50"
                    c: "183.20"
                    h: "183.50"
                    l: "182.30"
                    v: "15000"
                    "n": 120
                    x: false
                    vw: "182.95"
  /calendar:
    post:
      summary: Calendar Stream
      x-summary-cn: 日历流
      description: >-
        Single-stream broadcast of market-phase transitions. One message per transition; no periodic heartbeat payload.
        Server polls every 5 seconds. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see [Subscribing via
        RPC](https://developers.binance.com/en/docs/products/stocks/websocket-streams-general-info#subscribing-via-rpc).
      x-description-cn: >-
        广播市场阶段切换事件，每次切换推送一条消息，无定时心跳。服务端每 5 秒轮询一次。也可以通过 SUBSCRIBE/UNSUBSCRIBE RPC 获取——见[通过 RPC
        订阅](https://developers.binance.com/zh-CN/docs/products/stocks/websocket-streams-general-info#通过-rpc-订阅)。
      tags:
        - market-streams
      operationId: calendarStream
      externalDocs:
        url: >-
          https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#calendar-stream
      x-connectors-examples:
        ts: >-
          https://raw.githubusercontent.com/binance/binance-connector-js/master/clients/stocks/examples/websocket-streams/MarketStreamsApi/calendarStream.ts
        rust: >-
          https://raw.githubusercontent.com/binance/binance-connector-rust/main/examples/stocks/websocket_streams/market_streams_api/calendar_stream.rs
        python: >-
          https://raw.githubusercontent.com/binance/binance-connector-python/master/clients/stocks/examples/websocket_streams/MarketStreams/calendar_stream.py
        java: >-
          https://raw.githubusercontent.com/binance/binance-connector-java/master/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/websocketmarketstreams/marketstreams/CalendarStreamExample.java
        go: >-
          https://raw.githubusercontent.com/binance/binance-connector-go/main/clients/stocks/examples/websocketstreams//MarketStreamsAPI/CalendarStream/CalendarStream.go
      parameters:
        - name: id
          in: query
          required: false
          schema:
            type: string
            example: e9d6b4349871b40611412680b3445fac
          description: Unique WebSocket request ID.
          x-description-cn: 唯一的 WebSocket 请求 ID。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  description: WebSocket Streams method name.
                  x-description-cn: WebSocket 数据流方法名称。
                  enum:
                    - SUBSCRIBE
                  example: SUBSCRIBE
                params:
                  type: array
                  items:
                    type: string
                  description: List of streams to subscribe to.
                  x-description-cn: 要订阅的数据流列表。
                  example:
                    - calendar
                id:
                  type: string
                  example: e9d6b4349871b40611412680b3445fac
                  description: Unique WebSocket request ID.
                  x-description-cn: 唯一的 WebSocket 请求 ID。
              required:
                - method
                - params
                - id
              additionalProperties: false
            example:
              method: SUBSCRIBE
              params:
                - calendar
              id: e9d6b4349871b40611412680b3445fac
      responses:
        Raw Stream:
          description: Calendar Stream
          x-description-cn: 日历流
          content:
            application/json:
              schema:
                type: object
                properties:
                  e:
                    type: string
                    example: calendar
                    description: Event type, always `"calendar"`.
                    x-description-cn: 事件类型，固定为 `"calendar"`。
                  from:
                    type: string
                    example: PRE_MARKET
                    enum:
                      - MARKET_CLOSED
                      - OVERNIGHT
                      - PRE_MARKET
                      - MARKET_OPEN
                      - POST_MARKET
                    description: Previous market phase.
                    x-description-cn: 切换前的市场阶段。
                  to:
                    type: string
                    example: MARKET_OPEN
                    enum:
                      - MARKET_CLOSED
                      - OVERNIGHT
                      - PRE_MARKET
                      - MARKET_OPEN
                      - POST_MARKET
                    description: New market phase.
                    x-description-cn: 切换后的新市场阶段。
                  ts:
                    type: integer
                    format: int64
                    example: 1710334200000
                    description: Event timestamp (epoch milliseconds UTC) when the transition was detected.
                    x-description-cn: 切换被检测到时的事件时间戳（UTC epoch 毫秒）。
              example:
                e: calendar
                from: PRE_MARKET
                to: MARKET_OPEN
                ts: 1710334200000
        Combined Stream:
          description: Stream payload with stream name.
          content:
            application/json:
              schema:
                type: object
                properties:
                  stream:
                    type: string
                    example: calendar
                  data:
                    type: object
                    properties:
                      e:
                        type: string
                        example: calendar
                        description: Event type, always `"calendar"`.
                        x-description-cn: 事件类型，固定为 `"calendar"`。
                      from:
                        type: string
                        example: PRE_MARKET
                        enum:
                          - MARKET_CLOSED
                          - OVERNIGHT
                          - PRE_MARKET
                          - MARKET_OPEN
                          - POST_MARKET
                        description: Previous market phase.
                        x-description-cn: 切换前的市场阶段。
                      to:
                        type: string
                        example: MARKET_OPEN
                        enum:
                          - MARKET_CLOSED
                          - OVERNIGHT
                          - PRE_MARKET
                          - MARKET_OPEN
                          - POST_MARKET
                        description: New market phase.
                        x-description-cn: 切换后的新市场阶段。
                      ts:
                        type: integer
                        format: int64
                        example: 1710334200000
                        description: Event timestamp (epoch milliseconds UTC) when the transition was detected.
                        x-description-cn: 切换被检测到时的事件时间戳（UTC epoch 毫秒）。
                required:
                  - stream
                  - data
                additionalProperties: false
              example:
                stream: calendar
                data:
                  e: calendar
                  from: PRE_MARKET
                  to: MARKET_OPEN
                  ts: 1710334200000
  /{symbol}@tradability:
    post:
      summary: Tradability Stream
      x-summary-cn: 可交易方向流
      description: >-
        Per-symbol push whenever the tradable direction of a symbol changes. Pushed only when the value actually changes
        (new value ≠ old value). Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see [Subscribing via
        RPC](https://developers.binance.com/en/docs/products/stocks/websocket-streams-general-info#subscribing-via-rpc).
      x-description-cn: >-
        每当 symbol 的可交易方向发生变化时推送。仅在值实际变化时推送（新值 ≠ 旧值）。也可以通过 SUBSCRIBE/UNSUBSCRIBE RPC 获取——见[通过 RPC
        订阅](https://developers.binance.com/zh-CN/docs/products/stocks/websocket-streams-general-info#通过-rpc-订阅)。
      tags:
        - market-streams
      operationId: tradabilityStream
      externalDocs:
        url: >-
          https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#tradability-stream
      x-connectors-examples:
        ts: >-
          https://raw.githubusercontent.com/binance/binance-connector-js/master/clients/stocks/examples/websocket-streams/MarketStreamsApi/tradabilityStream.ts
        rust: >-
          https://raw.githubusercontent.com/binance/binance-connector-rust/main/examples/stocks/websocket_streams/market_streams_api/tradability_stream.rs
        python: >-
          https://raw.githubusercontent.com/binance/binance-connector-python/master/clients/stocks/examples/websocket_streams/MarketStreams/tradability_stream.py
        java: >-
          https://raw.githubusercontent.com/binance/binance-connector-java/master/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/websocketmarketstreams/marketstreams/TradabilityStreamExample.java
        go: >-
          https://raw.githubusercontent.com/binance/binance-connector-go/main/clients/stocks/examples/websocketstreams//MarketStreamsAPI/TradabilityStream/TradabilityStream.go
      parameters:
        - name: id
          in: query
          required: false
          schema:
            type: string
            example: e9d6b4349871b40611412680b3445fac
          description: Unique WebSocket request ID.
          x-description-cn: 唯一的 WebSocket 请求 ID。
        - name: symbol
          in: path
          required: true
          schema:
            type: string
            example: AAPL
          description: US-equity ticker (UPPERCASE), e.g. `AAPL`.
          x-description-cn: 美股 ticker（大写），如 `AAPL`。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  description: WebSocket Streams method name.
                  x-description-cn: WebSocket 数据流方法名称。
                  enum:
                    - SUBSCRIBE
                  example: SUBSCRIBE
                params:
                  type: array
                  items:
                    type: string
                  description: List of streams to subscribe to.
                  x-description-cn: 要订阅的数据流列表。
                  example:
                    - AAPL@tradability
                id:
                  type: string
                  example: e9d6b4349871b40611412680b3445fac
                  description: Unique WebSocket request ID.
                  x-description-cn: 唯一的 WebSocket 请求 ID。
              required:
                - method
                - params
                - id
              additionalProperties: false
            example:
              method: SUBSCRIBE
              params:
                - AAPL@tradability
              id: e9d6b4349871b40611412680b3445fac
      responses:
        Raw Stream:
          description: Tradability Stream
          x-description-cn: 可交易方向流
          content:
            application/json:
              schema:
                type: object
                properties:
                  e:
                    type: string
                    example: tradability
                    description: Event type, always `"tradability"`.
                    x-description-cn: 事件类型，固定为 `"tradability"`。
                  symbol:
                    type: string
                    example: AAPL
                    description: Symbol (UPPERCASE ticker).
                    x-description-cn: Symbol（大写 ticker）。
                  assetCode:
                    type: string
                    nullable: true
                    example: EQ_AAPL
                    description: >-
                      Internal asset code `EQ_{symbol}`; reference only. May be null for symbols not yet in the symbol
                      dictionary.
                    x-description-cn: 内部资产代码 `EQ_{symbol}`，仅供参考。对尚未加入 symbol 字典的 symbol 可能为 null。
                  tradability:
                    type: string
                    example: BUY_SELL
                    enum:
                      - BUY_SELL
                      - BUY
                      - SELL
                      - NONE
                      - OFFMARKET
                      - DELISTING
                    description: >-
                      The new tradability value. `OFFMARKET` and `DELISTING` are protected states — trading-status
                      events will not transition a symbol out of them.
                    x-description-cn: 新的可交易方向值。`OFFMARKET` 和 `DELISTING` 为保护状态——交易状态事件不能将 symbol 从这两个状态转出。
                  t:
                    type: integer
                    format: int64
                    example: 1712345678000
                    description: Push time (epoch milliseconds UTC).
                    x-description-cn: 推送时间（UTC epoch 毫秒）。
              example:
                e: tradability
                symbol: AAPL
                assetCode: EQ_AAPL
                tradability: BUY_SELL
                t: 1712345678000
        Combined Stream:
          description: Stream payload with stream name.
          content:
            application/json:
              schema:
                type: object
                properties:
                  stream:
                    type: string
                    example: AAPL@tradability
                  data:
                    type: object
                    properties:
                      e:
                        type: string
                        example: tradability
                        description: Event type, always `"tradability"`.
                        x-description-cn: 事件类型，固定为 `"tradability"`。
                      symbol:
                        type: string
                        example: AAPL
                        description: Symbol (UPPERCASE ticker).
                        x-description-cn: Symbol（大写 ticker）。
                      assetCode:
                        type: string
                        nullable: true
                        example: EQ_AAPL
                        description: >-
                          Internal asset code `EQ_{symbol}`; reference only. May be null for symbols not yet in the
                          symbol dictionary.
                        x-description-cn: 内部资产代码 `EQ_{symbol}`，仅供参考。对尚未加入 symbol 字典的 symbol 可能为 null。
                      tradability:
                        type: string
                        example: BUY_SELL
                        enum:
                          - BUY_SELL
                          - BUY
                          - SELL
                          - NONE
                          - OFFMARKET
                          - DELISTING
                        description: >-
                          The new tradability value. `OFFMARKET` and `DELISTING` are protected states — trading-status
                          events will not transition a symbol out of them.
                        x-description-cn: 新的可交易方向值。`OFFMARKET` 和 `DELISTING` 为保护状态——交易状态事件不能将 symbol 从这两个状态转出。
                      t:
                        type: integer
                        format: int64
                        example: 1712345678000
                        description: Push time (epoch milliseconds UTC).
                        x-description-cn: 推送时间（UTC epoch 毫秒）。
                required:
                  - stream
                  - data
                additionalProperties: false
              example:
                stream: AAPL@tradability
                data:
                  e: tradability
                  symbol: AAPL
                  assetCode: EQ_AAPL
                  tradability: BUY_SELL
                  t: 1712345678000
  /{symbol}@tradingStatus:
    post:
      summary: Trading Status Stream
      x-summary-cn: 交易状态流
      description: >-
        Per-symbol trading-status transitions (halts, resumes, SSR, LULD pauses, etc.). Events that do not match a known
        status/reason rule are not pushed. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see [Subscribing via
        RPC](https://developers.binance.com/en/docs/products/stocks/websocket-streams-general-info#subscribing-via-rpc).
      x-description-cn: >-
        每个 symbol 的交易状态切换（停牌、恢复、SSR、LULD 暂停等）。不符合已知状态 / 原因规则的事件不推送。也可以通过 SUBSCRIBE/UNSUBSCRIBE RPC 获取——见[通过 RPC
        订阅](https://developers.binance.com/zh-CN/docs/products/stocks/websocket-streams-general-info#通过-rpc-订阅)。
      tags:
        - market-streams
      operationId: tradingStatusStream
      externalDocs:
        url: >-
          https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/market-streams#trading-status-stream
      x-connectors-examples:
        ts: >-
          https://raw.githubusercontent.com/binance/binance-connector-js/master/clients/stocks/examples/websocket-streams/MarketStreamsApi/tradingStatusStream.ts
        rust: >-
          https://raw.githubusercontent.com/binance/binance-connector-rust/main/examples/stocks/websocket_streams/market_streams_api/trading_status_stream.rs
        python: >-
          https://raw.githubusercontent.com/binance/binance-connector-python/master/clients/stocks/examples/websocket_streams/MarketStreams/trading_status_stream.py
        java: >-
          https://raw.githubusercontent.com/binance/binance-connector-java/master/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/websocketmarketstreams/marketstreams/TradingStatusStreamExample.java
        go: >-
          https://raw.githubusercontent.com/binance/binance-connector-go/main/clients/stocks/examples/websocketstreams//MarketStreamsAPI/TradingStatusStream/TradingStatusStream.go
      parameters:
        - name: id
          in: query
          required: false
          schema:
            type: string
            example: e9d6b4349871b40611412680b3445fac
          description: Unique WebSocket request ID.
          x-description-cn: 唯一的 WebSocket 请求 ID。
        - name: symbol
          in: path
          required: true
          schema:
            type: string
            example: AAPL
          description: US-equity ticker (UPPERCASE), e.g. `AAPL`.
          x-description-cn: 美股 ticker（大写），如 `AAPL`。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  description: WebSocket Streams method name.
                  x-description-cn: WebSocket 数据流方法名称。
                  enum:
                    - SUBSCRIBE
                  example: SUBSCRIBE
                params:
                  type: array
                  items:
                    type: string
                  description: List of streams to subscribe to.
                  x-description-cn: 要订阅的数据流列表。
                  example:
                    - AAPL@tradingStatus
                id:
                  type: string
                  example: e9d6b4349871b40611412680b3445fac
                  description: Unique WebSocket request ID.
                  x-description-cn: 唯一的 WebSocket 请求 ID。
              required:
                - method
                - params
                - id
              additionalProperties: false
            example:
              method: SUBSCRIBE
              params:
                - AAPL@tradingStatus
              id: e9d6b4349871b40611412680b3445fac
      responses:
        Raw Stream:
          description: Trading Status Stream
          x-description-cn: 交易状态流
          content:
            application/json:
              schema:
                type: object
                properties:
                  e:
                    type: string
                    example: tradingStatus
                    description: Event type, always `"tradingStatus"`.
                    x-description-cn: 事件类型，固定为 `"tradingStatus"`。
                  symbol:
                    type: string
                    example: AAPL
                    description: Symbol (UPPERCASE ticker), e.g. `"AAPL"`.
                    x-description-cn: Symbol（大写 ticker），例如 `"AAPL"`。
                  assetCode:
                    type: string
                    example: EQ_AAPL
                    description: Internal asset code `EQ_{symbol}`; reference only.
                    x-description-cn: 内部资产代码 `EQ_{symbol}`，仅供参考。
                  status:
                    type: string
                    example: TRADING_HALTED
                    enum:
                      - TRADING_HALTED
                      - TRADING_PAUSED
                      - SHORT_SALE_RESTRICTED
                      - TRADING_RESUMED
                      - QUOTATION_RESUMED
                      - TRADING_SUSPENDED
                      - UNAVAILABLE
                    description: Trading status.
                    x-description-cn: 交易状态。
                  msg:
                    type: string
                    example: MATERIAL_NEWS
                    description: Reason code.
                    x-description-cn: 原因码。
                  time:
                    type: integer
                    format: int64
                    example: 1614021300000
                    description: Status-effective time (epoch milliseconds UTC). May be in the future.
                    x-description-cn: 状态生效时间（UTC epoch 毫秒），可能是未来时间。
                  z:
                    type: string
                    example: C
                    enum:
                      - C
                      - "N"
                    description: "Tape designation: `C` = CTA (NYSE / AMEX), `N` = UTP (Nasdaq)."
                    x-description-cn: Tape 标识：`C` = CTA（NYSE / AMEX），`N` = UTP（Nasdaq）。
                  tradability:
                    type: string
                    example: NONE
                    enum:
                      - BUY_SELL
                      - BUY
                      - SELL
                      - NONE
                    description: "Tradability after the status change: `BUY_SELL` / `BUY` / `SELL` / `NONE`."
                    x-description-cn: 状态变化后的可交易方向：`BUY_SELL` / `BUY` / `SELL` / `NONE`。
              example:
                e: tradingStatus
                symbol: AAPL
                assetCode: EQ_AAPL
                status: TRADING_HALTED
                msg: MATERIAL_NEWS
                time: 1614021300000
                z: C
                tradability: NONE
        Combined Stream:
          description: Stream payload with stream name.
          content:
            application/json:
              schema:
                type: object
                properties:
                  stream:
                    type: string
                    example: AAPL@tradingStatus
                  data:
                    type: object
                    properties:
                      e:
                        type: string
                        example: tradingStatus
                        description: Event type, always `"tradingStatus"`.
                        x-description-cn: 事件类型，固定为 `"tradingStatus"`。
                      symbol:
                        type: string
                        example: AAPL
                        description: Symbol (UPPERCASE ticker), e.g. `"AAPL"`.
                        x-description-cn: Symbol（大写 ticker），例如 `"AAPL"`。
                      assetCode:
                        type: string
                        example: EQ_AAPL
                        description: Internal asset code `EQ_{symbol}`; reference only.
                        x-description-cn: 内部资产代码 `EQ_{symbol}`，仅供参考。
                      status:
                        type: string
                        example: TRADING_HALTED
                        enum:
                          - TRADING_HALTED
                          - TRADING_PAUSED
                          - SHORT_SALE_RESTRICTED
                          - TRADING_RESUMED
                          - QUOTATION_RESUMED
                          - TRADING_SUSPENDED
                          - UNAVAILABLE
                        description: Trading status.
                        x-description-cn: 交易状态。
                      msg:
                        type: string
                        example: MATERIAL_NEWS
                        description: Reason code.
                        x-description-cn: 原因码。
                      time:
                        type: integer
                        format: int64
                        example: 1614021300000
                        description: Status-effective time (epoch milliseconds UTC). May be in the future.
                        x-description-cn: 状态生效时间（UTC epoch 毫秒），可能是未来时间。
                      z:
                        type: string
                        example: C
                        enum:
                          - C
                          - "N"
                        description: "Tape designation: `C` = CTA (NYSE / AMEX), `N` = UTP (Nasdaq)."
                        x-description-cn: Tape 标识：`C` = CTA（NYSE / AMEX），`N` = UTP（Nasdaq）。
                      tradability:
                        type: string
                        example: NONE
                        enum:
                          - BUY_SELL
                          - BUY
                          - SELL
                          - NONE
                        description: "Tradability after the status change: `BUY_SELL` / `BUY` / `SELL` / `NONE`."
                        x-description-cn: 状态变化后的可交易方向：`BUY_SELL` / `BUY` / `SELL` / `NONE`。
                required:
                  - stream
                  - data
                additionalProperties: false
              example:
                stream: AAPL@tradingStatus
                data:
                  e: tradingStatus
                  symbol: AAPL
                  assetCode: EQ_AAPL
                  status: TRADING_HALTED
                  msg: MATERIAL_NEWS
                  time: 1614021300000
                  z: C
                  tradability: NONE
  /{listenKey}@orderReport:
    post:
      summary: Order Report Stream
      x-summary-cn: 订单回报流
      description: >-
        Real-time push of the authenticated user's order state transitions — both open-state updates (`ORDER_UPDATE`)
        and terminal-state notifications (`ORDER_TERMINAL`). Prerequisite: obtain a `listenKey` via the Listen Key
        endpoint first.
      x-description-cn: 实时推送认证用户的订单状态变化——包括开放状态更新（`ORDER_UPDATE`）和终态通知（`ORDER_TERMINAL`）。前提：先通过 Listen Key 接口获取 `listenKey`。
      tags:
        - user-streams
      operationId: orderReportStream
      externalDocs:
        url: >-
          https://developers.binance.com/en/docs/catalog/advanced-trading-stocks-trading/api/ws-streams/user-streams#order-report-stream
      x-connectors-examples:
        ts: >-
          https://raw.githubusercontent.com/binance/binance-connector-js/master/clients/stocks/examples/websocket-streams/UserStreamsApi/orderReportStream.ts
        rust: >-
          https://raw.githubusercontent.com/binance/binance-connector-rust/main/examples/stocks/websocket_streams/user_streams_api/order_report_stream.rs
        python: >-
          https://raw.githubusercontent.com/binance/binance-connector-python/master/clients/stocks/examples/websocket_streams/UserStreams/order_report_stream.py
        java: >-
          https://raw.githubusercontent.com/binance/binance-connector-java/master/examples/stocks/src/main/java/com/binance/connector/client/stocks/websocket/stream/websocketmarketstreams/userstreams/OrderReportStreamExample.java
        go: >-
          https://raw.githubusercontent.com/binance/binance-connector-go/main/clients/stocks/examples/websocketstreams//UserStreamsAPI/OrderReportStream/OrderReportStream.go
      parameters:
        - name: id
          in: query
          required: false
          schema:
            type: string
            example: e9d6b4349871b40611412680b3445fac
          description: Unique WebSocket request ID.
          x-description-cn: 唯一的 WebSocket 请求 ID。
        - name: listenKey
          in: path
          required: true
          schema:
            type: string
            example: pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s6af0dkfj2a97b8a91d
          description: User data listen key obtained from the Listen Key endpoint.
          x-description-cn: 从 Listen Key 接口获取的用户数据 listenKey。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  description: WebSocket Streams method name.
                  x-description-cn: WebSocket 数据流方法名称。
                  enum:
                    - SUBSCRIBE
                  example: SUBSCRIBE
                params:
                  type: array
                  items:
                    type: string
                  description: List of streams to subscribe to.
                  x-description-cn: 要订阅的数据流列表。
                  example:
                    - pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s6af0dkfj2a97b8a91d@orderReport
                id:
                  type: string
                  example: e9d6b4349871b40611412680b3445fac
                  description: Unique WebSocket request ID.
                  x-description-cn: 唯一的 WebSocket 请求 ID。
              required:
                - method
                - params
                - id
              additionalProperties: false
            example:
              method: SUBSCRIBE
              params:
                - pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s6af0dkfj2a97b8a91d@orderReport
              id: e9d6b4349871b40611412680b3445fac
      responses:
        Raw Stream:
          description: Order Report Stream
          x-description-cn: 订单回报流
          content:
            application/json:
              schema:
                type: object
                properties:
                  e:
                    type: string
                    example: orderReport
                    description: Event type, always `"orderReport"`.
                    x-description-cn: 事件类型，固定为 `"orderReport"`。
                  E:
                    type: integer
                    format: int64
                    example: 1710000000000
                    description: Event time (epoch milliseconds); server push time.
                    x-description-cn: 事件时间（epoch 毫秒）；服务端推送时间。
                  x:
                    type: string
                    example: ORDER_UPDATE
                    enum:
                      - ORDER_UPDATE
                      - ORDER_TERMINAL
                    description: 'Execution type: `"ORDER_UPDATE"` (still open) or `"ORDER_TERMINAL"` (reached terminal state).'
                    x-description-cn: 执行类型：`"ORDER_UPDATE"`（仍开放）或 `"ORDER_TERMINAL"`（已到达终态）。
                  i:
                    type: string
                    example: b0b6dd9d-8b9b-48a9-ba46-b9d54906e415
                    description: Order ID (UUID).
                    x-description-cn: 订单 ID（UUID）。
                  ai:
                    type: string
                    example: 4ce9353c-66d1-46c2-898f-fce867ab0247
                    description: Asset ID (internal identifier).
                    x-description-cn: 资产 ID（内部标识）。
                  b:
                    type: string
                    example: EQ_AAPL
                    description: >-
                      Base asset — the internal asset code with an `EQ_` prefix (e.g. `"EQ_AAPL"`), not the bare ticker
                      used in REST responses / order input. Strip the `EQ_` prefix to match a symbol used elsewhere.
                    x-description-cn: 基础资产——带 `EQ_` 前缀的内部资产代码（如 `"EQ_AAPL"`），而非 REST 响应/下单入参里用的裸 ticker。如需与别处的 symbol 匹配，请去掉 `EQ_` 前缀。
                  q:
                    type: string
                    example: USD
                    description: Quote currency, e.g. `"USD"`.
                    x-description-cn: 计价货币，例如 `"USD"`。
                  S:
                    type: string
                    example: buy
                    description: 'Order side: `"buy"` or `"sell"`. Note: lowercase, unlike REST responses.'
                    x-description-cn: 订单方向：`"buy"` 或 `"sell"`。注意：为小写，与 REST 响应不同。
                  o:
                    type: string
                    example: limit
                    description: >-
                      Order type: `"market"` / `"limit"` / `"stop"` / `"stop_limit"` / `"trailing_stop"`. Note:
                      lowercase.
                    x-description-cn: 订单类型：`"market"` / `"limit"` / `"stop"` / `"stop_limit"` / `"trailing_stop"`。注意：为小写。
                  p:
                    type: number
                    nullable: true
                    example: 185.5
                    description: Limit price; null for market orders.
                    x-description-cn: 限价；市价单为 null。
                  Q:
                    type: number
                    example: 10
                    description: Order quantity (shares); `0` when the order was submitted as notional.
                    x-description-cn: 订单数量（股数）；按名义金额下单时为 `0`。
                  "N":
                    type: number
                    nullable: true
                    example: null
                    description: >-
                      Order notional; set when the order was submitted as notional (market buy), null when submitted as
                      quantity.
                    x-description-cn: 订单名义金额；按名义金额下单（市价买入）时填充，按数量下单时为 null。
                  fq:
                    type: number
                    example: 5
                    description: Filled quantity.
                    x-description-cn: 已成交数量。
                  FN:
                    type: number
                    example: 927.5
                    description: Filled notional (= filledQty × filledAvgPrice).
                    x-description-cn: 已成交名义金额（= 成交数量 × 均价）。
                  tc:
                    type: number
                    example: 1856.2
                    description: Total cost — cumulative buy-in cost including the commission fee.
                    x-description-cn: 总成本（含手续费的累计买入成本）。
                  Z:
                    type: number
                    example: 50
                    description: "Fill progress percentage (0–100, 2 dp). By notional: `FN / N × 100`. By qty: `fq / Q × 100`."
                    x-description-cn: 成交进度百分比（0–100，2 位小数）。按名义金额：`FN / N × 100`；按数量：`fq / Q × 100`。
                  "n":
                    type: string
                    example: Regular
                    description: Trading session label, e.g. `"Regular"`, `"24 Hours Trading"`.
                    x-description-cn: 交易时段标签，例如 `"Regular"`、`"24 Hours Trading"`。
                  s:
                    type: string
                    example: partially_filled
                    description: >-
                      Order status, e.g. `"accepted"`, `"partially_filled"`, `"filled"`, `"canceled"`. Note: lowercase,
                      unlike REST responses.
                    x-description-cn: 订单状态，例如 `"accepted"`、`"partially_filled"`、`"filled"`、`"canceled"`。注意：为小写，与 REST 响应不同。
                  T:
                    type: integer
                    format: int64
                    example: 1710000000000
                    description: Order create time (epoch milliseconds).
                    x-description-cn: 订单创建时间（epoch 毫秒）。
                  U:
                    type: integer
                    format: int64
                    example: 1710000060000
                    description: Order update time (epoch milliseconds).
                    x-description-cn: 订单更新时间（epoch 毫秒）。
              example:
                e: orderReport
                E: 1710000000000
                x: ORDER_UPDATE
                i: b0b6dd9d-8b9b-48a9-ba46-b9d54906e415
                ai: 4ce9353c-66d1-46c2-898f-fce867ab0247
                b: EQ_AAPL
                q: USD
                S: buy
                o: limit
                p: 185.5
                Q: 10
                "N": null
                fq: 5
                FN: 927.5
                tc: 1856.2
                Z: 50
                "n": Regular
                s: partially_filled
                T: 1710000000000
                U: 1710000060000
        Combined Stream:
          description: Stream payload with stream name.
          content:
            application/json:
              schema:
                type: object
                properties:
                  stream:
                    type: string
                    example: pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s6af0dkfj2a97b8a91d@orderReport
                  data:
                    type: object
                    properties:
                      e:
                        type: string
                        example: orderReport
                        description: Event type, always `"orderReport"`.
                        x-description-cn: 事件类型，固定为 `"orderReport"`。
                      E:
                        type: integer
                        format: int64
                        example: 1710000000000
                        description: Event time (epoch milliseconds); server push time.
                        x-description-cn: 事件时间（epoch 毫秒）；服务端推送时间。
                      x:
                        type: string
                        example: ORDER_UPDATE
                        enum:
                          - ORDER_UPDATE
                          - ORDER_TERMINAL
                        description: 'Execution type: `"ORDER_UPDATE"` (still open) or `"ORDER_TERMINAL"` (reached terminal state).'
                        x-description-cn: 执行类型：`"ORDER_UPDATE"`（仍开放）或 `"ORDER_TERMINAL"`（已到达终态）。
                      i:
                        type: string
                        example: b0b6dd9d-8b9b-48a9-ba46-b9d54906e415
                        description: Order ID (UUID).
                        x-description-cn: 订单 ID（UUID）。
                      ai:
                        type: string
                        example: 4ce9353c-66d1-46c2-898f-fce867ab0247
                        description: Asset ID (internal identifier).
                        x-description-cn: 资产 ID（内部标识）。
                      b:
                        type: string
                        example: EQ_AAPL
                        description: >-
                          Base asset — the internal asset code with an `EQ_` prefix (e.g. `"EQ_AAPL"`), not the bare
                          ticker used in REST responses / order input. Strip the `EQ_` prefix to match a symbol used
                          elsewhere.
                        x-description-cn: >-
                          基础资产——带 `EQ_` 前缀的内部资产代码（如 `"EQ_AAPL"`），而非 REST 响应/下单入参里用的裸 ticker。如需与别处的 symbol 匹配，请去掉 `EQ_`
                          前缀。
                      q:
                        type: string
                        example: USD
                        description: Quote currency, e.g. `"USD"`.
                        x-description-cn: 计价货币，例如 `"USD"`。
                      S:
                        type: string
                        example: buy
                        description: 'Order side: `"buy"` or `"sell"`. Note: lowercase, unlike REST responses.'
                        x-description-cn: 订单方向：`"buy"` 或 `"sell"`。注意：为小写，与 REST 响应不同。
                      o:
                        type: string
                        example: limit
                        description: >-
                          Order type: `"market"` / `"limit"` / `"stop"` / `"stop_limit"` / `"trailing_stop"`. Note:
                          lowercase.
                        x-description-cn: 订单类型：`"market"` / `"limit"` / `"stop"` / `"stop_limit"` / `"trailing_stop"`。注意：为小写。
                      p:
                        type: number
                        nullable: true
                        example: 185.5
                        description: Limit price; null for market orders.
                        x-description-cn: 限价；市价单为 null。
                      Q:
                        type: number
                        example: 10
                        description: Order quantity (shares); `0` when the order was submitted as notional.
                        x-description-cn: 订单数量（股数）；按名义金额下单时为 `0`。
                      "N":
                        type: number
                        nullable: true
                        example: null
                        description: >-
                          Order notional; set when the order was submitted as notional (market buy), null when submitted
                          as quantity.
                        x-description-cn: 订单名义金额；按名义金额下单（市价买入）时填充，按数量下单时为 null。
                      fq:
                        type: number
                        example: 5
                        description: Filled quantity.
                        x-description-cn: 已成交数量。
                      FN:
                        type: number
                        example: 927.5
                        description: Filled notional (= filledQty × filledAvgPrice).
                        x-description-cn: 已成交名义金额（= 成交数量 × 均价）。
                      tc:
                        type: number
                        example: 1856.2
                        description: Total cost — cumulative buy-in cost including the commission fee.
                        x-description-cn: 总成本（含手续费的累计买入成本）。
                      Z:
                        type: number
                        example: 50
                        description: "Fill progress percentage (0–100, 2 dp). By notional: `FN / N × 100`. By qty: `fq / Q × 100`."
                        x-description-cn: 成交进度百分比（0–100，2 位小数）。按名义金额：`FN / N × 100`；按数量：`fq / Q × 100`。
                      "n":
                        type: string
                        example: Regular
                        description: Trading session label, e.g. `"Regular"`, `"24 Hours Trading"`.
                        x-description-cn: 交易时段标签，例如 `"Regular"`、`"24 Hours Trading"`。
                      s:
                        type: string
                        example: partially_filled
                        description: >-
                          Order status, e.g. `"accepted"`, `"partially_filled"`, `"filled"`, `"canceled"`. Note:
                          lowercase, unlike REST responses.
                        x-description-cn: 订单状态，例如 `"accepted"`、`"partially_filled"`、`"filled"`、`"canceled"`。注意：为小写，与 REST 响应不同。
                      T:
                        type: integer
                        format: int64
                        example: 1710000000000
                        description: Order create time (epoch milliseconds).
                        x-description-cn: 订单创建时间（epoch 毫秒）。
                      U:
                        type: integer
                        format: int64
                        example: 1710000060000
                        description: Order update time (epoch milliseconds).
                        x-description-cn: 订单更新时间（epoch 毫秒）。
                required:
                  - stream
                  - data
                additionalProperties: false
              example:
                stream: pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s6af0dkfj2a97b8a91d@orderReport
                data:
                  e: orderReport
                  E: 1710000000000
                  x: ORDER_UPDATE
                  i: b0b6dd9d-8b9b-48a9-ba46-b9d54906e415
                  ai: 4ce9353c-66d1-46c2-898f-fce867ab0247
                  b: EQ_AAPL
                  q: USD
                  S: buy
                  o: limit
                  p: 185.5
                  Q: 10
                  "N": null
                  fq: 5
                  FN: 927.5
                  tc: 1856.2
                  Z: 50
                  "n": Regular
                  s: partially_filled
                  T: 1710000000000
                  U: 1710000060000
