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

# Websocket marketdata

## Quickstart

### 1. Get a token

```bash theme={null}
curl -s -X POST https://gateway.sandbox.architect.exchange/api/authenticate \
  -H "Content-Type: application/json" \
  -d '{"api_key":"YOUR_KEY","api_secret":"YOUR_SECRET","expiration_seconds":3600}'
# Response: {"token":"<bearer-token>"}
```

### 2. Connect to the WebSocket

Pass the token as an `Authorization` header on the WebSocket upgrade request. Invalid or missing tokens are rejected with HTTP 401 before the connection is established.

<CodeGroup>
  ```bash wscat theme={null}
  # Store the token
  TOKEN=$(curl -s -X POST https://gateway.sandbox.architect.exchange/api/authenticate \
    -H "Content-Type: application/json" \
    -d '{"api_key":"YOUR_KEY","api_secret":"YOUR_SECRET","expiration_seconds":3600}' \
    | python3 -c "import sys,json; print(json.load(sys.stdin)['token'])")

  # Connect
  wscat -c wss://gateway.sandbox.architect.exchange/md/ws \
    -H "Authorization: Bearer $TOKEN"
  ```

  ```bash websocat theme={null}
  # Store the token
  TOKEN=$(curl -s -X POST https://gateway.sandbox.architect.exchange/api/authenticate \
    -H "Content-Type: application/json" \
    -d '{"api_key":"YOUR_KEY","api_secret":"YOUR_SECRET","expiration_seconds":3600}' \
    | python3 -c "import sys,json; print(json.load(sys.stdin)['token'])")

  # Connect
  websocat -H="Authorization: Bearer $TOKEN" \
    wss://gateway.sandbox.architect.exchange/md/ws
  ```
</CodeGroup>

Replace `gateway.sandbox.architect.exchange` with `gateway.architect.exchange` for production.

### 3. Subscribe

Once connected, send a subscribe message to start receiving market data:

```json theme={null}
{"rid":1,"type":"subscribe","symbol":"XAU-PERP","level":"LEVEL_2"}
```

Subscribe to trades only — no order book or ticker — with `level: "TRADES"`:

```json theme={null}
{"rid":2,"type":"subscribe","symbol":"XAU-PERP","level":"TRADES"}
```

For a book-level subscription, the optional `trades` and `ticker` fields (both
default `true`) independently suppress trade or ticker delivery. For example, a
book-only feed (no trades, no ticker):

```json theme={null}
{"rid":3,"type":"subscribe","symbol":"XAU-PERP","level":"LEVEL_2","trades":false,"ticker":false}
```

Subscribe to candles for a symbol and interval:

```json theme={null}
{"rid":4,"type":"subscribe_candles","symbol":"XAU-PERP","width":"1m"}
```

After a successful `subscribe` at a book level (`LEVEL_1`/`LEVEL_2`/`LEVEL_3`), you receive:

* Ticker updates (`t = "s"`) — unless `ticker: false`
* Trade updates (`t = "t"`) — unless `trades: false`
* Order book updates matching your selected `level`:
  * `LEVEL_1` -> `t = "1"`
  * `LEVEL_2` -> `t = "2"`
  * `LEVEL_3` -> `t = "3"`

After a successful `subscribe` at `level: "TRADES"`, you receive only trade updates (`t = "t"`) — no ticker or order book events. The `trades` and `ticker` fields have no effect on a `TRADES` subscription.

After a successful `subscribe_candles`, you receive candle updates (`t = "c"`).

## Details

### Request ID (`rid`)

* `rid` is used to correlate request/response pairs.
* Server acknowledgements and request errors include the same `rid` as your request.
* Market data events do not include `rid`.

### Symbol fields in events

* Ticker, trade, and order book events use `s` for symbol.
* Candle events use `symbol`.

### Estimated funding rate

* Ticker events (`t = "s"`) carry an optional `ef` object with the live estimated funding rate, present only for symbols that have a live index feed configured (e.g. WTI-PERP).
* `ef.status` is one of `ready`, `settlement_pending`, or `unavailable`:
  * `ready` — a current estimate is available. All numeric fields (`funding_rate`, `funding_amount`, `benchmark_price`, `settlement_price`) are populated and `ef.reason` is absent.
  * `settlement_pending` — funding settlement is in progress for the symbol, so the live estimate is temporarily suppressed. The numeric fields are null and `ef.reason` indicates a settlement is pending.
  * `unavailable` — no current estimate can be produced. The numeric fields are null and `ef.reason` explains why — for example the index or mark price data needed for the estimate is not yet available, is insufficient, or is too stale, or no estimate has been published for the symbol yet.
* When no estimate applies to a symbol, the `ef` field is omitted entirely.

```json theme={null}
{
  "t": "s",
  "ts": 1609459200,
  "tn": 123456789,
  "s": "WTI-PERP",
  "ef": {
    "symbol": "WTI-PERP",
    "status": "ready",
    "funding_rate": "0.00012",
    "funding_amount": "6.00",
    "benchmark_price": "50005.00",
    "settlement_price": "50010.00",
    "timestamp": "2021-01-01T00:00:00Z"
  }
}
```

### Heartbeat events

* The server emits heartbeat events (`t = "h"`):

```json theme={null}
{
  "t": "h",
  "ts": 1609459200,
  "tn": 123456789
}
```

Use heartbeat and market data flow to monitor connection health.


## AsyncAPI

````yaml openapi/asyncapi-marketdata-publisher.bundled.json marketdata
id: marketdata
title: Marketdata
description: ''
servers:
  - id: production
    protocol: wss
    host: gateway.sandbox.architect.exchange
    bindings: []
    variables: []
