> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qfex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MDS Playground

> Single channel for orderbook, trades, candles



## AsyncAPI

````yaml websocket/mds.yaml qfex
id: qfex
title: Qfex
description: Single channel for orderbook, trades, candles
servers:
  - id: production
    protocol: wss
    host: mds.qfex.com
    bindings: []
    variables: []
address: /
parameters: []
bindings: []
operations:
  - &ref_25
    id: subscribeOrderBookStream
    title: Subscribe order book stream
    description: Subscribe to a data stream
    type: receive
    messages:
      - &ref_36
        id: subscribeOrderBook
        contentType: application/json
        payload:
          - name: level2
            description: Subscribe to the order book
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - unsubscribe
                  - subscribe
                required: true
              - name: channels
                type: array
                required: true
              - name: symbols
                type: array
                description: >-
                  Trading pairs, e.g. "AAPL-USD", can also use "*" for all
                  symbols
                required: true
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - unsubscribe
                - subscribe
              x-parser-schema-id: <anonymous-schema-4>
            channels:
              type: array
              items:
                type: string
                enum:
                  - level2
                x-parser-schema-id: <anonymous-schema-6>
              x-parser-schema-id: <anonymous-schema-5>
            symbols:
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-8>
              description: Trading pairs, e.g. "AAPL-USD", can also use "*" for all symbols
              x-parser-schema-id: <anonymous-schema-7>
          required:
            - type
            - channels
            - symbols
          examples:
            - type: subscribe
              channels:
                - level2
              symbols:
                - AAPL-USD
          x-parser-schema-id: <anonymous-schema-3>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-2>
          x-parser-schema-id: <anonymous-schema-1>
        title: level2
        description: Subscribe to the order book
        example: |-
          {
            "type": "subscribe",
            "channels": [
              "level2"
            ],
            "symbols": [
              "AAPL-USD"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeOrderBook
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: qfex
  - &ref_26
    id: subscribeTradesStream
    title: Subscribe trades stream
    description: Subscribe to a data stream
    type: receive
    messages:
      - &ref_37
        id: subscribeTrades
        contentType: application/json
        payload:
          - name: trade
            description: Subscribe to public trades
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - unsubscribe
                  - subscribe
                required: true
              - name: channels
                type: array
                required: true
              - name: symbols
                type: array
                description: >-
                  Trading pairs, e.g. "AAPL-USD", can also use "*" for all
                  symbols
                required: true
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - unsubscribe
                - subscribe
              x-parser-schema-id: <anonymous-schema-12>
            channels:
              type: array
              items:
                type: string
                enum:
                  - trade
                x-parser-schema-id: <anonymous-schema-14>
              x-parser-schema-id: <anonymous-schema-13>
            symbols:
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-16>
              description: Trading pairs, e.g. "AAPL-USD", can also use "*" for all symbols
              x-parser-schema-id: <anonymous-schema-15>
          required:
            - type
            - channels
            - symbols
          examples:
            - type: subscribe
              channels:
                - trade
              symbols:
                - AAPL-USD
          x-parser-schema-id: <anonymous-schema-11>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-10>
          x-parser-schema-id: <anonymous-schema-9>
        title: trade
        description: Subscribe to public trades
        example: |-
          {
            "type": "subscribe",
            "channels": [
              "trade"
            ],
            "symbols": [
              "AAPL-USD"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeTrades
    bindings: []
    extensions: *ref_0
  - &ref_27
    id: subscribeBboStream
    title: Subscribe bbo stream
    description: Subscribe to a data stream
    type: receive
    messages:
      - &ref_38
        id: subscribeBbo
        contentType: application/json
        payload:
          - name: bbo
            description: Subscribe to best bid and offer
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - unsubscribe
                  - subscribe
                required: true
              - name: channels
                type: array
                description: bbo
                required: true
              - name: symbols
                type: array
                description: Trading pairs, e.g. "AAPL-USD"
                required: true
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - unsubscribe
                - subscribe
              x-parser-schema-id: <anonymous-schema-30>
            channels:
              type: array
              items:
                type: string
                enum:
                  - bbo
                x-parser-schema-id: <anonymous-schema-32>
              description: bbo
              x-parser-schema-id: <anonymous-schema-31>
            symbols:
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-34>
              description: Trading pairs, e.g. "AAPL-USD"
              x-parser-schema-id: <anonymous-schema-33>
          required:
            - type
            - channels
            - symbols
          examples:
            - type: subscribe
              channels:
                - bbo
              symbols:
                - AAPL-USD
          x-parser-schema-id: <anonymous-schema-29>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-28>
          x-parser-schema-id: <anonymous-schema-27>
        title: bbo
        description: Subscribe to best bid and offer
        example: |-
          {
            "type": "subscribe",
            "channels": [
              "bbo"
            ],
            "symbols": [
              "AAPL-USD"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeBbo
    bindings: []
    extensions: *ref_0
  - &ref_28
    id: subscribeUnderlierStream
    title: Subscribe underlier stream
    description: Subscribe to a data stream
    type: receive
    messages:
      - &ref_39
        id: subscribeUnderlier
        contentType: application/json
        payload:
          - name: underlier
            description: Subscribe to underlier
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - unsubscribe
                  - subscribe
                required: true
              - name: channels
                type: array
                description: underlier
                required: true
              - name: symbols
                type: array
                description: Trading pairs, e.g. "AAPL-USD"
                required: true
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - unsubscribe
                - subscribe
              x-parser-schema-id: <anonymous-schema-38>
            channels:
              type: array
              items:
                type: string
                enum:
                  - underlier
                x-parser-schema-id: <anonymous-schema-40>
              description: underlier
              x-parser-schema-id: <anonymous-schema-39>
            symbols:
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-42>
              description: Trading pairs, e.g. "AAPL-USD"
              x-parser-schema-id: <anonymous-schema-41>
          required:
            - type
            - channels
            - symbols
          examples:
            - type: subscribe
              channels:
                - underlier
              symbols:
                - AAPL-USD
          x-parser-schema-id: <anonymous-schema-37>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-36>
          x-parser-schema-id: <anonymous-schema-35>
        title: underlier
        description: Subscribe to underlier
        example: |-
          {
            "type": "subscribe",
            "channels": [
              "underlier"
            ],
            "symbols": [
              "AAPL-USD"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeUnderlier
    bindings: []
    extensions: *ref_0
  - &ref_29
    id: subscribeMarkPriceStream
    title: Subscribe mark price stream
    description: Subscribe to a data stream
    type: receive
    messages:
      - &ref_40
        id: subscribeMarkPrice
        contentType: application/json
        payload:
          - name: mark_price
            description: Subscribe to mark price
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - unsubscribe
                  - subscribe
                required: true
              - name: channels
                type: array
                description: mark_price
                required: true
              - name: symbols
                type: array
                description: Trading pairs, e.g. "AAPL-USD"
                required: true
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - unsubscribe
                - subscribe
              x-parser-schema-id: <anonymous-schema-46>
            channels:
              type: array
              items:
                type: string
                enum:
                  - mark_price
                x-parser-schema-id: <anonymous-schema-48>
              description: mark_price
              x-parser-schema-id: <anonymous-schema-47>
            symbols:
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-50>
              description: Trading pairs, e.g. "AAPL-USD"
              x-parser-schema-id: <anonymous-schema-49>
          required:
            - type
            - channels
            - symbols
          examples:
            - type: subscribe
              channels:
                - mark_price
              symbols:
                - AAPL-USD
          x-parser-schema-id: <anonymous-schema-45>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-44>
          x-parser-schema-id: <anonymous-schema-43>
        title: mark_price
        description: Subscribe to mark price
        example: |-
          {
            "type": "subscribe",
            "channels": [
              "mark_price"
            ],
            "symbols": [
              "AAPL-USD"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeMarkPrice
    bindings: []
    extensions: *ref_0
  - &ref_30
    id: subscribeFundingRateStream
    title: Subscribe funding rate stream
    description: Subscribe to a data stream
    type: receive
    messages:
      - &ref_41
        id: subscribeFundingRate
        contentType: application/json
        payload:
          - name: funding
            description: Subscribe to funding rate
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - unsubscribe
                  - subscribe
                required: true
              - name: channels
                type: array
                description: funding
                required: true
              - name: symbols
                type: array
                description: Trading pairs, e.g. "AAPL-USD"
                required: true
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - unsubscribe
                - subscribe
              x-parser-schema-id: <anonymous-schema-54>
            channels:
              type: array
              items:
                type: string
                enum:
                  - funding
                x-parser-schema-id: <anonymous-schema-56>
              description: funding
              x-parser-schema-id: <anonymous-schema-55>
            symbols:
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-58>
              description: Trading pairs, e.g. "AAPL-USD"
              x-parser-schema-id: <anonymous-schema-57>
          required:
            - type
            - channels
            - symbols
          examples:
            - type: subscribe
              channels:
                - funding
              symbols:
                - AAPL-USD
          x-parser-schema-id: <anonymous-schema-53>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-52>
          x-parser-schema-id: <anonymous-schema-51>
        title: funding
        description: Subscribe to funding rate
        example: |-
          {
            "type": "subscribe",
            "channels": [
              "funding"
            ],
            "symbols": [
              "AAPL-USD"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeFundingRate
    bindings: []
    extensions: *ref_0
  - &ref_31
    id: subscribeCandlesStream
    title: Subscribe candles stream
    description: Subscribe to a data stream
    type: receive
    messages:
      - &ref_42
        id: subscribeCandles
        contentType: application/json
        payload:
          - name: candle
            description: Subscribe to candles
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - unsubscribe
                  - subscribe
                required: true
              - name: channels
                type: array
                description: candle
                required: true
              - name: symbols
                type: array
                description: Symbol/Interval, e.g. "AAPL-USD/1MIN"
                required: true
              - name: intervals
                type: array
                description: Candle intervals, e.g. "1MIN"
                required: true
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - unsubscribe
                - subscribe
              x-parser-schema-id: <anonymous-schema-20>
            channels:
              type: array
              items:
                type: string
                enum:
                  - candle
                x-parser-schema-id: <anonymous-schema-22>
              description: candle
              x-parser-schema-id: <anonymous-schema-21>
            symbols:
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-24>
              description: Symbol/Interval, e.g. "AAPL-USD/1MIN"
              x-parser-schema-id: <anonymous-schema-23>
            intervals:
              type: array
              items:
                type: string
                enum:
                  - 1MIN
                  - 5MINS
                  - 15MINS
                  - 1HOUR
                  - 4HOURS
                  - 1DAY
                x-parser-schema-id: <anonymous-schema-26>
              description: Candle intervals, e.g. "1MIN"
              x-parser-schema-id: <anonymous-schema-25>
          required:
            - type
            - channels
            - symbols
            - intervals
          examples:
            - type: subscribe
              channels:
                - candle
              symbols:
                - AAPL-USD
              intervals:
                - 1MIN
          x-parser-schema-id: <anonymous-schema-19>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-18>
          x-parser-schema-id: <anonymous-schema-17>
        title: candle
        description: Subscribe to candles
        example: |-
          {
            "type": "subscribe",
            "channels": [
              "candle"
            ],
            "symbols": [
              "AAPL-USD"
            ],
            "intervals": [
              "1MIN"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeCandles
    bindings: []
    extensions: *ref_0
  - &ref_32
    id: subscribeOpenInterestStream
    title: Subscribe open interest stream
    description: Subscribe to a data stream
    type: receive
    messages:
      - &ref_43
        id: subscribeOpenInterest
        contentType: application/json
        payload:
          - name: open_interest
            description: Subscribe to open interest
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - unsubscribe
                  - subscribe
                required: true
              - name: channels
                type: array
                description: open_interest
                required: true
              - name: symbols
                type: array
                description: Trading pairs, e.g. "AAPL-USD"
                required: true
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - unsubscribe
                - subscribe
              x-parser-schema-id: <anonymous-schema-62>
            channels:
              type: array
              items:
                type: string
                enum:
                  - open_interest
                x-parser-schema-id: <anonymous-schema-64>
              description: open_interest
              x-parser-schema-id: <anonymous-schema-63>
            symbols:
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-66>
              description: Trading pairs, e.g. "AAPL-USD"
              x-parser-schema-id: <anonymous-schema-65>
          required:
            - type
            - channels
            - symbols
          examples:
            - type: subscribe
              channels:
                - open_interest
              symbols:
                - AAPL-USD
          x-parser-schema-id: <anonymous-schema-61>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-60>
          x-parser-schema-id: <anonymous-schema-59>
        title: open_interest
        description: Subscribe to open interest
        example: |-
          {
            "type": "subscribe",
            "channels": [
              "open_interest"
            ],
            "symbols": [
              "AAPL-USD"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeOpenInterest
    bindings: []
    extensions: *ref_0
  - &ref_33
    id: subscribeMinmaxPriceStream
    title: Subscribe minmax price stream
    description: Subscribe to a data stream
    type: receive
    messages:
      - &ref_44
        id: subscribeMinmaxPrice
        contentType: application/json
        payload:
          - name: minmax_price
            description: Subscribe to minmax price
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - unsubscribe
                  - subscribe
                required: true
              - name: channels
                type: array
                description: minmax_price
                required: true
              - name: symbols
                type: array
                description: Trading pairs, e.g. "AAPL-USD"
                required: true
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - unsubscribe
                - subscribe
              x-parser-schema-id: <anonymous-schema-70>
            channels:
              type: array
              items:
                type: string
                enum:
                  - minmax_price
                x-parser-schema-id: <anonymous-schema-72>
              description: minmax_price
              x-parser-schema-id: <anonymous-schema-71>
            symbols:
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-74>
              description: Trading pairs, e.g. "AAPL-USD"
              x-parser-schema-id: <anonymous-schema-73>
          required:
            - type
            - channels
            - symbols
          examples:
            - type: subscribe
              channels:
                - minmax_price
              symbols:
                - AAPL-USD
          x-parser-schema-id: <anonymous-schema-69>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-68>
          x-parser-schema-id: <anonymous-schema-67>
        title: minmax_price
        description: Subscribe to minmax price
        example: |-
          {
            "type": "subscribe",
            "channels": [
              "minmax_price"
            ],
            "symbols": [
              "AAPL-USD"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeMinmaxPrice
    bindings: []
    extensions: *ref_0
  - &ref_34
    id: subscribeMarketStatsStream
    title: Subscribe market stats stream
    description: Subscribe to consolidated market statistics
    type: receive
    messages:
      - &ref_45
        id: subscribeMarketStats
        contentType: application/json
        payload:
          - name: market_stats
            description: Subscribe to consolidated market statistics
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - unsubscribe
                  - subscribe
                required: true
              - name: channels
                type: array
                description: market_stats
                required: true
              - name: symbols
                type: array
                description: >-
                  Trading pairs, e.g. "AAPL-USD", can also use "*" for all
                  symbols
                required: true
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - unsubscribe
                - subscribe
              x-parser-schema-id: <anonymous-schema-78>
            channels:
              type: array
              items:
                type: string
                enum:
                  - market_stats
                x-parser-schema-id: <anonymous-schema-80>
              description: market_stats
              x-parser-schema-id: <anonymous-schema-79>
            symbols:
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-82>
              description: Trading pairs, e.g. "AAPL-USD", can also use "*" for all symbols
              x-parser-schema-id: <anonymous-schema-81>
          required:
            - type
            - channels
            - symbols
          examples:
            - type: subscribe
              channels:
                - market_stats
              symbols:
                - '*'
          x-parser-schema-id: <anonymous-schema-77>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-76>
          x-parser-schema-id: <anonymous-schema-75>
        title: market_stats
        description: Subscribe to consolidated market statistics
        example: |-
          {
            "type": "subscribe",
            "channels": [
              "market_stats"
            ],
            "symbols": [
              "*"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeMarketStats
    bindings: []
    extensions: *ref_0
  - &ref_35
    id: receiveUpdates
    title: Receive updates
    description: Receive all update messages and events
    type: send
    messages:
      - &ref_46
        id: orderBookUpdate
        contentType: application/json
        payload:
          - examples: &ref_1
              - type: level2
                symbol: AAPL-USD
                time: '2025-08-20T09:26:36.861195808Z'
                bid:
                  - - '564.1'
                    - '0.1'
                  - - '560.3'
                    - '0.001'
                ask:
                  - - '566.2'
                    - '2.118'
                  - - '566.3'
                    - '2.119'
                sig_figs: 2
            allOf: &ref_2
              - &ref_3
                type: object
                properties:
                  type:
                    type: string
                    x-parser-schema-id: <anonymous-schema-86>
                  connection_id:
                    type: string
                    x-parser-schema-id: <anonymous-schema-87>
                  message_id:
                    type: integer
                    x-parser-schema-id: <anonymous-schema-88>
                  channel:
                    type: string
                    x-parser-schema-id: <anonymous-schema-89>
                  id:
                    type: string
                    x-parser-schema-id: <anonymous-schema-90>
                required:
                  - type
                  - connection_id
                  - message_id
                x-parser-schema-id: MessageEnvelope
              - type: object
                properties:
                  contents:
                    type: array
                    items:
                      type: object
                      properties:
                        time:
                          type: string
                          format: date-time
                          x-parser-schema-id: <anonymous-schema-93>
                        symbol:
                          type: string
                          x-parser-schema-id: <anonymous-schema-94>
                        bid:
                          type: array
                          items:
                            type: array
                            items:
                              type: string
                              x-parser-schema-id: <anonymous-schema-97>
                            minItems: 2
                            maxItems: 2
                            x-parser-schema-id: <anonymous-schema-96>
                          x-parser-schema-id: <anonymous-schema-95>
                        ask:
                          type: array
                          items:
                            type: array
                            items:
                              type: string
                              x-parser-schema-id: <anonymous-schema-100>
                            minItems: 2
                            maxItems: 2
                            x-parser-schema-id: <anonymous-schema-99>
                          x-parser-schema-id: <anonymous-schema-98>
                        sig_figs:
                          type: integer
                          x-parser-schema-id: <anonymous-schema-101>
                      x-parser-schema-id: OrderBookPayload
                    x-parser-schema-id: <anonymous-schema-92>
                x-parser-schema-id: <anonymous-schema-91>
            x-parser-schema-id: <anonymous-schema-85>
            name: level2
            description: Changes in the L2 order book
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          examples: *ref_1
          allOf: *ref_2
          x-parser-schema-id: <anonymous-schema-85>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-84>
          x-parser-schema-id: <anonymous-schema-83>
        title: level2
        description: Changes in the L2 order book
        example: |-
          {
            "type": "level2",
            "symbol": "AAPL-USD",
            "time": "2025-08-20T09:26:36.861195808Z",
            "bid": [
              [
                "564.1",
                "0.1"
              ],
              [
                "560.3",
                "0.001"
              ]
            ],
            "ask": [
              [
                "566.2",
                "2.118"
              ],
              [
                "566.3",
                "2.119"
              ]
            ],
            "sig_figs": 2
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: orderBookUpdate
      - &ref_47
        id: tradeUpdate
        contentType: application/json
        payload:
          - examples: &ref_4
              - type: trade
                trade_id: ab59768f-f81e-4535-80c0-7b35f6709704
                time: '2025-08-20T09:26:36.861195808Z'
                symbol: PLTR-USD
                size: '0.100000'
                price: '157.025000'
                side: SELL
                execution_type: T
            allOf: &ref_5
              - *ref_3
              - type: object
                properties:
                  contents:
                    type: array
                    items:
                      type: object
                      properties:
                        trade_id:
                          type: string
                          x-parser-schema-id: <anonymous-schema-107>
                        time:
                          type: string
                          format: date-time
                          x-parser-schema-id: <anonymous-schema-108>
                        symbol:
                          type: string
                          x-parser-schema-id: <anonymous-schema-109>
                        size:
                          type: string
                          x-parser-schema-id: <anonymous-schema-110>
                        price:
                          type: string
                          x-parser-schema-id: <anonymous-schema-111>
                        side:
                          type: string
                          x-parser-schema-id: <anonymous-schema-112>
                        execution_type:
                          type: string
                          x-parser-schema-id: <anonymous-schema-113>
                      x-parser-schema-id: TradePayload
                    x-parser-schema-id: <anonymous-schema-106>
                x-parser-schema-id: <anonymous-schema-105>
            x-parser-schema-id: <anonymous-schema-104>
            name: trades
            description: Public trades
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          examples: *ref_4
          allOf: *ref_5
          x-parser-schema-id: <anonymous-schema-104>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-103>
          x-parser-schema-id: <anonymous-schema-102>
        title: trades
        description: Public trades
        example: |-
          {
            "type": "trade",
            "trade_id": "ab59768f-f81e-4535-80c0-7b35f6709704",
            "time": "2025-08-20T09:26:36.861195808Z",
            "symbol": "PLTR-USD",
            "size": "0.100000",
            "price": "157.025000",
            "side": "SELL",
            "execution_type": "T"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: tradeUpdate
      - &ref_48
        id: candleUpdate
        contentType: application/json
        payload:
          - examples: &ref_6
              - type: candle
                symbol: PLTR-USD
                start: '2025-08-20T09:27:00Z'
                resolution: 1MIN
                low: '155.700000'
                high: '157.225000'
                open: '156.475000'
                close: '156.900000'
                usdVolume: 16700
                trades: 16
            allOf: &ref_7
              - *ref_3
              - type: object
                properties:
                  contents:
                    type: array
                    items:
                      type: object
                      properties:
                        start:
                          type: string
                          format: date-time
                          x-parser-schema-id: <anonymous-schema-119>
                        symbol:
                          type: string
                          x-parser-schema-id: <anonymous-schema-120>
                        resolution:
                          type: string
                          x-parser-schema-id: <anonymous-schema-121>
                        open:
                          type: string
                          x-parser-schema-id: <anonymous-schema-122>
                        high:
                          type: string
                          x-parser-schema-id: <anonymous-schema-123>
                        low:
                          type: string
                          x-parser-schema-id: <anonymous-schema-124>
                        close:
                          type: string
                          x-parser-schema-id: <anonymous-schema-125>
                        usdVolume:
                          type: integer
                          x-parser-schema-id: <anonymous-schema-126>
                        trades:
                          type: integer
                          x-parser-schema-id: <anonymous-schema-127>
                      x-parser-schema-id: CandlePayload
                    x-parser-schema-id: <anonymous-schema-118>
                x-parser-schema-id: <anonymous-schema-117>
            x-parser-schema-id: <anonymous-schema-116>
            name: candle
            description: Candle updates over various intervals
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          examples: *ref_6
          allOf: *ref_7
          x-parser-schema-id: <anonymous-schema-116>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-115>
          x-parser-schema-id: <anonymous-schema-114>
        title: candle
        description: Candle updates over various intervals
        example: |-
          {
            "type": "candle",
            "symbol": "PLTR-USD",
            "start": "2025-08-20T09:27:00Z",
            "resolution": "1MIN",
            "low": "155.700000",
            "high": "157.225000",
            "open": "156.475000",
            "close": "156.900000",
            "usdVolume": 16700,
            "trades": 16
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: candleUpdate
      - &ref_49
        id: bboUpdate
        contentType: application/json
        payload:
          - examples: &ref_8
              - type: bbo
                symbol: AAPL-USD
                time: '2025-08-20T09:26:36.861195808Z'
                bid:
                  - - '564.1'
                    - '2.126'
                ask:
                  - - '566.2'
                    - '2.118'
            allOf: &ref_9
              - *ref_3
              - type: object
                properties:
                  contents:
                    type: array
                    items: &ref_20
                      type: object
                      properties:
                        time:
                          type: string
                          format: date-time
                          x-parser-schema-id: <anonymous-schema-133>
                        symbol:
                          type: string
                          x-parser-schema-id: <anonymous-schema-134>
                        bid:
                          type: array
                          items:
                            type: array
                            items:
                              type: string
                              x-parser-schema-id: <anonymous-schema-137>
                            minItems: 2
                            maxItems: 2
                            x-parser-schema-id: <anonymous-schema-136>
                          x-parser-schema-id: <anonymous-schema-135>
                        ask:
                          type: array
                          items:
                            type: array
                            items:
                              type: string
                              x-parser-schema-id: <anonymous-schema-140>
                            minItems: 2
                            maxItems: 2
                            x-parser-schema-id: <anonymous-schema-139>
                          x-parser-schema-id: <anonymous-schema-138>
                      x-parser-schema-id: BboPayload
                    x-parser-schema-id: <anonymous-schema-132>
                x-parser-schema-id: <anonymous-schema-131>
            x-parser-schema-id: <anonymous-schema-130>
            name: bbo
            description: Best bid and offer updates
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          examples: *ref_8
          allOf: *ref_9
          x-parser-schema-id: <anonymous-schema-130>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-129>
          x-parser-schema-id: <anonymous-schema-128>
        title: bbo
        description: Best bid and offer updates
        example: |-
          {
            "type": "bbo",
            "symbol": "AAPL-USD",
            "time": "2025-08-20T09:26:36.861195808Z",
            "bid": [
              [
                "564.1",
                "2.126"
              ]
            ],
            "ask": [
              [
                "566.2",
                "2.118"
              ]
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: bboUpdate
      - &ref_50
        id: underlierUpdate
        contentType: application/json
        payload:
          - examples: &ref_10
              - type: underlier
                symbol: AAPL-USD
                price: '437.45'
                time: '2025-05-08T20:52:48.000Z'
                source: external
            allOf: &ref_11
              - *ref_3
              - type: object
                properties:
                  contents:
                    type: array
                    items:
                      type: object
                      properties:
                        time:
                          type: string
                          format: date-time
                          x-parser-schema-id: <anonymous-schema-146>
                        symbol:
                          type: string
                          x-parser-schema-id: <anonymous-schema-147>
                        price:
                          type: string
                          x-parser-schema-id: <anonymous-schema-148>
                        source:
                          type: string
                          enum:
                            - internal
                            - external
                          x-parser-schema-id: <anonymous-schema-149>
                      x-parser-schema-id: UnderlierPayload
                    x-parser-schema-id: <anonymous-schema-145>
                x-parser-schema-id: <anonymous-schema-144>
            x-parser-schema-id: <anonymous-schema-143>
            name: underlier
            description: Underlier updates
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          examples: *ref_10
          allOf: *ref_11
          x-parser-schema-id: <anonymous-schema-143>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-142>
          x-parser-schema-id: <anonymous-schema-141>
        title: underlier
        description: Underlier updates
        example: |-
          {
            "type": "underlier",
            "symbol": "AAPL-USD",
            "price": "437.45",
            "time": "2025-05-08T20:52:48.000Z",
            "source": "external"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: underlierUpdate
      - &ref_51
        id: markPriceUpdate
        contentType: application/json
        payload:
          - examples: &ref_12
              - type: mark_price
                symbol: AAPL-USD
                price: '437.45'
                time: '2025-05-08T20:52:48.000Z'
            allOf: &ref_13
              - *ref_3
              - type: object
                properties:
                  contents:
                    type: array
                    items: &ref_21
                      type: object
                      properties:
                        time:
                          type: string
                          format: date-time
                          x-parser-schema-id: <anonymous-schema-155>
                        symbol:
                          type: string
                          x-parser-schema-id: <anonymous-schema-156>
                        price:
                          type: string
                          x-parser-schema-id: <anonymous-schema-157>
                      x-parser-schema-id: MarkPricePayload
                    x-parser-schema-id: <anonymous-schema-154>
                x-parser-schema-id: <anonymous-schema-153>
            x-parser-schema-id: <anonymous-schema-152>
            name: mark_price
            description: Mark price updates
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          examples: *ref_12
          allOf: *ref_13
          x-parser-schema-id: <anonymous-schema-152>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-151>
          x-parser-schema-id: <anonymous-schema-150>
        title: mark_price
        description: Mark price updates
        example: |-
          {
            "type": "mark_price",
            "symbol": "AAPL-USD",
            "price": "437.45",
            "time": "2025-05-08T20:52:48.000Z"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: markPriceUpdate
      - &ref_52
        id: fundingRateUpdate
        contentType: application/json
        payload:
          - examples: &ref_14
              - type: funding
                symbol: AAPL-USD
                funding_rate: '0.21'
                time_remaining: 32 //in seconds
                time: '2025-05-08T20:52:48.000Z'
            allOf: &ref_15
              - *ref_3
              - type: object
                properties:
                  contents:
                    type: array
                    items:
                      type: object
                      properties:
                        time:
                          type: string
                          format: date-time
                          x-parser-schema-id: <anonymous-schema-163>
                        symbol:
                          type: string
                          x-parser-schema-id: <anonymous-schema-164>
                        funding_rate:
                          type: string
                          x-parser-schema-id: <anonymous-schema-165>
                        time_remaining:
                          type: integer
                          x-parser-schema-id: <anonymous-schema-166>
                      x-parser-schema-id: FundingRatePayload
                    x-parser-schema-id: <anonymous-schema-162>
                x-parser-schema-id: <anonymous-schema-161>
            x-parser-schema-id: <anonymous-schema-160>
            name: funding
            description: Funding rate updates
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          examples: *ref_14
          allOf: *ref_15
          x-parser-schema-id: <anonymous-schema-160>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-159>
          x-parser-schema-id: <anonymous-schema-158>
        title: funding
        description: Funding rate updates
        example: |-
          {
            "type": "funding",
            "symbol": "AAPL-USD",
            "funding_rate": "0.21",
            "time_remaining": "32 //in seconds",
            "time": "2025-05-08T20:52:48.000Z"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: fundingRateUpdate
      - &ref_53
        id: openInterestUpdate
        contentType: application/json
        payload:
          - examples: &ref_16
              - type: open_interest
                symbol: AAPL-USD
                open_interest: '1000000'
                time: '2025-05-08T20:52:48.000Z'
            allOf: &ref_17
              - *ref_3
              - type: object
                properties:
                  contents:
                    type: array
                    items: &ref_22
                      type: object
                      properties:
                        time:
                          type: string
                          format: date-time
                          x-parser-schema-id: <anonymous-schema-172>
                        symbol:
                          type: string
                          x-parser-schema-id: <anonymous-schema-173>
                        open_interest:
                          type: string
                          x-parser-schema-id: <anonymous-schema-174>
                      x-parser-schema-id: OpenInterestPayload
                    x-parser-schema-id: <anonymous-schema-171>
                x-parser-schema-id: <anonymous-schema-170>
            x-parser-schema-id: <anonymous-schema-169>
            name: open_interest
            description: Open Interest updates
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          examples: *ref_16
          allOf: *ref_17
          x-parser-schema-id: <anonymous-schema-169>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-168>
          x-parser-schema-id: <anonymous-schema-167>
        title: open_interest
        description: Open Interest updates
        example: |-
          {
            "type": "open_interest",
            "symbol": "AAPL-USD",
            "open_interest": "1000000",
            "time": "2025-05-08T20:52:48.000Z"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: openInterestUpdate
      - &ref_54
        id: minmaxPriceUpdate
        contentType: application/json
        payload:
          - examples: &ref_18
              - type: minmax_price
                symbol: AAPL-USD
                min_price: '400.00'
                max_price: '450.00'
                time: '2025-05-08T20:52:48.000Z'
            allOf: &ref_19
              - *ref_3
              - type: object
                properties:
                  contents:
                    type: array
                    items:
                      type: object
                      properties:
                        time:
                          type: string
                          format: date-time
                          x-parser-schema-id: <anonymous-schema-180>
                        symbol:
                          type: string
                          x-parser-schema-id: <anonymous-schema-181>
                        min_price:
                          type: string
                          x-parser-schema-id: <anonymous-schema-182>
                        max_price:
                          type: string
                          x-parser-schema-id: <anonymous-schema-183>
                      x-parser-schema-id: MinmaxPricePayload
                    x-parser-schema-id: <anonymous-schema-179>
                x-parser-schema-id: <anonymous-schema-178>
            x-parser-schema-id: <anonymous-schema-177>
            name: minmax_price
            description: Minmax Price updates
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          examples: *ref_18
          allOf: *ref_19
          x-parser-schema-id: <anonymous-schema-177>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-176>
          x-parser-schema-id: <anonymous-schema-175>
        title: minmax_price
        description: Minmax Price updates
        example: |-
          {
            "type": "minmax_price",
            "symbol": "AAPL-USD",
            "min_price": "400.00",
            "max_price": "450.00",
            "time": "2025-05-08T20:52:48.000Z"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: minmaxPriceUpdate
      - &ref_55
        id: marketStatsUpdate
        contentType: application/json
        payload:
          - examples: &ref_23
              - type: market_stats
                sequence: 30272540
                time: '2025-09-04T09:26:40Z'
                symbol: '*'
                bbos:
                  - time: '2025-09-04T09:26:39.545268322Z'
                    symbol: AAPL-USD
                    bid:
                      - - '10101.1'
                        - '0.4505414'
                    ask:
                      - - '10102.55'
                        - '0.57753524'
                mark_prices:
                  - time: '2025-09-04T09:26:39.545268322Z'
                    symbol: AAPL-USD
                    price: '10102'
                open_interests:
                  - time: '2025-09-04T09:26:39.545268322Z'
                    symbol: AAPL-USD
                    open_interest: '12.5'
                daily_volumes:
                  - symbol: AAPL-USD
                    volume: '12.5'
            allOf: &ref_24
              - *ref_3
              - type: object
                properties:
                  contents:
                    type: array
                    items:
                      type: object
                      properties:
                        time:
                          type: string
                          format: date-time
                          x-parser-schema-id: <anonymous-schema-189>
                        symbol:
                          type: string
                          description: Requested symbol or "*" for wildcard subscriptions
                          x-parser-schema-id: <anonymous-schema-190>
                        bbos:
                          type: array
                          items: *ref_20
                          x-parser-schema-id: <anonymous-schema-191>
                        mark_prices:
                          type: array
                          items: *ref_21
                          x-parser-schema-id: <anonymous-schema-192>
                        open_interests:
                          type: array
                          items: *ref_22
                          x-parser-schema-id: <anonymous-schema-193>
                        daily_volumes:
                          type: array
                          items:
                            type: object
                            properties:
                              symbol:
                                type: string
                                x-parser-schema-id: <anonymous-schema-195>
                              volume:
                                type: string
                                x-parser-schema-id: <anonymous-schema-196>
                            x-parser-schema-id: DailyVolumePayload
                          x-parser-schema-id: <anonymous-schema-194>
                      x-parser-schema-id: MarketStatsPayload
                    x-parser-schema-id: <anonymous-schema-188>
                x-parser-schema-id: <anonymous-schema-187>
            x-parser-schema-id: <anonymous-schema-186>
            name: market_stats
            description: Consolidated market statistics updates
        headers:
          - name: headers
            type: object
            properties:
              - name: x-qfex-client
                type: string
                description: Client identifier
                required: false
        jsonPayloadSchema:
          examples: *ref_23
          allOf: *ref_24
          x-parser-schema-id: <anonymous-schema-186>
        jsonHeadersSchema:
          type: object
          properties:
            x-qfex-client:
              type: string
              description: Client identifier
              x-parser-schema-id: <anonymous-schema-185>
          x-parser-schema-id: <anonymous-schema-184>
        title: market_stats
        description: Consolidated market statistics updates
        example: |-
          {
            "type": "market_stats",
            "sequence": 30272540,
            "time": "2025-09-04T09:26:40Z",
            "symbol": "*",
            "bbos": [
              {
                "time": "2025-09-04T09:26:39.545268322Z",
                "symbol": "AAPL-USD",
                "bid": [
                  [
                    "10101.1",
                    "0.4505414"
                  ]
                ],
                "ask": [
                  [
                    "10102.55",
                    "0.57753524"
                  ]
                ]
              }
            ],
            "mark_prices": [
              {
                "time": "2025-09-04T09:26:39.545268322Z",
                "symbol": "AAPL-USD",
                "price": "10102"
              }
            ],
            "open_interests": [
              {
                "time": "2025-09-04T09:26:39.545268322Z",
                "symbol": "AAPL-USD",
                "open_interest": "12.5"
              }
            ],
            "daily_volumes": [
              {
                "symbol": "AAPL-USD",
                "volume": "12.5"
              }
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: marketStatsUpdate
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_25
  - *ref_26
  - *ref_27
  - *ref_28
  - *ref_29
  - *ref_30
  - *ref_31
  - *ref_32
  - *ref_33
  - *ref_34
receiveOperations:
  - *ref_35
sendMessages:
  - *ref_36
  - *ref_37
  - *ref_38
  - *ref_39
  - *ref_40
  - *ref_41
  - *ref_42
  - *ref_43
  - *ref_44
  - *ref_45
receiveMessages:
  - *ref_46
  - *ref_47
  - *ref_48
  - *ref_49
  - *ref_50
  - *ref_51
  - *ref_52
  - *ref_53
  - *ref_54
  - *ref_55
extensions:
  - id: x-parser-unique-object-id
    value: qfex
securitySchemes: []

````