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

# Public

> The public channel is used for subscribing to market data.



## AsyncAPI

````yaml api-reference/websocket/asyncapi.yaml public
id: public
title: Public
description: The public channel is used for subscribing to market data.
servers:
  - id: production
    protocol: wss
    host: api.ekiden.fi
    bindings: []
    variables: []
  - id: staging
    protocol: wss
    host: api.staging.ekiden.fi
    bindings: []
    variables: []
address: /ws/public
parameters: []
bindings: []
operations:
  - &ref_20
    id: sendSubscribe
    title: Send subscribe
    type: receive
    messages:
      - &ref_28
        id: SubscribeRequest
        payload:
          - name: Subscribe
            description: >-
              Subscribe to topics. Server will respond with a `Subscribed`
              message.
            type: object
            properties:
              - name: op
                type: string
                description: subscribe
                required: true
              - name: args
                type: array
                required: true
                properties:
                  - name: item
                    type: string
                    description: >-
                      Subscription topic string (e.g. 'ticker.BTC-USDC',
                      'orderbook.10.BTC-USDC', 'insurance_pool.BTC-USDC',
                      'position').
                    examples: &ref_0
                      - orderbook.10.BTC-USDC
                      - trade.BTC-USDC
                      - ticker.BTC-USDC
                      - kline.1m.BTC-USDC
                      - all_liquidations.BTC-USDC
                      - insurance_pool.BTC-USDC
                      - adl_alert.BTC-USDC
                      - order
                      - position
                      - execution
                      - account_balance
                    required: false
              - name: req_id
                type: &ref_1
                  - string
                  - 'null'
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            op:
              type: string
              const: subscribe
              x-parser-schema-id: <anonymous-schema-2>
            args:
              type: array
              items: &ref_3
                type: string
                description: >-
                  Subscription topic string (e.g. 'ticker.BTC-USDC',
                  'orderbook.10.BTC-USDC', 'insurance_pool.BTC-USDC',
                  'position').
                pattern: >-
                  ^(orderbook\.[^.]+\.[^.]+|trade\.[^.]+|ticker\.[^.]+|kline\.[^.]+\.[^.]+|all_liquidations\.[^.]+|insurance_pool\.[^.]+|adl_alert\.[^.]+|order|position|execution|account_balance)$
                examples: *ref_0
                x-parser-schema-id: Topic
              x-parser-schema-id: <anonymous-schema-3>
            req_id:
              type: *ref_1
              x-parser-schema-id: <anonymous-schema-4>
          required:
            - op
            - args
          x-parser-schema-id: <anonymous-schema-1>
        title: Subscribe
        description: Subscribe to topics. Server will respond with a `Subscribed` message.
        example: |-
          {
            "op": "<string>",
            "args": {
              "item": "<string>"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: SubscribeRequest
          - id: x-parser-message-name
            value: SubscribeRequest
    bindings: []
    extensions: &ref_4
      - id: x-parser-unique-object-id
        value: public
  - &ref_21
    id: sendUnsubscribe
    title: Send unsubscribe
    type: receive
    messages:
      - &ref_29
        id: UnsubscribeRequest
        payload:
          - name: Unsubscribe
            description: >-
              Unsubscribe from topics. Server will respond with an
              `Unsubscribed` message.
            type: object
            properties:
              - name: req_id
                type: &ref_2
                  - string
                  - 'null'
                required: false
              - name: op
                type: string
                description: unsubscribe
                required: true
              - name: args
                type: array
                required: true
                properties:
                  - name: item
                    type: string
                    description: >-
                      Subscription topic string (e.g. 'ticker.BTC-USDC',
                      'orderbook.10.BTC-USDC', 'insurance_pool.BTC-USDC',
                      'position').
                    examples: *ref_0
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            req_id:
              type: *ref_2
              x-parser-schema-id: <anonymous-schema-6>
            op:
              type: string
              const: unsubscribe
              x-parser-schema-id: <anonymous-schema-7>
            args:
              type: array
              items: *ref_3
              x-parser-schema-id: <anonymous-schema-8>
          required:
            - op
            - args
          x-parser-schema-id: <anonymous-schema-5>
        title: Unsubscribe
        description: >-
          Unsubscribe from topics. Server will respond with an `Unsubscribed`
          message.
        example: |-
          {
            "op": "<string>",
            "args": {
              "item": "<string>"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: UnsubscribeRequest
          - id: x-parser-message-name
            value: UnsubscribeRequest
    bindings: []
    extensions: *ref_4
  - &ref_22
    id: sendPing
    title: Send ping
    type: receive
    messages:
      - &ref_30
        id: PingRequest
        payload:
          - name: Ping
            description: >-
              Ping the server. The server will respond with a `Pong` message.
              Client can use `ts` to measure RTT.
            type: object
            properties:
              - name: op
                type: string
                description: ping
                required: true
              - name: req_id
                type: &ref_5
                  - string
                  - 'null'
                required: false
              - name: ts
                type: &ref_6
                  - integer
                  - 'null'
                description: Client timestamp in Unix milliseconds (ms since epoch)
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            op:
              type: string
              const: ping
              x-parser-schema-id: <anonymous-schema-10>
            req_id:
              type: *ref_5
              x-parser-schema-id: <anonymous-schema-11>
            ts:
              type: *ref_6
              description: Client timestamp in Unix milliseconds (ms since epoch)
              minimum: 0
              format: uint64
              x-parser-schema-id: <anonymous-schema-12>
          required:
            - op
          x-parser-schema-id: <anonymous-schema-9>
        title: Ping
        description: >-
          Ping the server. The server will respond with a `Pong` message. Client
          can use `ts` to measure RTT.
        example: |-
          {
            "op": "<string>"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: PingRequest
          - id: x-parser-message-name
            value: PingRequest
    bindings: []
    extensions: *ref_4
  - &ref_23
    id: receiveSubscribed
    title: Receive subscribed
    type: send
    messages:
      - &ref_31
        id: Subscribed
        payload:
          - name: Subscribed
            description: Subscription acknowledgement.
            type: object
            properties:
              - name: op
                type: string
                description: subscribed
                required: true
              - name: req_id
                type: &ref_7
                  - string
                  - 'null'
                required: false
              - name: args
                type: array
                required: true
                properties:
                  - name: item
                    type: string
                    description: >-
                      Subscription topic string (e.g. 'ticker.BTC-USDC',
                      'orderbook.10.BTC-USDC', 'insurance_pool.BTC-USDC',
                      'position').
                    examples: *ref_0
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            op:
              type: string
              const: subscribed
              x-parser-schema-id: <anonymous-schema-14>
            req_id:
              type: *ref_7
              x-parser-schema-id: <anonymous-schema-15>
            args:
              type: array
              items: *ref_3
              x-parser-schema-id: <anonymous-schema-16>
          required:
            - op
            - args
          x-parser-schema-id: <anonymous-schema-13>
        title: Subscribed
        description: Subscription acknowledgement.
        example: |-
          {
            "op": "<string>",
            "args": {
              "item": "<string>"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: Subscribed
          - id: x-parser-message-name
            value: Subscribed
    bindings: []
    extensions: *ref_4
  - &ref_24
    id: receiveUnsubscribed
    title: Receive unsubscribed
    type: send
    messages:
      - &ref_32
        id: Unsubscribed
        payload:
          - name: Unsubscribed
            description: Unsubscribe acknowledgement.
            type: object
            properties:
              - name: req_id
                type: &ref_8
                  - string
                  - 'null'
                required: false
              - name: op
                type: string
                description: unsubscribed
                required: true
              - name: args
                type: array
                required: true
                properties:
                  - name: item
                    type: string
                    description: >-
                      Subscription topic string (e.g. 'ticker.BTC-USDC',
                      'orderbook.10.BTC-USDC', 'insurance_pool.BTC-USDC',
                      'position').
                    examples: *ref_0
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            req_id:
              type: *ref_8
              x-parser-schema-id: <anonymous-schema-18>
            op:
              type: string
              const: unsubscribed
              x-parser-schema-id: <anonymous-schema-19>
            args:
              type: array
              items: *ref_3
              x-parser-schema-id: <anonymous-schema-20>
          required:
            - op
            - args
          x-parser-schema-id: <anonymous-schema-17>
        title: Unsubscribed
        description: Unsubscribe acknowledgement.
        example: |-
          {
            "op": "<string>",
            "args": {
              "item": "<string>"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: Unsubscribed
          - id: x-parser-message-name
            value: Unsubscribed
    bindings: []
    extensions: *ref_4
  - &ref_25
    id: receivePong
    title: Receive pong
    type: send
    messages:
      - &ref_33
        id: Pong
        payload:
          - name: Pong
            description: Response to `Ping`.
            type: object
            properties:
              - name: client_ts
                type: &ref_9
                  - integer
                  - 'null'
                required: false
              - name: req_id
                type: &ref_10
                  - string
                  - 'null'
                required: false
              - name: op
                type: string
                description: pong
                required: true
              - name: server_ts
                type: integer
                description: Server timestamp in Unix milliseconds (ms since epoch)
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            client_ts:
              type: *ref_9
              minimum: 0
              format: uint64
              x-parser-schema-id: <anonymous-schema-22>
            req_id:
              type: *ref_10
              x-parser-schema-id: <anonymous-schema-23>
            op:
              type: string
              const: pong
              x-parser-schema-id: <anonymous-schema-24>
            server_ts:
              type: integer
              description: Server timestamp in Unix milliseconds (ms since epoch)
              minimum: 0
              format: uint64
              x-parser-schema-id: <anonymous-schema-25>
          required:
            - op
            - server_ts
          x-parser-schema-id: <anonymous-schema-21>
        title: Pong
        description: Response to `Ping`.
        example: |-
          {
            "op": "<string>",
            "server_ts": 123
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: Pong
          - id: x-parser-message-name
            value: Pong
    bindings: []
    extensions: *ref_4
  - &ref_26
    id: receiveError
    title: Receive error
    type: send
    messages:
      - &ref_34
        id: Error
        payload:
          - name: Error
            description: Error response.
            type: object
            properties:
              - name: req_id
                type: &ref_11
                  - string
                  - 'null'
                required: false
              - name: op
                type: string
                description: error
                required: true
              - name: message
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            req_id:
              type: *ref_11
              x-parser-schema-id: <anonymous-schema-27>
            op:
              type: string
              const: error
              x-parser-schema-id: <anonymous-schema-28>
            message:
              type: string
              x-parser-schema-id: <anonymous-schema-29>
          required:
            - op
            - message
          x-parser-schema-id: <anonymous-schema-26>
        title: Error
        description: Error response.
        example: |-
          {
            "op": "<string>",
            "message": "<string>"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: Error
          - id: x-parser-message-name
            value: Error
    bindings: []
    extensions: *ref_4
  - &ref_27
    id: receiveEvent
    title: Receive event
    type: send
    messages:
      - &ref_35
        id: Event
        payload:
          - name: Event
            description: Streaming event message.
            type: object
            properties:
              - name: server_ts_ms
                type: integer
                required: true
              - name: op
                type: string
                description: event
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            server_ts_ms:
              type: integer
              format: uint64
              minimum: 0
              x-parser-schema-id: <anonymous-schema-31>
            op:
              type: string
              const: event
              x-parser-schema-id: <anonymous-schema-32>
          required:
            - op
            - server_ts_ms
          anyOf:
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - snapshot
                    - delta
                  x-parser-schema-id: OrderbookUpdateType
                data:
                  description: Order book Snapshot at a specific point in time.
                  type: object
                  properties:
                    s:
                      description: Symbol name
                      type: string
                      x-parser-schema-id: <anonymous-schema-34>
                    ts:
                      description: The timestamp (ms) that the system generates the data
                      type: integer
                      format: int64
                      x-parser-schema-id: <anonymous-schema-35>
                    b:
                      description: Bid levels
                      type: array
                      items: &ref_12
                        description: Order book level consisting of price and size.
                        type: array
                        prefixItems:
                          - type: string
                          - type: string
                        minItems: 2
                        maxItems: 2
                        x-parser-schema-id: OrderBookLevel
                      x-parser-schema-id: <anonymous-schema-36>
                    a:
                      description: Ask levels
                      type: array
                      items: *ref_12
                      x-parser-schema-id: <anonymous-schema-37>
                    u:
                      description: Update ID, is always in sequence
                      type: integer
                      format: uint64
                      minimum: 0
                      x-parser-schema-id: <anonymous-schema-38>
                    seq:
                      type: integer
                      format: uint64
                      minimum: 0
                      x-parser-schema-id: <anonymous-schema-39>
                    mts:
                      description: >-
                        The timestamp from the matching engine when this
                        orderbook data is produced.

                        It can be correlated with T from public trade channel
                      type: integer
                      format: int64
                      x-parser-schema-id: <anonymous-schema-40>
                  required:
                    - s
                    - ts
                    - b
                    - a
                    - u
                    - seq
                    - mts
                  x-parser-schema-id: OrderBookSnapshot
                topic: *ref_3
              required:
                - topic
                - type
                - data
              x-parser-schema-id: <anonymous-schema-33>
            - type: object
              properties:
                data:
                  type: array
                  items:
                    description: A single trade entry from the public trade stream.
                    type: object
                    properties:
                      i:
                        description: Trade ID.
                        type: string
                        x-parser-schema-id: <anonymous-schema-43>
                      s:
                        description: Symbol name.
                        type: string
                        x-parser-schema-id: <anonymous-schema-44>
                      S: &ref_13
                        description: 'Order side: buy or sell.'
                        oneOf:
                          - description: 'Sell side: short'
                            type: string
                            const: Sell
                            x-parser-schema-id: <anonymous-schema-45>
                          - description: 'Buy side: long'
                            type: string
                            const: Buy
                            x-parser-schema-id: <anonymous-schema-46>
                        x-parser-schema-id: Side
                      v:
                        description: Trade size.
                        type: string
                        x-parser-schema-id: <anonymous-schema-47>
                      p:
                        description: Trade price.
                        type: string
                        x-parser-schema-id: <anonymous-schema-48>
                      seq:
                        description: Cross sequence.
                        type: integer
                        format: uint64
                        minimum: 0
                        x-parser-schema-id: <anonymous-schema-49>
                      T:
                        description: The timestamp (ms) that the order is filled.
                        type: integer
                        format: uint64
                        minimum: 0
                        x-parser-schema-id: <anonymous-schema-50>
                    required:
                      - i
                      - s
                      - S
                      - v
                      - p
                      - seq
                      - T
                    x-parser-schema-id: PublicTrade
                  x-parser-schema-id: <anonymous-schema-42>
                topic: *ref_3
              required:
                - topic
                - data
              x-parser-schema-id: <anonymous-schema-41>
            - type: object
              properties:
                topic: *ref_3
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      symbol:
                        type: string
                        x-parser-schema-id: <anonymous-schema-53>
                      side:
                        type: string
                        x-parser-schema-id: <anonymous-schema-54>
                      exec_size:
                        type: string
                        x-parser-schema-id: <anonymous-schema-55>
                      bust_price:
                        type: string
                        x-parser-schema-id: <anonymous-schema-56>
                      timestamp:
                        type: integer
                        format: uint64
                        minimum: 0
                        x-parser-schema-id: <anonymous-schema-57>
                      reason:
                        type:
                          - string
                          - 'null'
                        x-parser-schema-id: <anonymous-schema-58>
                    required:
                      - symbol
                      - side
                      - exec_size
                      - bust_price
                      - timestamp
                    x-parser-schema-id: Liquidation
                  x-parser-schema-id: <anonymous-schema-52>
              required:
                - topic
                - data
              x-parser-schema-id: <anonymous-schema-51>
            - type: object
              properties:
                data:
                  type: object
                  properties:
                    pool_id:
                      type: string
                      x-parser-schema-id: <anonymous-schema-60>
                    pool_group_id:
                      type: string
                      x-parser-schema-id: <anonymous-schema-61>
                    cash_balance:
                      type: string
                      x-parser-schema-id: <anonymous-schema-62>
                    realized_pnl_cum:
                      type: string
                      x-parser-schema-id: <anonymous-schema-63>
                    unrealized_pnl:
                      type: string
                      x-parser-schema-id: <anonymous-schema-64>
                    base_equity:
                      type: string
                      x-parser-schema-id: <anonymous-schema-65>
                    equity:
                      type: string
                      x-parser-schema-id: <anonymous-schema-66>
                    group_redistribution_in:
                      type: string
                      x-parser-schema-id: <anonymous-schema-67>
                    group_redistribution_out:
                      type: string
                      x-parser-schema-id: <anonymous-schema-68>
                    group_adl_obligation:
                      type: string
                      x-parser-schema-id: <anonymous-schema-69>
                    adl_mode:
                      type: string
                      x-parser-schema-id: <anonymous-schema-70>
                    adl_trigger_reason:
                      type:
                        - string
                        - 'null'
                      x-parser-schema-id: <anonymous-schema-71>
                    latest_pnl_ratio:
                      type:
                        - string
                        - 'null'
                      x-parser-schema-id: <anonymous-schema-72>
                    updated_time:
                      type: integer
                      format: int64
                      x-parser-schema-id: <anonymous-schema-73>
                    inventory:
                      type: array
                      items:
                        type: object
                        properties:
                          symbol:
                            type: string
                            x-parser-schema-id: <anonymous-schema-75>
                          side: *ref_13
                          size:
                            type: string
                            x-parser-schema-id: <anonymous-schema-76>
                          avg_entry_price:
                            type: string
                            x-parser-schema-id: <anonymous-schema-77>
                          unrealized_pnl:
                            type: string
                            x-parser-schema-id: <anonymous-schema-78>
                        required:
                          - symbol
                          - side
                          - size
                          - avg_entry_price
                          - unrealized_pnl
                        x-parser-schema-id: InsurancePoolInventoryPosition
                      x-parser-schema-id: <anonymous-schema-74>
                  required:
                    - pool_id
                    - pool_group_id
                    - cash_balance
                    - realized_pnl_cum
                    - unrealized_pnl
                    - base_equity
                    - equity
                    - group_redistribution_in
                    - group_redistribution_out
                    - group_adl_obligation
                    - adl_mode
                    - updated_time
                    - inventory
                  x-parser-schema-id: InsurancePoolSnapshot
                topic: *ref_3
              required:
                - topic
                - data
              x-parser-schema-id: <anonymous-schema-59>
            - type: object
              properties:
                data:
                  type: object
                  properties:
                    pool_id:
                      type: string
                      x-parser-schema-id: <anonymous-schema-80>
                    pool_group_id:
                      type: string
                      x-parser-schema-id: <anonymous-schema-81>
                    symbol:
                      type: string
                      x-parser-schema-id: <anonymous-schema-82>
                    adl_mode:
                      type: string
                      x-parser-schema-id: <anonymous-schema-83>
                    adl_trigger_reason:
                      type:
                        - string
                        - 'null'
                      x-parser-schema-id: <anonymous-schema-84>
                    latest_pnl_ratio:
                      type:
                        - string
                        - 'null'
                      x-parser-schema-id: <anonymous-schema-85>
                    equity:
                      type: string
                      x-parser-schema-id: <anonymous-schema-86>
                    updated_time:
                      type: integer
                      format: int64
                      x-parser-schema-id: <anonymous-schema-87>
                  required:
                    - pool_id
                    - pool_group_id
                    - symbol
                    - adl_mode
                    - equity
                    - updated_time
                  x-parser-schema-id: AdlAlertSnapshot
                topic: *ref_3
              required:
                - topic
                - data
              x-parser-schema-id: <anonymous-schema-79>
            - type: object
              properties:
                topic: *ref_3
                data:
                  description: >-
                    Query for the latest price snapshot, best bid/ask price, and
                    trading volume in the last 24 hours.
                  type: object
                  properties:
                    symbol:
                      description: Symbol name
                      type: string
                      x-parser-schema-id: <anonymous-schema-89>
                    addr:
                      description: Market address
                      type: string
                      x-parser-schema-id: <anonymous-schema-90>
                    last_price:
                      description: Last traded price
                      type: string
                      x-parser-schema-id: <anonymous-schema-91>
                    index_price:
                      description: Index price
                      type: string
                      x-parser-schema-id: <anonymous-schema-92>
                    mark_price:
                      description: Mark price
                      type: string
                      x-parser-schema-id: <anonymous-schema-93>
                    prev_price_24h:
                      description: Market price 24 hours ago
                      type: string
                      x-parser-schema-id: <anonymous-schema-94>
                    high_price_24h:
                      description: The highest price in the last 24 hours
                      type: string
                      x-parser-schema-id: <anonymous-schema-95>
                    low_price_24h:
                      description: The lowest price in the last 24 hours
                      type: string
                      x-parser-schema-id: <anonymous-schema-96>
                    prev_price_1h:
                      description: Market price 1 hour ago
                      type: string
                      x-parser-schema-id: <anonymous-schema-97>
                    volume_24h:
                      description: Volume for 24h
                      type: string
                      x-parser-schema-id: <anonymous-schema-98>
                    turnover_24h:
                      description: Turnover for 24h
                      type: string
                      x-parser-schema-id: <anonymous-schema-99>
                    open_interest:
                      description: Open interest size
                      type: string
                      x-parser-schema-id: <anonymous-schema-100>
                    open_interest_value:
                      description: Open interest value
                      type: string
                      x-parser-schema-id: <anonymous-schema-101>
                    funding_rate:
                      description: Funding rate
                      type: string
                      x-parser-schema-id: <anonymous-schema-102>
                    next_funding_time:
                      description: Next funding time (ms)
                      type: integer
                      format: int64
                      x-parser-schema-id: <anonymous-schema-103>
                    best_ask_size:
                      description: Best ask size
                      type: string
                      x-parser-schema-id: <anonymous-schema-104>
                    best_ask_price:
                      description: Best ask price
                      type: string
                      x-parser-schema-id: <anonymous-schema-105>
                    best_bid_size:
                      description: Best bid size
                      type: string
                      x-parser-schema-id: <anonymous-schema-106>
                    best_bid_price:
                      description: Best bid price
                      type: string
                      x-parser-schema-id: <anonymous-schema-107>
                  required:
                    - symbol
                    - addr
                    - last_price
                    - index_price
                    - mark_price
                    - prev_price_24h
                    - high_price_24h
                    - low_price_24h
                    - prev_price_1h
                    - volume_24h
                    - turnover_24h
                    - open_interest
                    - open_interest_value
                    - funding_rate
                    - next_funding_time
                    - best_ask_size
                    - best_ask_price
                    - best_bid_size
                    - best_bid_price
                  x-parser-schema-id: TickerSnapshot
              required:
                - topic
                - data
              x-parser-schema-id: <anonymous-schema-88>
            - type: object
              properties:
                data:
                  type: object
                  properties:
                    t:
                      description: Candle open time (ms).
                      type: integer
                      format: int64
                      x-parser-schema-id: <anonymous-schema-109>
                    i:
                      type: string
                      enum:
                        - 1m
                        - 3m
                        - 5m
                        - 15m
                        - 30m
                        - 1h
                        - 2h
                        - 4h
                        - 6h
                        - 12h
                        - 1d
                        - 3d
                        - 1w
                        - 1M
                      x-parser-schema-id: Interval
                    o:
                      description: >-
                        Open - the price of the first trade in this candle
                        (opening price).
                      type: string
                      x-parser-schema-id: <anonymous-schema-110>
                    h:
                      description: High - the highest trade price within this interval.
                      type: string
                      x-parser-schema-id: <anonymous-schema-111>
                    l:
                      description: Low - the minimum trade price within this interval.
                      type: string
                      x-parser-schema-id: <anonymous-schema-112>
                    c:
                      description: >-
                        Close - the price of the last trade in this candle
                        (closing price).
                      type: string
                      x-parser-schema-id: <anonymous-schema-113>
                    T:
                      description: Candle close time (ms).
                      type: integer
                      format: int64
                      x-parser-schema-id: <anonymous-schema-114>
                    v:
                      description: Volume. the trading volume for the candle
                      type: string
                      x-parser-schema-id: <anonymous-schema-115>
                    V:
                      description: Taker buy base asset volume. Binance `V` field.
                      type: string
                      x-parser-schema-id: <anonymous-schema-116>
                    Q:
                      description: Taker buy quote asset volume. Binance `Q` field.
                      type: string
                      x-parser-schema-id: <anonymous-schema-117>
                    'n':
                      description: >-
                        Trade count. The number of trades included in this
                        candle
                      type: string
                      x-parser-schema-id: <anonymous-schema-118>
                  required:
                    - t
                    - i
                    - o
                    - h
                    - l
                    - c
                    - T
                    - v
                    - V
                    - Q
                    - 'n'
                  x-parser-schema-id: KlineSnapshot
                topic: *ref_3
              required:
                - topic
                - data
              x-parser-schema-id: <anonymous-schema-108>
            - type: object
              properties:
                topic: *ref_3
                data:
                  type: array
                  items:
                    description: Summary information about an order.
                    type: object
                    properties:
                      order_id:
                        type: string
                        format: uuid
                        x-parser-schema-id: <anonymous-schema-121>
                      order_link_id:
                        type:
                          - string
                          - 'null'
                        x-parser-schema-id: <anonymous-schema-122>
                      symbol:
                        type: string
                        x-parser-schema-id: <anonymous-schema-123>
                      sub_account_address:
                        type: string
                        x-parser-schema-id: <anonymous-schema-124>
                      price:
                        type: string
                        x-parser-schema-id: <anonymous-schema-125>
                      qty:
                        type: string
                        x-parser-schema-id: <anonymous-schema-126>
                      side: *ref_13
                      margin_mode: &ref_19
                        type: string
                        enum:
                          - Cross
                          - Isolated
                        x-parser-schema-id: MarginMode
                      order_status:
                        oneOf:
                          - type: string
                            enum:
                              - New
                              - PartiallyFilled
                              - Untriggered
                              - Rejected
                              - PartiallyFilledCanceled
                              - Filled
                              - Canceled
                              - Triggered
                              - Deactivated
                              - Expired
                            x-parser-schema-id: <anonymous-schema-127>
                          - description: >-
                              Cancel requested by user/admin/system, pending
                              matching confirmation.
                            type: string
                            const: CancelRequested
                            x-parser-schema-id: <anonymous-schema-128>
                        x-parser-schema-id: OrderStatus
                      create_type:
                        anyOf:
                          - &ref_16
                            type: string
                            enum:
                              - CreateByUser
                              - CreateByFutureSpread
                              - CreateByAdminClosing
                              - CreateBySettle
                              - CreateByStopOrder
                              - CreateByTakeProfit
                              - CreateByPartialTakeProfit
                              - CreateByStopLoss
                              - CreateByPartialStopLoss
                              - CreateByTrailingStop
                              - CreateByTrailingProfit
                              - CreateByLiq
                              - CreateByTakeOverPassThrough
                              - CreateByAdlPassThrough
                              - CreateByBlockPassThrough
                              - CreateByBlockTradeMovePositionPassThrough
                              - CreateByClosing
                              - CreateByFGridBot
                              - CloseByFGridBot
                              - CreateByTWAP
                              - CreateByTVSignal
                              - CreateByMmRateClose
                              - CreateByMartingaleBot
                              - CloseByMartingaleBot
                              - CreateByIceBerg
                              - CreateByArbitrage
                              - CreateByDdh
                              - CreateByBboOrder
                            x-parser-schema-id: CreateType
                          - type: 'null'
                            x-parser-schema-id: <anonymous-schema-130>
                        x-parser-schema-id: <anonymous-schema-129>
                      cancel_type:
                        anyOf:
                          - description: Reason/Source of the order cancellation.
                            type: string
                            enum:
                              - CancelByUser
                              - CancelByAdmin
                              - CancelBySystem
                              - CancelByReduceOnly
                              - CancelByPrepareLiq
                              - CancelAllBeforeLiq
                              - CancelByPrepareAdl
                              - CancelAllBeforeAdl
                              - CancelBySettle
                              - CancelByTpSlTsClear
                              - CancelBySmp
                              - CancelByDcp
                              - CancelByRebalance
                              - CancelByOcoTpCanceledBySlTriggered
                              - CancelByOcoSlCanceledByTpTriggered
                            x-parser-schema-id: CancelType
                          - type: 'null'
                            x-parser-schema-id: <anonymous-schema-132>
                        x-parser-schema-id: <anonymous-schema-131>
                      reject_reason:
                        anyOf:
                          - type: string
                            enum:
                              - EcNoError
                              - EcOthers
                              - EcInsufficientFunds
                              - EcUnknownMessageType
                              - EcMissingClOrdId
                              - EcMissingOrigClOrdId
                              - EcClOrdIdOrigClOrdIdAreTheSame
                              - EcDuplicatedClOrdId
                              - EcOrigClOrdIdDoesNotExist
                              - EcTooLateToCancel
                              - EcUnknownOrderType
                              - EcUnknownSide
                              - EcUnknownTimeInForce
                              - EcWronglyRouted
                              - EcMarketOrderPriceIsNotZero
                              - EcLimitOrderInvalidPrice
                              - EcNoEnoughQtyToFill
                              - EcNoImmediateQtyToFill
                              - EcPerCancelRequest
                              - EcMarketOrderCannotBePostOnly
                              - EcPostOnlyWillTakeLiquidity
                              - EcReduceOnlyNoPosition
                              - EcReduceOnlyWouldIncreasePosition
                              - EcReduceOnlyExceedsPosition
                              - EcReduceOnlyMode
                              - EcTradingHalted
                              - EcCancelReplaceOrder
                              - EcInvalidSymbolStatus
                              - EcCancelForNoFullFill
                              - EcBySelfMatch
                              - EcInCallAuctionStatus
                              - EcQtyCannotBeZero
                              - EcMarketOrderNoSupportTif
                              - EcReachMaxTradeNum
                              - EcInvalidPriceScale
                              - EcBitIndexInvalid
                              - EcStopBySelfMatch
                              - EcInvalidSmpType
                              - EcCancelByMmp
                              - EcInvalidUserType
                              - EcInvalidMirrorOid
                              - EcInvalidMirrorUid
                              - EcEcInvalidQty
                              - EcInvalidAmount
                              - EcLoadOrderCancel
                              - EcMarketQuoteNoSuppSell
                              - EcDisorderOrderId
                              - EcInvalidBaseValue
                              - EcLoadOrderCanMatch
                              - EcSecurityStatusFail
                              - EcReachRiskPriceLimit
                              - EcOrderNotExist
                              - EcCancelByOrderValueZero
                              - EcCancelByMatchValueZero
                              - EcReachMarketPriceLimit
                            x-parser-schema-id: RejectReason
                          - type: 'null'
                            x-parser-schema-id: <anonymous-schema-134>
                        x-parser-schema-id: <anonymous-schema-133>
                      avg_price:
                        description: >-
                          Average price at which part (or all) of the order has
                          been executed (i.e. filled)
                        type: string
                        x-parser-schema-id: <anonymous-schema-135>
                      leaves_qty:
                        description: >-
                          Remaining quantity from the order that has not yet
                          been executed
                        type: string
                        x-parser-schema-id: <anonymous-schema-136>
                      leaves_value:
                        description: >-
                          Estimated value of the remaining quantity (leavesQty)

                          that remains unfilled. Basically: how much the
                          unfilled portion is “worth”
                        type: string
                        x-parser-schema-id: <anonymous-schema-137>
                      cum_exec_qty:
                        description: >-
                          Cumulative executed quantity: total amount of the
                          order

                          that has already been filled/executed so far
                        type: string
                        x-parser-schema-id: <anonymous-schema-138>
                      cum_exec_value:
                        description: >-
                          Cumulative executed value: the total value
                          corresponding to the part of

                          the order that has already been filled. Basically: how
                          much worth in total has been executed so far
                        type: string
                        x-parser-schema-id: <anonymous-schema-139>
                      cum_exec_fee:
                        description: >-
                          Cumulative executed trading fee: the total fees
                          charged so far for the executed portion of this order
                        type: string
                        x-parser-schema-id: <anonymous-schema-140>
                      closed_pnl:
                        description: |-
                          Closed profit and loss for each close position order.
                          Valid only in order WebSocket
                        type:
                          - string
                          - 'null'
                        x-parser-schema-id: <anonymous-schema-141>
                      time_in_force:
                        description: Time in Force instructions.
                        oneOf:
                          - description: Good Till Cancel
                            type: string
                            const: GTC
                            x-parser-schema-id: <anonymous-schema-142>
                          - description: Immediate or Cancel
                            type: string
                            const: IOC
                            x-parser-schema-id: <anonymous-schema-143>
                          - description: Fill or Kill
                            type: string
                            const: FOK
                            x-parser-schema-id: <anonymous-schema-144>
                          - description: Good Till Date
                            type: object
                            properties:
                              GTD:
                                type: integer
                                format: uint64
                                minimum: 0
                                x-parser-schema-id: <anonymous-schema-146>
                            required:
                              - GTD
                            additionalProperties: false
                            x-parser-schema-id: <anonymous-schema-145>
                          - description: Good For Day
                            type: string
                            const: Day
                            x-parser-schema-id: <anonymous-schema-147>
                        x-parser-schema-id: TimeInForce
                      expire_time:
                        description: >-
                          Expiration time for orders with a time-in-force of
                          Good-Til-Date (GTD)
                        type:
                          - integer
                          - 'null'
                        format: int64
                        default: null
                        x-parser-schema-id: <anonymous-schema-148>
                      order_type: &ref_17
                        description: 'Order type: Limit, Market.'
                        type: string
                        enum:
                          - Limit
                          - Market
                        x-parser-schema-id: OrderType
                      stop_order_type:
                        description: >-
                          Stop order type. For example, Stop Market or Stop
                          Limit.
                        anyOf:
                          - &ref_18
                            type: string
                            enum:
                              - TakeProfit
                              - StopLoss
                              - TrailingStop
                              - Stop
                              - PartialTakeProfit
                              - PartialStopLoss
                              - TpslOrder
                              - OcoOrder
                              - MmRateClose
                              - BidirectionalTpslOrder
                            x-parser-schema-id: StopOrderType
                          - type: 'null'
                            x-parser-schema-id: <anonymous-schema-150>
                        x-parser-schema-id: <anonymous-schema-149>
                      tpsl:
                        description: Take Profit / Stop Loss details if set
                        anyOf:
                          - type: object
                            properties:
                              mode:
                                type: string
                                enum:
                                  - Full
                                  - Partial
                                x-parser-schema-id: TpSlMode
                              take_profit:
                                anyOf:
                                  - &ref_15
                                    oneOf:
                                      - type: object
                                        properties:
                                          market:
                                            type: object
                                            properties:
                                              trigger_price:
                                                type: string
                                                x-parser-schema-id: <anonymous-schema-155>
                                              trigger_by: &ref_14
                                                type: string
                                                enum:
                                                  - LastPrice
                                                  - IndexPrice
                                                  - MarkPrice
                                                x-parser-schema-id: TriggerBy
                                            required:
                                              - trigger_price
                                              - trigger_by
                                            x-parser-schema-id: <anonymous-schema-154>
                                        required:
                                          - market
                                        additionalProperties: false
                                        x-parser-schema-id: <anonymous-schema-153>
                                      - type: object
                                        properties:
                                          limit:
                                            type: object
                                            properties:
                                              trigger_price:
                                                type: string
                                                x-parser-schema-id: <anonymous-schema-158>
                                              limit_price:
                                                type: string
                                                x-parser-schema-id: <anonymous-schema-159>
                                              trigger_by: *ref_14
                                            required:
                                              - trigger_price
                                              - limit_price
                                              - trigger_by
                                            x-parser-schema-id: <anonymous-schema-157>
                                        required:
                                          - limit
                                        additionalProperties: false
                                        x-parser-schema-id: <anonymous-schema-156>
                                    x-parser-schema-id: TpSlSpec
                                  - type: 'null'
                                    x-parser-schema-id: <anonymous-schema-160>
                                x-parser-schema-id: <anonymous-schema-152>
                              stop_loss:
                                anyOf:
                                  - *ref_15
                                  - type: 'null'
                                    x-parser-schema-id: <anonymous-schema-162>
                                x-parser-schema-id: <anonymous-schema-161>
                            required:
                              - mode
                            x-parser-schema-id: TpSl
                          - type: 'null'
                            x-parser-schema-id: <anonymous-schema-163>
                        x-parser-schema-id: <anonymous-schema-151>
                      trigger:
                        description: >-
                          Conditional order details if this is a conditional
                          order
                        anyOf:
                          - type: object
                            properties:
                              trigger_price:
                                description: The price level that activates the order.
                                type: string
                                x-parser-schema-id: <anonymous-schema-165>
                              trigger_direction:
                                type: string
                                enum:
                                  - Up
                                  - Down
                                x-parser-schema-id: TriggerDirection
                              trigger_by: *ref_14
                            required:
                              - trigger_price
                              - trigger_direction
                              - trigger_by
                            x-parser-schema-id: ConditionalOrder
                          - type: 'null'
                            x-parser-schema-id: <anonymous-schema-166>
                        x-parser-schema-id: <anonymous-schema-164>
                      last_price_on_created:
                        description: Last price at the time the order was created
                        type: string
                        x-parser-schema-id: <anonymous-schema-167>
                      post_only:
                        type: boolean
                        x-parser-schema-id: <anonymous-schema-168>
                      reduce_only:
                        type: boolean
                        x-parser-schema-id: <anonymous-schema-169>
                      close_on_trigger:
                        type: boolean
                        x-parser-schema-id: <anonymous-schema-170>
                      created_time:
                        type: integer
                        format: int64
                        x-parser-schema-id: <anonymous-schema-171>
                      updated_time:
                        type: integer
                        format: int64
                        x-parser-schema-id: <anonymous-schema-172>
                    required:
                      - order_id
                      - symbol
                      - sub_account_address
                      - price
                      - qty
                      - side
                      - margin_mode
                      - order_status
                      - avg_price
                      - leaves_qty
                      - leaves_value
                      - cum_exec_qty
                      - cum_exec_value
                      - cum_exec_fee
                      - time_in_force
                      - order_type
                      - last_price_on_created
                      - post_only
                      - reduce_only
                      - close_on_trigger
                      - created_time
                      - updated_time
                    x-parser-schema-id: Order
                  x-parser-schema-id: <anonymous-schema-120>
              required:
                - topic
                - data
              x-parser-schema-id: <anonymous-schema-119>
            - type: object
              properties:
                data:
                  type: array
                  items:
                    description: Single execution (trade fill) record.
                    type: object
                    properties:
                      exec_id:
                        description: Execution ID
                        type: string
                        format: uuid
                        x-parser-schema-id: <anonymous-schema-175>
                      symbol:
                        description: Symbol name, e.g. BTCUSDC
                        type: string
                        x-parser-schema-id: <anonymous-schema-176>
                      order_id:
                        type: string
                        format: uuid
                        x-parser-schema-id: <anonymous-schema-177>
                      order_link_id:
                        type:
                          - string
                          - 'null'
                        x-parser-schema-id: <anonymous-schema-178>
                      side: *ref_13
                      sub_account_address:
                        type: string
                        x-parser-schema-id: <anonymous-schema-179>
                      order_price:
                        description: Original order price
                        type: string
                        x-parser-schema-id: <anonymous-schema-180>
                      order_qty:
                        description: Original order quantity
                        type: string
                        x-parser-schema-id: <anonymous-schema-181>
                      leaves_qty:
                        description: Remaining quantity not yet executed after this fill
                        type: string
                        x-parser-schema-id: <anonymous-schema-182>
                      create_type:
                        description: Order create type
                        anyOf:
                          - *ref_16
                          - type: 'null'
                            x-parser-schema-id: <anonymous-schema-184>
                        x-parser-schema-id: <anonymous-schema-183>
                      order_type: *ref_17
                      stop_order_type:
                        description: Stop order type if this was a stop order
                        anyOf:
                          - *ref_18
                          - type: 'null'
                            x-parser-schema-id: <anonymous-schema-186>
                        x-parser-schema-id: <anonymous-schema-185>
                      exec_price:
                        description: Execution price
                        type: string
                        x-parser-schema-id: <anonymous-schema-187>
                      exec_qty:
                        description: Execution quantity
                        type: string
                        x-parser-schema-id: <anonymous-schema-188>
                      exec_value:
                        description: Executed value (price * qty)
                        type: string
                        x-parser-schema-id: <anonymous-schema-189>
                      exec_type:
                        description: Execution type for trade history entries.
                        oneOf:
                          - description: Regular trade execution.
                            type: string
                            const: Trade
                            x-parser-schema-id: <anonymous-schema-190>
                          - description: Auto-deleveraging.
                            type: string
                            const: AdlTrade
                            x-parser-schema-id: <anonymous-schema-191>
                          - description: Funding fee.
                            type: string
                            const: Funding
                            x-parser-schema-id: <anonymous-schema-192>
                          - description: Takeover liquidation.
                            type: string
                            const: BustTrade
                            x-parser-schema-id: <anonymous-schema-193>
                          - description: >-
                              USDC futures delivery; position closed by contract
                              delisted.
                            type: string
                            const: Delivery
                            x-parser-schema-id: <anonymous-schema-194>
                          - description: >-
                              Inverse futures settlement; position closed due to
                              delisting.
                            type: string
                            const: Settle
                            x-parser-schema-id: <anonymous-schema-195>
                          - description: Block trade.
                            type: string
                            const: BlockTrade
                            x-parser-schema-id: <anonymous-schema-196>
                          - description: Move position.
                            type: string
                            const: MovePosition
                            x-parser-schema-id: <anonymous-schema-197>
                          - description: Spread leg execution.
                            type: string
                            const: FutureSpread
                            x-parser-schema-id: <anonymous-schema-198>
                        x-parser-schema-id: ExecType
                      exec_time:
                        description: Executed timestamp (ms)
                        type: integer
                        format: int64
                        x-parser-schema-id: <anonymous-schema-199>
                      is_maker:
                        description: 'Is maker order. true: maker, false: taker'
                        type: boolean
                        x-parser-schema-id: <anonymous-schema-200>
                      fee_rate:
                        description: Trading fee rate
                        type: string
                        x-parser-schema-id: <anonymous-schema-201>
                      mark_price:
                        description: Mark price at execution
                        type: string
                        x-parser-schema-id: <anonymous-schema-202>
                      index_price:
                        description: Index price at execution
                        type: string
                        x-parser-schema-id: <anonymous-schema-203>
                      closed_size:
                        description: Closed position size
                        type:
                          - string
                          - 'null'
                        x-parser-schema-id: <anonymous-schema-204>
                      seq:
                        description: >-
                          Cross sequence, used to associate each fill and each
                          position update

                          * The seq will be the same when conclude multiple
                          transactions at the same time

                          * Different symbols may have the same seq, please use
                          seq + symbol to check unique
                        type: integer
                        format: uint64
                        minimum: 0
                        x-parser-schema-id: <anonymous-schema-205>
                    required:
                      - exec_id
                      - symbol
                      - order_id
                      - side
                      - sub_account_address
                      - order_price
                      - order_qty
                      - leaves_qty
                      - order_type
                      - exec_price
                      - exec_qty
                      - exec_value
                      - exec_type
                      - exec_time
                      - is_maker
                      - fee_rate
                      - mark_price
                      - index_price
                      - seq
                    x-parser-schema-id: Execution
                  x-parser-schema-id: <anonymous-schema-174>
                topic: *ref_3
              required:
                - topic
                - data
              x-parser-schema-id: <anonymous-schema-173>
            - type: object
              properties:
                topic: *ref_3
                data:
                  type: array
                  items:
                    description: >-
                      Position information.


                      * risk_id: numeric identifier of the current risk tier
                      your position is on for that symbol.

                      * risk_limit_value: the maximum position value allowed
                      under that tier (the tier’s limit). If your position value
                      grows beyond this, the tier steps up (higher
                      requirements).


                      Details:

                      * Meaning: Bybit enforces “risk limit tiers” to cap
                      position value and scale maintenance margin. The tier is
                      referenced by riskId, and its cap is riskLimitValue.

                      * Effects: Higher tiers allow larger positions but
                      increase maintenance margin and may constrain leverage.

                      * Portfolio margin note: In portfolio margin mode, both
                      fields are not meaningful and are returned as 0 (docs:
                      “risk limit rules are invalid”).
                    type: object
                    properties:
                      risk_id:
                        description: Risk tier ID
                        type: integer
                        format: uint8
                        minimum: 0
                        maximum: 255
                        x-parser-schema-id: <anonymous-schema-208>
                      risk_limit_value:
                        description: Risk limit value
                        type: string
                        x-parser-schema-id: <anonymous-schema-209>
                      symbol:
                        description: Symbol name
                        type: string
                        x-parser-schema-id: <anonymous-schema-210>
                      sub_account_address:
                        type: string
                        x-parser-schema-id: <anonymous-schema-211>
                      side: *ref_13
                      size:
                        description: Position size, always positive
                        type: string
                        x-parser-schema-id: <anonymous-schema-212>
                      avg_price:
                        description: Average entry price.
                        type: string
                        x-parser-schema-id: <anonymous-schema-213>
                      position_value:
                        description: Position value
                        type: string
                        x-parser-schema-id: <anonymous-schema-214>
                      margin_mode: *ref_19
                      position_balance:
                        description: Position margin
                        type: string
                        x-parser-schema-id: <anonymous-schema-215>
                      position_status:
                        type: string
                        enum:
                          - Normal
                          - Liq
                          - Adl
                        x-parser-schema-id: PositionStatus
                      leverage:
                        description: Position leverage
                        type: string
                        x-parser-schema-id: <anonymous-schema-216>
                      mark_price:
                        description: Mark price
                        type: string
                        x-parser-schema-id: <anonymous-schema-217>
                      liq_price:
                        description: Position liquidation price
                        type: string
                        x-parser-schema-id: <anonymous-schema-218>
                      bust_price:
                        description: Bankruptcy price
                        type: string
                        x-parser-schema-id: <anonymous-schema-219>
                      position_im:
                        description: Initial margin
                        type: string
                        x-parser-schema-id: <anonymous-schema-220>
                      position_im_by_mp:
                        description: Initial margin calculated by mark price
                        type: string
                        x-parser-schema-id: <anonymous-schema-221>
                      position_mm:
                        description: Maintenance margin
                        type: string
                        x-parser-schema-id: <anonymous-schema-222>
                      position_mm_by_mp:
                        description: Maintenance margin calculated by mark price
                        type: string
                        x-parser-schema-id: <anonymous-schema-223>
                      take_profit:
                        description: Take profit price
                        type:
                          - string
                          - 'null'
                        x-parser-schema-id: <anonymous-schema-224>
                      stop_loss:
                        description: Stop loss price
                        type:
                          - string
                          - 'null'
                        x-parser-schema-id: <anonymous-schema-225>
                      trailing_stop:
                        description: Trailing stop (The distance from market price)
                        type:
                          - string
                          - 'null'
                        x-parser-schema-id: <anonymous-schema-226>
                      unrealized_pnl:
                        description: >-
                          How much USDC an account will receive (or pay if
                          negative)

                          if the position is closed at the current MarkPrice
                        type: string
                        x-parser-schema-id: <anonymous-schema-227>
                      unrealized_funding:
                        description: >-
                          Net unsettled funding PnL for this position (receive
                          positive, pay negative).
                        type: string
                        x-parser-schema-id: <anonymous-schema-228>
                      realized_pnl_cur:
                        description: >-
                          Sum of Fill Realized PnL for position of this
                          symbol/side

                          since this position was created last time
                        type: string
                        x-parser-schema-id: <anonymous-schema-229>
                      realized_pnl_cum:
                        description: >-
                          Sum of all historical Current Realized PnLs (and the
                          latest one).
                        type: string
                        x-parser-schema-id: <anonymous-schema-230>
                      cum_funding:
                        description: >-
                          Net realized funding PnL accumulated for this position
                          (receive positive, pay negative).
                        type: string
                        x-parser-schema-id: <anonymous-schema-231>
                      adl_rank_indicator:
                        description: Auto-deleverage rank indicator.
                        type: string
                        enum:
                          - Zero
                          - One
                          - Two
                          - Three
                          - Four
                          - Five
                        x-parser-schema-id: AdlRankIndicator
                      is_reduce_only:
                        type: boolean
                        x-parser-schema-id: <anonymous-schema-232>
                      created_time:
                        description: >-
                          Timestamp of the first time a position was created on
                          this symbol (ms)
                        type: integer
                        format: int64
                        x-parser-schema-id: <anonymous-schema-233>
                      updated_time:
                        description: Position data updated timestamp (ms)
                        type: integer
                        format: int64
                        x-parser-schema-id: <anonymous-schema-234>
                      seq:
                        description: >-
                          Cross sequence, used to associate each fill and each
                          position update

                          * Different symbols may have the same seq, please use
                          seq + symbol to check unique
                        type: integer
                        format: uint64
                        minimum: 0
                        x-parser-schema-id: <anonymous-schema-235>
                      mmr_sys_update_time:
                        type:
                          - integer
                          - 'null'
                        format: int64
                        default: null
                        x-parser-schema-id: <anonymous-schema-236>
                      leverage_sys_updated_time:
                        type:
                          - integer
                          - 'null'
                        format: int64
                        default: null
                        x-parser-schema-id: <anonymous-schema-237>
                    required:
                      - risk_id
                      - risk_limit_value
                      - symbol
                      - sub_account_address
                      - side
                      - size
                      - avg_price
                      - position_value
                      - margin_mode
                      - position_balance
                      - position_status
                      - leverage
                      - mark_price
                      - liq_price
                      - bust_price
                      - position_im
                      - position_im_by_mp
                      - position_mm
                      - position_mm_by_mp
                      - unrealized_pnl
                      - unrealized_funding
                      - realized_pnl_cur
                      - realized_pnl_cum
                      - cum_funding
                      - adl_rank_indicator
                      - is_reduce_only
                      - created_time
                      - updated_time
                      - seq
                    x-parser-schema-id: Position
                  x-parser-schema-id: <anonymous-schema-207>
              required:
                - topic
                - data
              x-parser-schema-id: <anonymous-schema-206>
            - type: object
              properties:
                topic: *ref_3
                data:
                  type: array
                  items:
                    description: Account-wide wallet and margin metrics.
                    type: object
                    properties:
                      sub_account_address:
                        description: Sub-Account address (the owner of the technical vault)
                        type: string
                        x-parser-schema-id: <anonymous-schema-240>
                      account_type:
                        description: Account type (e.g. Funding, Trading)
                        type: string
                        x-parser-schema-id: <anonymous-schema-241>
                      equity:
                        description: >-
                          Equity under the account without considering the
                          collateral value ratio (calculated in USDC).

                          Equity = Vault Balance + Perp & Futures Unrealized P&L
                          + Unrealized Funding
                        type: string
                        x-parser-schema-id: <anonymous-schema-242>
                      vault_balance:
                        description: Vault Balance (USDC)
                        type: string
                        x-parser-schema-id: <anonymous-schema-243>
                      margin_balance:
                        description: >-
                          Amount that can be used as margin under the account

                          after considering the collateral value ratio
                          (calculated in USDC)

                          Total Vault Balance + Perp Unrealized P&L
                        type: string
                        x-parser-schema-id: <anonymous-schema-244>
                      available_balance:
                        description: >-
                          The amount of an asset that can be used to open USDC
                          Perpetual positions (USDC)
                        type: string
                        x-parser-schema-id: <anonymous-schema-245>
                      accrued_interest:
                        description: Accrued interest
                        type: string
                        x-parser-schema-id: <anonymous-schema-246>
                      total_order_im:
                        description: Pre-occupied margin for order. Locked balance (USDC)
                        type: string
                        x-parser-schema-id: <anonymous-schema-247>
                      total_position_im:
                        description: Sum of initial margin of all positions.
                        type: string
                        x-parser-schema-id: <anonymous-schema-248>
                      total_position_mm:
                        description: >-
                          Sum of maintenance margin for all positions, including
                          estimated close fees.
                        type: string
                        x-parser-schema-id: <anonymous-schema-249>
                      unrealised_pnl:
                        description: Unrealised P&L
                        type: string
                        x-parser-schema-id: <anonymous-schema-250>
                      unrealized_funding:
                        description: >-
                          Aggregated unrealized funding across all positions
                          (USDC)
                        type: string
                        x-parser-schema-id: <anonymous-schema-251>
                      realised_pnl_cum:
                        description: Cumulative Realised P&L
                        type: string
                        x-parser-schema-id: <anonymous-schema-252>
                    required:
                      - sub_account_address
                      - account_type
                      - equity
                      - vault_balance
                      - margin_balance
                      - available_balance
                      - accrued_interest
                      - total_order_im
                      - total_position_im
                      - total_position_mm
                      - unrealised_pnl
                      - unrealized_funding
                      - realised_pnl_cum
                    x-parser-schema-id: AccountBalance
                  x-parser-schema-id: <anonymous-schema-239>
              required:
                - topic
                - data
              x-parser-schema-id: <anonymous-schema-238>
          x-parser-schema-id: <anonymous-schema-30>
        title: Event
        description: Streaming event message.
        example: |-
          {
            "server_ts_ms": 123,
            "op": "<string>"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: Event
          - id: x-parser-message-name
            value: Event
    bindings: []
    extensions: *ref_4
sendOperations:
  - *ref_20
  - *ref_21
  - *ref_22
receiveOperations:
  - *ref_23
  - *ref_24
  - *ref_25
  - *ref_26
  - *ref_27
sendMessages:
  - *ref_28
  - *ref_29
  - *ref_30
receiveMessages:
  - *ref_31
  - *ref_32
  - *ref_33
  - *ref_34
  - *ref_35
extensions:
  - id: x-parser-unique-object-id
    value: public
securitySchemes: []

````