address: /md/ws
parameters: []
bindings: []
operations:
  - &ref_1
    id: clientRequest
    title: Client request
    type: receive
    messages:
      - &ref_4
        id: subscribeRequest
        contentType: application/json
        payload:
          - name: Subscribe Request
            description: Subscribe to market data for a symbol
            type: object
            properties:
              - name: rid
                type: integer
                description: Request ID for correlating response
                required: true
              - name: type
                type: string
                description: Request type
                required: true
              - name: symbol
                type: string
                description: Instrument symbol (e.g. XAU-PERP, XAG-PERP)
                required: true
              - name: level
                type: string
                description: >-
                  Orderbook depth level. LEVEL_1/LEVEL_2/LEVEL_3 deliver order
                  book updates, ticker, and trades; TRADES delivers only trade
                  prints.
                enumValues:
                  - LEVEL_1
                  - LEVEL_2
                  - LEVEL_3
                  - TRADES
                required: true
              - name: trades
                type: boolean
                description: >-
                  For a book level, whether to deliver trade prints. Set false
                  for a book-only feed. No effect on a TRADES subscription.
                required: false
              - name: ticker
                type: boolean
                description: >-
                  For a book level, whether to deliver periodic ticker updates.
                  Set false to receive book (and trades) without the ticker. No
                  effect on a TRADES subscription.
                required: false
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            required:
              - rid
              - type
              - symbol
              - level
            properties:
              rid:
                type: integer
                description: Request ID for correlating response
                x-parser-schema-id: <anonymous-schema-2>
              type:
                type: string
                const: subscribe
                description: Request type
                x-parser-schema-id: <anonymous-schema-3>
              symbol:
                type: string
                description: Instrument symbol (e.g. XAU-PERP, XAG-PERP)
                x-parser-schema-id: <anonymous-schema-4>
              level:
                type: string
                enum:
                  - LEVEL_1
                  - LEVEL_2
                  - LEVEL_3
                  - TRADES
                description: >-
                  Orderbook depth level. LEVEL_1/LEVEL_2/LEVEL_3 deliver order
                  book updates, ticker, and trades; TRADES delivers only trade
                  prints.
                x-parser-schema-id: <anonymous-schema-5>
              trades:
                type: boolean
                default: true
                description: >-
                  For a book level, whether to deliver trade prints. Set false
                  for a book-only feed. No effect on a TRADES subscription.
                x-parser-schema-id: <anonymous-schema-6>
              ticker:
                type: boolean
                default: true
                description: >-
                  For a book level, whether to deliver periodic ticker updates.
                  Set false to receive book (and trades) without the ticker. No
                  effect on a TRADES subscription.
                x-parser-schema-id: <anonymous-schema-7>
            x-parser-schema-id: <anonymous-schema-1>
        title: Subscribe Request
        description: Subscribe to market data for a symbol
        example: |-
          {
            "rid": 2,
            "type": "subscribe",
            "symbol": "XAU-PERP",
            "level": "LEVEL_2"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeRequest
      - &ref_5
        id: unsubscribeRequest
        contentType: application/json
        payload:
          - name: Unsubscribe Request
            description: Unsubscribe from market data for a symbol
            type: object
            properties:
              - name: rid
                type: integer
                description: Request ID for correlating response
                required: true
              - name: type
                type: string
                description: Request type
                required: true
              - name: symbol
                type: string
                description: Instrument symbol to unsubscribe from
                required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            required:
              - rid
              - type
              - symbol
            properties:
              rid:
                type: integer
                description: Request ID for correlating response
                x-parser-schema-id: <anonymous-schema-9>
              type:
                type: string
                const: unsubscribe
                description: Request type
                x-parser-schema-id: <anonymous-schema-10>
              symbol:
                type: string
                description: Instrument symbol to unsubscribe from
                x-parser-schema-id: <anonymous-schema-11>
            x-parser-schema-id: <anonymous-schema-8>
        title: Unsubscribe Request
        description: Unsubscribe from market data for a symbol
        example: |-
          {
            "rid": 3,
            "type": "unsubscribe",
            "symbol": "XAU-PERP"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: unsubscribeRequest
      - &ref_6
        id: subscribeCandleRequest
        contentType: application/json
        payload:
          - name: Subscribe Candle Request
            description: Subscribe to candle updates on a symbol and width
            type: object
            properties:
              - name: rid
                type: integer
                description: Request ID for correlating response
                required: true
              - name: type
                type: string
                description: Request type
                required: true
              - name: symbol
                type: string
                description: Instrument symbol (e.g. XAU-PERP, XAG-PERP)
                required: true
              - name: width
                type: string
                description: Candle width for subscription
                enumValues:
                  - 1s
                  - 5s
                  - 1m
                  - 5m
                  - 15m
                  - 1h
                  - 1d
                required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            required:
              - rid
              - type
              - symbol
              - width
            properties:
              rid:
                type: integer
                description: Request ID for correlating response
                x-parser-schema-id: <anonymous-schema-13>
              type:
                type: string
                const: subscribe_candles
                description: Request type
                x-parser-schema-id: <anonymous-schema-14>
              symbol:
                type: string
                description: Instrument symbol (e.g. XAU-PERP, XAG-PERP)
                x-parser-schema-id: <anonymous-schema-15>
              width:
                type: string
                enum:
                  - 1s
                  - 5s
                  - 1m
                  - 5m
                  - 15m
                  - 1h
                  - 1d
                description: Candle width for subscription
                x-parser-schema-id: <anonymous-schema-16>
            x-parser-schema-id: <anonymous-schema-12>
        title: Subscribe Candle Request
        description: Subscribe to candle updates on a symbol and width
        example: |-
          {
            "rid": 4,
            "type": "subscribe_candles",
            "symbol": "XAU-PERP",
            "width": "1m"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeCandleRequest
      - &ref_7
        id: unsubscribeCandleRequest
        contentType: application/json
        payload:
          - name: Unsubscribe Candle Request
            description: Unsubscribe from candle updates on a symbol and width
            type: object
            properties:
              - name: rid
                type: integer
                description: Request ID for correlating response
                required: true
              - name: type
                type: string
                description: Request type
                required: true
              - name: symbol
                type: string
                description: Instrument symbol (e.g. XAU-PERP, XAG-PERP)
                required: true
              - name: width
                type: string
                description: Candle width for subscription
                enumValues:
                  - 1s
                  - 5s
                  - 1m
                  - 5m
                  - 15m
                  - 1h
                  - 1d
                required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            required:
              - rid
              - type
              - symbol
              - width
            properties:
              rid:
                type: integer
                description: Request ID for correlating response
                x-parser-schema-id: <anonymous-schema-18>
              type:
                type: string
                const: unsubscribe_candles
                description: Request type
                x-parser-schema-id: <anonymous-schema-19>
              symbol:
                type: string
                description: Instrument symbol (e.g. XAU-PERP, XAG-PERP)
                x-parser-schema-id: <anonymous-schema-20>
              width:
                type: string
                enum:
                  - 1s
                  - 5s
                  - 1m
                  - 5m
                  - 15m
                  - 1h
                  - 1d
                description: Candle width for subscription
                x-parser-schema-id: <anonymous-schema-21>
            x-parser-schema-id: <anonymous-schema-17>
        title: Unsubscribe Candle Request
        description: Unsubscribe from candle updates on a symbol and width
        example: |-
          {
            "rid": 5,
            "type": "unsubscribe_candles",
            "symbol": "XAU-PERP",
            "width": "1m"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: unsubscribeCandleRequest
      - &ref_8
        id: subscribeBboCandleRequest
        contentType: application/json
        payload:
          - name: Subscribe BBO Candles Request
            description: >-
              Subscribe to BBO (Best Bid and Offer) candle updates on a symbol
              and width
            type: object
            properties:
              - name: rid
                type: integer
                description: Request ID for correlating response
                required: true
              - name: type
                type: string
                description: Request type
                required: true
              - name: symbol
                type: string
                description: Instrument symbol (e.g. XAU-PERP, XAG-PERP)
                required: true
              - name: width
                type: string
                description: Candle width for subscription
                enumValues:
                  - 1s
                  - 5s
                  - 1m
                  - 5m
                  - 15m
                  - 1h
                  - 1d
                required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            required:
              - rid
              - type
              - symbol
              - width
            properties:
              rid:
                type: integer
                description: Request ID for correlating response
                x-parser-schema-id: <anonymous-schema-23>
              type:
                type: string
                const: subscribe_bbo_candles
                description: Request type
                x-parser-schema-id: <anonymous-schema-24>
              symbol:
                type: string
                description: Instrument symbol (e.g. XAU-PERP, XAG-PERP)
                x-parser-schema-id: <anonymous-schema-25>
              width:
                type: string
                enum:
                  - 1s
                  - 5s
                  - 1m
                  - 5m
                  - 15m
                  - 1h
                  - 1d
                description: Candle width for subscription
                x-parser-schema-id: <anonymous-schema-26>
            x-parser-schema-id: <anonymous-schema-22>
        title: Subscribe BBO Candles Request
        description: >-
          Subscribe to BBO (Best Bid and Offer) candle updates on a symbol and
          width
        example: |-
          {
            "rid": 6,
            "type": "subscribe_bbo_candles",
            "symbol": "XAU-PERP",
            "width": "1m"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeBboCandleRequest
      - &ref_9
        id: unsubscribeBboCandleRequest
        contentType: application/json
        payload:
          - name: Unsubscribe BBO Candles Request
            description: Unsubscribe from BBO candle updates on a symbol and width
            type: object
            properties:
              - name: rid
                type: integer
                description: Request ID for correlating response
                required: true
              - name: type
                type: string
                description: Request type
                required: true
              - name: symbol
                type: string
                description: Instrument symbol (e.g. XAU-PERP, XAG-PERP)
                required: true
              - name: width
                type: string
                description: Candle width for subscription
                enumValues:
                  - 1s
                  - 5s
                  - 1m
                  - 5m
                  - 15m
                  - 1h
                  - 1d
                required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            required:
              - rid
              - type
              - symbol
              - width
            properties:
              rid:
                type: integer
                description: Request ID for correlating response
                x-parser-schema-id: <anonymous-schema-28>
              type:
                type: string
                const: unsubscribe_bbo_candles
                description: Request type
                x-parser-schema-id: <anonymous-schema-29>
              symbol:
                type: string
                description: Instrument symbol (e.g. XAU-PERP, XAG-PERP)
                x-parser-schema-id: <anonymous-schema-30>
              width:
                type: string
                enum:
                  - 1s
                  - 5s
                  - 1m
                  - 5m
                  - 15m
                  - 1h
                  - 1d
                description: Candle width for subscription
                x-parser-schema-id: <anonymous-schema-31>
            x-parser-schema-id: <anonymous-schema-27>
        title: Unsubscribe BBO Candles Request
        description: Unsubscribe from BBO candle updates on a symbol and width
        example: |-
          {
            "rid": 7,
            "type": "unsubscribe_bbo_candles",
            "symbol": "XAU-PERP",
            "width": "1m"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: unsubscribeBboCandleRequest
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: marketdata
  - &ref_2
    id: serverResponse
    title: Server response
    type: send
    messages:
      - &ref_10
        id: successResponse
        contentType: application/json
        payload:
          - name: Success Response
            description: Confirmation of a successful client request
            type: object
            properties:
              - name: rid
                type: integer
                description: Request ID matching the original request
                required: true
              - name: result
                type: object
                description: Success result information
                required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            required:
              - rid
              - result
            properties:
              rid:
                type: integer
                description: Request ID matching the original request
                x-parser-schema-id: <anonymous-schema-33>
              result:
                type: object
                description: Success result information
                additionalProperties:
                  type: string
                  x-parser-schema-id: <anonymous-schema-35>
                x-parser-schema-id: <anonymous-schema-34>
            x-parser-schema-id: <anonymous-schema-32>
        title: Success Response
        description: Confirmation of a successful client request
        example: |-
          {
            "rid": 2,
            "result": {
              "subscribed": "XAU-PERP"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: successResponse
      - &ref_11
        id: errorResponse
        contentType: application/json
        payload:
          - name: Error Response
            description: Response indicating a failed client request
            type: object
            properties:
              - name: rid
                type: integer
                description: Request ID matching the original request
                required: true
              - name: error
                type: object
                required: true
                properties:
                  - name: message
                    type: string
                    description: Error message
                    required: true
                  - name: code
                    type: integer
                    description: Error code
                    required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            required:
              - rid
              - error
            properties:
              rid:
                type: integer
                description: Request ID matching the original request
                x-parser-schema-id: <anonymous-schema-37>
              error:
                type: object
                required:
                  - message
                  - code
                properties:
                  message:
                    type: string
                    description: Error message
                    x-parser-schema-id: <anonymous-schema-39>
                  code:
                    type: integer
                    description: Error code
                    x-parser-schema-id: <anonymous-schema-40>
                x-parser-schema-id: <anonymous-schema-38>
            x-parser-schema-id: <anonymous-schema-36>
        title: Error Response
        description: Response indicating a failed client request
        example: |-
          {
            "rid": 2,
            "error": {
              "message": "Symbol XAU-PERP is not available",
              "code": 404
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: errorResponse
    bindings: []
    extensions: *ref_0
  - &ref_3
    id: serverEvent
    title: Server event
    type: send
    messages:
      - &ref_12
        id: heartbeatEvent
        contentType: application/json
        payload:
          - name: Heartbeat Event
            description: Heartbeat/timestamp event (t="h")
            type: object
            properties:
              - name: t
                type: string
                description: Message type (heartbeat)
                required: true
              - name: ts
                type: integer
                description: Timestamp seconds since epoch
                required: true
              - name: tn
                type: integer
                description: Timestamp nanoseconds
                required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            required:
              - t
              - ts
              - tn
            properties:
              t:
                type: string
                const: h
                description: Message type (heartbeat)
                x-parser-schema-id: <anonymous-schema-42>
              ts:
                type: integer
                format: int32
                description: Timestamp seconds since epoch
                x-parser-schema-id: <anonymous-schema-43>
              tn:
                type: integer
                format: uint32
                minimum: 0
                description: Timestamp nanoseconds
                x-parser-schema-id: <anonymous-schema-44>
            x-parser-schema-id: <anonymous-schema-41>
        title: Heartbeat Event
        description: Heartbeat/timestamp event (t="h")
        example: |-
          {
            "t": "h",
            "ts": 1609459200,
            "tn": 123456789
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: heartbeatEvent
      - &ref_13
        id: tickerEvent
        contentType: application/json
        payload:
          - name: Ticker Event
            description: Ticker statistics update (t="s")
            type: object
            properties:
              - name: t
                type: string
                description: Message type (ticker)
                required: true
              - name: ts
                type: integer
                description: Timestamp seconds since epoch
                required: true
              - name: tn
                type: integer
                description: Timestamp nanoseconds
                required: true
              - name: s
                type: string
                description: Instrument symbol
                required: true
              - name: p
                type: string
                description: Last trade price in USD
                required: false
              - name: q
                type: integer
                description: Last trade quantity in contracts
                required: true
              - name: o
                type: string
                description: Session open price in USD
                required: false
              - name: l
                type: string
                description: Session low price in USD
                required: false
              - name: h
                type: string
                description: Session high price in USD
                required: false
              - name: v
                type: integer
                description: Total volume in contracts
                required: true
              - name: oi
                type: integer
                description: Open interest in contracts
                required: true
              - name: m
                type: string
                description: Mark price in USD
                required: true
              - name: i
                type: string
                description: Instrument state
                enumValues:
                  - CLOSED_FROZEN
                  - PRE_OPEN
                  - OPEN
                  - CLOSED
                  - DELISTED
                  - HALTED
                  - MATCH_AND_CLOSE_AUCTION
                  - UNKNOWN
                required: true
              - name: pl
                type: string
                description: Price band lower limit
                required: false
              - name: pu
                type: string
                description: Price band upper limit
                required: false
              - name: lsp
                type: string
                description: Last settlement price
                required: false
              - name: lst
                type: integer
                description: Last settlement time as epoch seconds
                required: false
              - name: ef
                type: object
                description: >-
                  Live estimated funding rate, present only when a live index
                  feed is configured for this symbol. The numeric fields are
                  populated only when `status` is `ready`.
                required: false
                properties:
                  - name: symbol
                    type: string
                    description: Instrument symbol
                    required: true
                  - name: status
                    type: string
                    description: >-
                      Estimate availability. `ready` — a current estimate is
                      available and the numeric fields are populated.
                      `settlement_pending` — funding settlement is in progress
                      for the symbol, so the estimate is temporarily suppressed;
                      numeric fields are null and `reason` indicates settlement
                      is pending. `unavailable` — no current estimate can be
                      produced; numeric fields are null and `reason` explains
                      why (e.g. the index or mark price data is not yet
                      available, is insufficient, or is too stale, or no
                      estimate has been published yet).
                    enumValues:
                      - ready
                      - settlement_pending
                      - unavailable
                    required: true
                  - name: reason
                    type: string
                    description: >-
                      Human-readable explanation, present when no estimate is
                      available
                    required: false
                  - name: funding_rate
                    type: string
                    description: Estimated funding rate
                    required: false
                  - name: funding_amount
                    type: string
                    description: Estimated funding amount per contract in USD
                    required: false
                  - name: benchmark_price
                    type: string
                    description: Benchmark (index) price used for the estimate in USD
                    required: false
                  - name: settlement_price
                    type: string
                    description: Settlement (mark) price used for the estimate in USD
                    required: false
                  - name: timestamp
                    type: string
                    description: Time the estimate was computed (RFC 3339)
                    required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            required:
              - t
              - ts
              - tn
              - s
              - q
              - v
              - oi
              - m
              - i
            properties:
              t:
                type: string
                const: s
                description: Message type (ticker)
                x-parser-schema-id: <anonymous-schema-46>
              ts:
                type: integer
                format: int32
                description: Timestamp seconds since epoch
                x-parser-schema-id: <anonymous-schema-47>
              tn:
                type: integer
                format: uint32
                minimum: 0
                description: Timestamp nanoseconds
                x-parser-schema-id: <anonymous-schema-48>
              s:
                type: string
                description: Instrument symbol
                x-parser-schema-id: <anonymous-schema-49>
              p:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Last trade price in USD
                x-parser-schema-id: <anonymous-schema-50>
              q:
                type: integer
                format: uint64
                description: Last trade quantity in contracts
                x-parser-schema-id: <anonymous-schema-51>
              o:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Session open price in USD
                x-parser-schema-id: <anonymous-schema-52>
              l:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Session low price in USD
                x-parser-schema-id: <anonymous-schema-53>
              h:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Session high price in USD
                x-parser-schema-id: <anonymous-schema-54>
              v:
                type: integer
                format: uint64
                description: Total volume in contracts
                x-parser-schema-id: <anonymous-schema-55>
              oi:
                type: integer
                format: uint64
                description: Open interest in contracts
                x-parser-schema-id: <anonymous-schema-56>
              m:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Mark price in USD
                x-parser-schema-id: <anonymous-schema-57>
              i:
                type: string
                enum:
                  - CLOSED_FROZEN
                  - PRE_OPEN
                  - OPEN
                  - CLOSED
                  - DELISTED
                  - HALTED
                  - MATCH_AND_CLOSE_AUCTION
                  - UNKNOWN
                description: Instrument state
                x-parser-schema-id: <anonymous-schema-58>
              pl:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Price band lower limit
                x-parser-schema-id: <anonymous-schema-59>
              pu:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Price band upper limit
                x-parser-schema-id: <anonymous-schema-60>
              lsp:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Last settlement price
                x-parser-schema-id: <anonymous-schema-61>
              lst:
                type: integer
                format: int32
                description: Last settlement time as epoch seconds
                x-parser-schema-id: <anonymous-schema-62>
              ef:
                type: object
                description: >-
                  Live estimated funding rate, present only when a live index
                  feed is configured for this symbol. The numeric fields are
                  populated only when `status` is `ready`.
                required:
                  - symbol
                  - status
                  - timestamp
                properties:
                  symbol:
                    type: string
                    description: Instrument symbol
                    x-parser-schema-id: <anonymous-schema-64>
                  status:
                    type: string
                    enum:
                      - ready
                      - settlement_pending
                      - unavailable
                    description: >-
                      Estimate availability. `ready` — a current estimate is
                      available and the numeric fields are populated.
                      `settlement_pending` — funding settlement is in progress
                      for the symbol, so the estimate is temporarily suppressed;
                      numeric fields are null and `reason` indicates settlement
                      is pending. `unavailable` — no current estimate can be
                      produced; numeric fields are null and `reason` explains
                      why (e.g. the index or mark price data is not yet
                      available, is insufficient, or is too stale, or no
                      estimate has been published yet).
                    x-parser-schema-id: <anonymous-schema-65>
                  reason:
                    type: string
                    description: >-
                      Human-readable explanation, present when no estimate is
                      available
                    x-parser-schema-id: <anonymous-schema-66>
                  funding_rate:
                    type: string
                    pattern: ^-?\d+(\.\d+)?$
                    description: Estimated funding rate
                    x-parser-schema-id: <anonymous-schema-67>
                  funding_amount:
                    type: string
                    pattern: ^-?\d+(\.\d+)?$
                    description: Estimated funding amount per contract in USD
                    x-parser-schema-id: <anonymous-schema-68>
                  benchmark_price:
                    type: string
                    pattern: ^-?\d+(\.\d+)?$
                    description: Benchmark (index) price used for the estimate in USD
                    x-parser-schema-id: <anonymous-schema-69>
                  settlement_price:
                    type: string
                    pattern: ^-?\d+(\.\d+)?$
                    description: Settlement (mark) price used for the estimate in USD
                    x-parser-schema-id: <anonymous-schema-70>
                  timestamp:
                    type: string
                    format: date-time
                    description: Time the estimate was computed (RFC 3339)
                    x-parser-schema-id: <anonymous-schema-71>
                x-parser-schema-id: <anonymous-schema-63>
            x-parser-schema-id: <anonymous-schema-45>
        title: Ticker Event
        description: Ticker statistics update (t="s")
        example: |-
          {
            "t": "s",
            "ts": 1609459200,
            "tn": 123456789,
            "s": "XAU-PERP",
            "p": "50000.00",
            "q": 100,
            "o": "49500.00",
            "l": "49000.00",
            "h": "50500.00",
            "v": 125000,
            "oi": 50000,
            "m": "50010.00",
            "i": "OPEN",
            "pl": "47500.00",
            "pu": "52500.00",
            "ef": {
              "symbol": "XAU-PERP",
              "status": "ready",
              "funding_rate": "0.00012",
              "funding_amount": "6.00",
              "benchmark_price": "50005.00",
              "settlement_price": "50010.00",
              "timestamp": "2021-01-01T00:00:00Z"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: tickerEvent
      - &ref_14
        id: tradeEvent
        contentType: application/json
        payload:
          - name: Trade Event
            description: Trade event (t="t")
            type: object
            properties:
              - name: t
                type: string
                description: Message type (trade)
                required: true
              - name: ts
                type: integer
                description: Timestamp seconds since epoch
                required: true
              - name: tn
                type: integer
                description: Timestamp nanoseconds
                required: true
              - name: s
                type: string
                description: Instrument symbol
                required: true
              - name: p
                type: string
                description: Trade price in USD
                required: true
              - name: q
                type: integer
                description: Trade quantity in contracts
                required: true
              - name: d
                type: string
                description: Taker side of the trade, "B" for buy and "S" for sell
                enumValues:
                  - B
                  - S
                required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            required:
              - t
              - ts
              - tn
              - p
              - q
              - s
              - d
            properties:
              t:
                type: string
                const: t
                description: Message type (trade)
                x-parser-schema-id: <anonymous-schema-73>
              ts:
                type: integer
                format: int32
                description: Timestamp seconds since epoch
                x-parser-schema-id: <anonymous-schema-74>
              tn:
                type: integer
                format: uint32
                minimum: 0
                description: Timestamp nanoseconds
                x-parser-schema-id: <anonymous-schema-75>
              s:
                type: string
                description: Instrument symbol
                x-parser-schema-id: <anonymous-schema-76>
              p:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Trade price in USD
                x-parser-schema-id: <anonymous-schema-77>
              q:
                type: integer
                format: uint64
                description: Trade quantity in contracts
                x-parser-schema-id: <anonymous-schema-78>
              d:
                type: string
                description: Taker side of the trade, "B" for buy and "S" for sell
                enum:
                  - B
                  - S
                x-parser-schema-id: <anonymous-schema-79>
            x-parser-schema-id: <anonymous-schema-72>
        title: Trade Event
        description: Trade event (t="t")
        example: |-
          {
            "t": "t",
            "ts": 1609459200,
            "tn": 123456789,
            "s": "XAU-PERP",
            "p": "50000.00",
            "q": 100,
            "d": "B"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: tradeEvent
      - &ref_15
        id: candleEvent
        contentType: application/json
        payload:
          - name: Candle Event
            description: Candle update (t="c")
            type: object
            properties:
              - name: t
                type: string
                description: Message type (candle)
                required: true
              - name: symbol
                type: string
                description: Instrument symbol
                required: true
              - name: ts
                type: integer
                description: >-
                  Timestamp seconds of the start of the interval this candle
                  spans
                required: true
              - name: open
                type: string
                description: Open price as decimal string
                required: true
              - name: high
                type: string
                description: High price as decimal string
                required: true
              - name: low
                type: string
                description: Low price as decimal string
                required: true
              - name: close
                type: string
                description: >-
                  Close price as decimal string (if candle is still current,
                  then latest trade price)
                required: true
              - name: buy_volume
                type: integer
                description: Total volume within candle interval on buy side
                required: true
              - name: sell_volume
                type: integer
                description: Total volume within candle interval on sell side
                required: true
              - name: volume
                type: integer
                description: Total volume within candle interval
                required: true
              - name: width
                type: string
                description: Duration after start timestamp this candle spans
                enumValues:
                  - 1s
                  - 5s
                  - 1m
                  - 5m
                  - 15m
                  - 1h
                  - 1d
                required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            description: Candle summarizing market movement over an interval
            required:
              - t
              - symbol
              - ts
              - open
              - high
              - low
              - close
              - buy_volume
              - sell_volume
              - volume
              - width
            properties:
              t:
                type: string
                const: c
                description: Message type (candle)
                x-parser-schema-id: <anonymous-schema-81>
              symbol:
                type: string
                description: Instrument symbol
                x-parser-schema-id: <anonymous-schema-82>
              ts:
                type: integer
                description: >-
                  Timestamp seconds of the start of the interval this candle
                  spans
                x-parser-schema-id: <anonymous-schema-83>
              open:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Open price as decimal string
                x-parser-schema-id: <anonymous-schema-84>
              high:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: High price as decimal string
                x-parser-schema-id: <anonymous-schema-85>
              low:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Low price as decimal string
                x-parser-schema-id: <anonymous-schema-86>
              close:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: >-
                  Close price as decimal string (if candle is still current,
                  then latest trade price)
                x-parser-schema-id: <anonymous-schema-87>
              buy_volume:
                type: integer
                format: int64
                description: Total volume within candle interval on buy side
                x-parser-schema-id: <anonymous-schema-88>
              sell_volume:
                type: integer
                format: int64
                description: Total volume within candle interval on sell side
                x-parser-schema-id: <anonymous-schema-89>
              volume:
                type: integer
                format: int64
                description: Total volume within candle interval
                x-parser-schema-id: <anonymous-schema-90>
              width:
                type: string
                enum:
                  - 1s
                  - 5s
                  - 1m
                  - 5m
                  - 15m
                  - 1h
                  - 1d
                description: Duration after start timestamp this candle spans
                x-parser-schema-id: <anonymous-schema-91>
            x-parser-schema-id: <anonymous-schema-80>
        title: Candle Event
        description: Candle update (t="c")
        example: |-
          {
            "t": "c",
            "symbol": "XAU-PERP",
            "ts": 123456789,
            "open": "49500.00",
            "low": "49000.00",
            "high": "50500.00",
            "close": "50000.00",
            "volume": 5000,
            "buy_volume": 3000,
            "sell_volume": 2000,
            "width": "1m"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: candleEvent
      - &ref_16
        id: bboCandleEvent
        contentType: application/json
        payload:
          - name: BBO Candle Event
            description: BBO (Best Bid and Offer) candle update (t="bc")
            type: object
            properties:
              - name: t
                type: string
                description: Message type (BBO candle)
                required: true
              - name: symbol
                type: string
                description: Instrument symbol
                required: true
              - name: ts
                type: integer
                description: >-
                  Timestamp seconds of the start of the interval this candle
                  spans
                required: true
              - name: bid_open
                type: string
                description: Best bid price at the start of the interval
                required: false
              - name: bid_high
                type: string
                description: Highest best bid price during the interval
                required: false
              - name: bid_low
                type: string
                description: Lowest best bid price during the interval
                required: false
              - name: bid_close
                type: string
                description: Best bid price at the end of the interval
                required: false
              - name: ask_open
                type: string
                description: Best ask price at the start of the interval
                required: false
              - name: ask_high
                type: string
                description: Highest best ask price during the interval
                required: false
              - name: ask_low
                type: string
                description: Lowest best ask price during the interval
                required: false
              - name: ask_close
                type: string
                description: Best ask price at the end of the interval
                required: false
              - name: mid_open
                type: string
                description: Mid-price ((bid + ask) / 2) at the start of the interval
                required: false
              - name: mid_high
                type: string
                description: Highest mid-price during the interval
                required: false
              - name: mid_low
                type: string
                description: Lowest mid-price during the interval
                required: false
              - name: mid_close
                type: string
                description: Mid-price at the end of the interval
                required: false
              - name: width
                type: string
                description: Duration after start timestamp this candle spans
                enumValues:
                  - 1s
                  - 5s
                  - 1m
                  - 5m
                  - 15m
                  - 1h
                  - 1d
                required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            description: >-
              BBO candle derived from order book state over an interval. Tracks
              OHLC values for the best bid, best ask, and mid-price
              independently. Unlike trade candles, BBO candles reflect quoting
              activity rather than executed trades.
            required:
              - t
              - symbol
              - ts
              - width
            properties:
              t:
                type: string
                const: bc
                description: Message type (BBO candle)
                x-parser-schema-id: <anonymous-schema-93>
              symbol:
                type: string
                description: Instrument symbol
                x-parser-schema-id: <anonymous-schema-94>
              ts:
                type: integer
                description: >-
                  Timestamp seconds of the start of the interval this candle
                  spans
                x-parser-schema-id: <anonymous-schema-95>
              bid_open:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Best bid price at the start of the interval
                nullable: true
                x-parser-schema-id: <anonymous-schema-96>
              bid_high:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Highest best bid price during the interval
                nullable: true
                x-parser-schema-id: <anonymous-schema-97>
              bid_low:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Lowest best bid price during the interval
                nullable: true
                x-parser-schema-id: <anonymous-schema-98>
              bid_close:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Best bid price at the end of the interval
                nullable: true
                x-parser-schema-id: <anonymous-schema-99>
              ask_open:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Best ask price at the start of the interval
                nullable: true
                x-parser-schema-id: <anonymous-schema-100>
              ask_high:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Highest best ask price during the interval
                nullable: true
                x-parser-schema-id: <anonymous-schema-101>
              ask_low:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Lowest best ask price during the interval
                nullable: true
                x-parser-schema-id: <anonymous-schema-102>
              ask_close:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Best ask price at the end of the interval
                nullable: true
                x-parser-schema-id: <anonymous-schema-103>
              mid_open:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Mid-price ((bid + ask) / 2) at the start of the interval
                nullable: true
                x-parser-schema-id: <anonymous-schema-104>
              mid_high:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Highest mid-price during the interval
                nullable: true
                x-parser-schema-id: <anonymous-schema-105>
              mid_low:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Lowest mid-price during the interval
                nullable: true
                x-parser-schema-id: <anonymous-schema-106>
              mid_close:
                type: string
                pattern: ^-?\d+(\.\d+)?$
                description: Mid-price at the end of the interval
                nullable: true
                x-parser-schema-id: <anonymous-schema-107>
              width:
                type: string
                enum:
                  - 1s
                  - 5s
                  - 1m
                  - 5m
                  - 15m
                  - 1h
                  - 1d
                description: Duration after start timestamp this candle spans
                x-parser-schema-id: <anonymous-schema-108>
            x-parser-schema-id: <anonymous-schema-92>
        title: BBO Candle Event
        description: BBO (Best Bid and Offer) candle update (t="bc")
        example: |-
          {
            "t": "bc",
            "symbol": "XAU-PERP",
            "ts": 123456789,
            "bid_open": "49990.00",
            "bid_high": "50010.00",
            "bid_low": "49980.00",
            "bid_close": "50000.00",
            "ask_open": "50010.00",
            "ask_high": "50030.00",
            "ask_low": "50000.00",
            "ask_close": "50020.00",
            "mid_open": "50000.00",
            "mid_high": "50020.00",
            "mid_low": "49990.00",
            "mid_close": "50010.00",
            "width": "1m"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: bboCandleEvent
      - &ref_17
        id: l1BookUpdateEvent
        contentType: application/json
        payload:
          - name: Level 1 Book Update Event
            description: Level 1 orderbook update - best bid/ask (t="1")
            type: object
            properties:
              - name: t
                type: string
                description: Message type (L1 book update)
                required: true
              - name: ts
                type: integer
                description: Timestamp seconds since epoch
                required: true
              - name: tn
                type: integer
                description: Timestamp nanoseconds
                required: true
              - name: s
                type: string
                description: Instrument symbol
                required: true
              - name: b
                type: array
                description: Bid levels (best bid only for L1)
                required: true
                properties:
                  - name: p
                    type: string
                    description: Price as decimal string
                    required: true
                  - name: q
                    type: integer
                    description: Total quantity at this price level
                    required: true
              - name: a
                type: array
                description: Ask levels (best ask only for L1)
                required: true
                properties:
                  - name: p
                    type: string
                    description: Price as decimal string
                    required: true
                  - name: q
                    type: integer
                    description: Total quantity at this price level
                    required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            required:
              - t
              - ts
              - tn
              - s
              - b
              - a
            properties:
              t:
                type: string
                const: '1'
                description: Message type (L1 book update)
                x-parser-schema-id: <anonymous-schema-110>
              ts:
                type: integer
                format: int32
                description: Timestamp seconds since epoch
                x-parser-schema-id: <anonymous-schema-111>
              tn:
                type: integer
                format: uint32
                minimum: 0
                description: Timestamp nanoseconds
                x-parser-schema-id: <anonymous-schema-112>
              s:
                type: string
                description: Instrument symbol
                x-parser-schema-id: <anonymous-schema-113>
              b:
                type: array
                description: Bid levels (best bid only for L1)
                items:
                  type: object
                  description: Aggregated price level in L2 orderbook
                  required:
                    - p
                    - q
                  properties:
                    p:
                      type: string
                      pattern: ^-?\d+(\.\d+)?$
                      description: Price as decimal string
                      x-parser-schema-id: <anonymous-schema-116>
                    q:
                      type: integer
                      format: uint64
                      description: Total quantity at this price level
                      x-parser-schema-id: <anonymous-schema-117>
                  x-parser-schema-id: <anonymous-schema-115>
                x-parser-schema-id: <anonymous-schema-114>
              a:
                type: array
                description: Ask levels (best ask only for L1)
                items:
                  type: object
                  description: Aggregated price level in L2 orderbook
                  required:
                    - p
                    - q
                  properties:
                    p:
                      type: string
                      pattern: ^-?\d+(\.\d+)?$
                      description: Price as decimal string
                      x-parser-schema-id: <anonymous-schema-120>
                    q:
                      type: integer
                      format: uint64
                      description: Total quantity at this price level
                      x-parser-schema-id: <anonymous-schema-121>
                  x-parser-schema-id: <anonymous-schema-119>
                x-parser-schema-id: <anonymous-schema-118>
            x-parser-schema-id: <anonymous-schema-109>
        title: Level 1 Book Update Event
        description: Level 1 orderbook update - best bid/ask (t="1")
        example: |-
          {
            "t": "1",
            "ts": 1609459200,
            "tn": 123456789,
            "s": "XAU-PERP",
            "b": [
              {
                "p": "49999.50",
                "q": 500
              }
            ],
            "a": [
              {
                "p": "50000.50",
                "q": 300
              }
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: l1BookUpdateEvent
      - &ref_18
        id: l2BookUpdateEvent
        contentType: application/json
        payload:
          - name: Level 2 Book Update Event
            description: Level 2 orderbook update - aggregated price levels (t="2")
            type: object
            properties:
              - name: t
                type: string
                description: Message type (L2 book update)
                required: true
              - name: ts
                type: integer
                description: Timestamp seconds since epoch
                required: true
              - name: tn
                type: integer
                description: Timestamp nanoseconds
                required: true
              - name: s
                type: string
                description: Instrument symbol
                required: true
              - name: b
                type: array
                description: Bid levels (aggregated by price)
                required: true
                properties:
                  - name: p
                    type: string
                    description: Price as decimal string
                    required: true
                  - name: q
                    type: integer
                    description: Total quantity at this price level
                    required: true
              - name: a
                type: array
                description: Ask levels (aggregated by price)
                required: true
                properties:
                  - name: p
                    type: string
                    description: Price as decimal string
                    required: true
                  - name: q
                    type: integer
                    description: Total quantity at this price level
                    required: true
              - name: st
                type: boolean
                description: Whether this update is a full snapshot
                required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            required:
              - t
              - ts
              - tn
              - s
              - b
              - a
              - st
            properties:
              t:
                type: string
                const: '2'
                description: Message type (L2 book update)
                x-parser-schema-id: <anonymous-schema-123>
              ts:
                type: integer
                format: int32
                description: Timestamp seconds since epoch
                x-parser-schema-id: <anonymous-schema-124>
              tn:
                type: integer
                format: uint32
                minimum: 0
                description: Timestamp nanoseconds
                x-parser-schema-id: <anonymous-schema-125>
              s:
                type: string
                description: Instrument symbol
                x-parser-schema-id: <anonymous-schema-126>
              b:
                type: array
                description: Bid levels (aggregated by price)
                items:
                  type: object
                  description: Aggregated price level in L2 orderbook
                  required:
                    - p
                    - q
                  properties:
                    p:
                      type: string
                      pattern: ^-?\d+(\.\d+)?$
                      description: Price as decimal string
                      x-parser-schema-id: <anonymous-schema-129>
                    q:
                      type: integer
                      format: uint64
                      description: Total quantity at this price level
                      x-parser-schema-id: <anonymous-schema-130>
                  x-parser-schema-id: <anonymous-schema-128>
                x-parser-schema-id: <anonymous-schema-127>
              a:
                type: array
                description: Ask levels (aggregated by price)
                items:
                  type: object
                  description: Aggregated price level in L2 orderbook
                  required:
                    - p
                    - q
                  properties:
                    p:
                      type: string
                      pattern: ^-?\d+(\.\d+)?$
                      description: Price as decimal string
                      x-parser-schema-id: <anonymous-schema-133>
                    q:
                      type: integer
                      format: uint64
                      description: Total quantity at this price level
                      x-parser-schema-id: <anonymous-schema-134>
                  x-parser-schema-id: <anonymous-schema-132>
                x-parser-schema-id: <anonymous-schema-131>
              st:
                type: boolean
                description: Whether this update is a full snapshot
                x-parser-schema-id: <anonymous-schema-135>
            x-parser-schema-id: <anonymous-schema-122>
        title: Level 2 Book Update Event
        description: Level 2 orderbook update - aggregated price levels (t="2")
        example: |-
          {
            "t": "2",
            "ts": 1609459200,
            "tn": 123456789,
            "s": "XAU-PERP",
            "b": [
              {
                "p": "49999.50",
                "q": 500
              },
              {
                "p": "49999.00",
                "q": 300
              },
              {
                "p": "49998.50",
                "q": 200
              },
              {
                "p": "49998.00",
                "q": 150
              },
              {
                "p": "49997.50",
                "q": 100
              }
            ],
            "a": [
              {
                "p": "50000.50",
                "q": 300
              },
              {
                "p": "50001.00",
                "q": 400
              },
              {
                "p": "50001.50",
                "q": 250
              },
              {
                "p": "50002.00",
                "q": 200
              },
              {
                "p": "50002.50",
                "q": 150
              }
            ],
            "st": true
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: l2BookUpdateEvent
      - &ref_19
        id: l3BookUpdateEvent
        contentType: application/json
        payload:
          - name: Level 3 Book Update Event
            description: Level 3 orderbook update - individual order quantities (t="3")
            type: object
            properties:
              - name: t
                type: string
                description: Message type (L3 book update)
                required: true
              - name: ts
                type: integer
                description: Timestamp seconds since epoch
                required: true
              - name: tn
                type: integer
                description: Timestamp nanoseconds
                required: true
              - name: s
                type: string
                description: Instrument symbol
                required: true
              - name: b
                type: array
                description: Bid levels with individual order quantities
                required: true
                properties:
                  - name: p
                    type: string
                    description: Price as decimal string
                    required: true
                  - name: q
                    type: integer
                    description: Total quantity at this price level
                    required: true
                  - name: o
                    type: array
                    description: Individual order quantities at this price level
                    required: true
                    properties:
                      - name: item
                        type: integer
                        required: false
              - name: a
                type: array
                description: Ask levels with individual order quantities
                required: true
                properties:
                  - name: p
                    type: string
                    description: Price as decimal string
                    required: true
                  - name: q
                    type: integer
                    description: Total quantity at this price level
                    required: true
                  - name: o
                    type: array
                    description: Individual order quantities at this price level
                    required: true
                    properties:
                      - name: item
                        type: integer
                        required: false
              - name: st
                type: boolean
                description: Whether this update is a full snapshot
                required: true
        headers: []
        jsonPayloadSchema:
          schema:
            type: object
            required:
              - t
              - ts
              - tn
              - s
              - b
              - a
              - st
            properties:
              t:
                type: string
                const: '3'
                description: Message type (L3 book update)
                x-parser-schema-id: <anonymous-schema-137>
              ts:
                type: integer
                format: int32
                description: Timestamp seconds since epoch
                x-parser-schema-id: <anonymous-schema-138>
              tn:
                type: integer
                format: uint32
                minimum: 0
                description: Timestamp nanoseconds
                x-parser-schema-id: <anonymous-schema-139>
              s:
                type: string
                description: Instrument symbol
                x-parser-schema-id: <anonymous-schema-140>
              b:
                type: array
                description: Bid levels with individual order quantities
                items:
                  type: object
                  description: Price level with individual order quantities in L3 orderbook
                  required:
                    - p
                    - q
                    - o
                  properties:
                    p:
                      type: string
                      pattern: ^-?\d+(\.\d+)?$
                      description: Price as decimal string
                      x-parser-schema-id: <anonymous-schema-143>
                    q:
                      type: integer
                      format: uint64
                      description: Total quantity at this price level
                      x-parser-schema-id: <anonymous-schema-144>
                    o:
                      type: array
                      description: Individual order quantities at this price level
                      items:
                        type: integer
                        format: uint64
                        x-parser-schema-id: <anonymous-schema-146>
                      x-parser-schema-id: <anonymous-schema-145>
                  x-parser-schema-id: <anonymous-schema-142>
                x-parser-schema-id: <anonymous-schema-141>
              a:
                type: array
                description: Ask levels with individual order quantities
                items:
                  type: object
                  description: Price level with individual order quantities in L3 orderbook
                  required:
                    - p
                    - q
                    - o
                  properties:
                    p:
                      type: string
                      pattern: ^-?\d+(\.\d+)?$
                      description: Price as decimal string
                      x-parser-schema-id: <anonymous-schema-149>
                    q:
                      type: integer
                      format: uint64
                      description: Total quantity at this price level
                      x-parser-schema-id: <anonymous-schema-150>
                    o:
                      type: array
                      description: Individual order quantities at this price level
                      items:
                        type: integer
                        format: uint64
                        x-parser-schema-id: <anonymous-schema-152>
                      x-parser-schema-id: <anonymous-schema-151>
                  x-parser-schema-id: <anonymous-schema-148>
                x-parser-schema-id: <anonymous-schema-147>
              st:
                type: boolean
                description: Whether this update is a full snapshot
                x-parser-schema-id: <anonymous-schema-153>
            x-parser-schema-id: <anonymous-schema-136>
        title: Level 3 Book Update Event
        description: Level 3 orderbook update - individual order quantities (t="3")
        example: |-
          {
            "t": "3",
            "ts": 1609459200,
            "tn": 123456789,
            "s": "XAU-PERP",
            "b": [
              {
                "p": "49999.50",
                "q": 500,
                "o": [
                  200,
                  150,
                  100,
                  50
                ]
              },
              {
                "p": "49999.00",
                "q": 300,
                "o": [
                  150,
                  100,
                  50
                ]
              },
              {
                "p": "49998.50",
                "q": 200,
                "o": [
                  100,
                  100
                ]
              }
            ],
            "a": [
              {
                "p": "50000.50",
                "q": 300,
                "o": [
                  150,
                  100,
                  50
                ]
              },
              {
                "p": "50001.00",
                "q": 400,
                "o": [
                  200,
                  150,
                  50
                ]
              },
              {
                "p": "50001.50",
                "q": 250,
                "o": [
                  150,
                  100
                ]
              }
            ],
            "st": true
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: l3BookUpdateEvent
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
  - *ref_3
sendMessages:
  - *ref_4
  - *ref_5
  - *ref_6
  - *ref_7
  - *ref_8
  - *ref_9
receiveMessages:
  - *ref_10
  - *ref_11
  - *ref_12
  - *ref_13
  - *ref_14
  - *ref_15
  - *ref_16
  - *ref_17
  - *ref_18
  - *ref_19
extensions:
  - id: x-parser-unique-object-id
    value: marketdata
securitySchemes: []

````