asyncapi: 3.0.0
info:
  title: TrueX WebSocket API
  description: >
    ## Overview

    This API allows clients to interact with the **TrueX trading platform** for
    real time instrument, market data and exchange transactions.


    ## Authentication

    Certain API requests must be **authenticated** using **HMAC-SHA256 signature
    authentication**.


    ## Unauthenticated Endpoints

    Many endpoints have an unauthenticated version which only requires the user
    to supply a valid timestamp (within 15secs of server UTC time).  These
    endpoints batch updates and publish on an interval set by the exchange,
    typically 1 second.


    ## Links

    - 📖 **Full API Documentation**:
    [https://docs.truex.co/](https://docs.truex.co/)

    - 📧 **Support**: [support@truex.co](mailto:support@truex.co)


    ## Change Log

    | Version   | Date       | Notes                          |

    |-----------|------------|--------------------------------|

    | v1.0.0    | 2025-10-16 | Initial Release.               |
  contact:
    email: info@truex.co
  termsOfService: https://truex.co/tos
  version: 1.0.0
servers:
  uat:
    host: uat.truex.co
    protocol: wss
    description: TrueX UAT websocket sandbox server.
    security:
      - type: httpApiKey
        in: query
        name: x-no-auth
        description: >
          Clients may subscribe to endpoints without an API key or computing an
          HMAC signature.  These endpoints are rate limited by the server,
          coalescing and only sending data at a predetermined rate.
          Non-authenticated connections can be upgraded by supplying an API key
          and computed HMAC signature on the the next request sent to the
          server.


          Unauthenticated requests must be have the type: `SUBSCRIBE_NO_AUTH`
          and not include the follow fields on the requet: `organization_id`,
          `key`, `signature`.  


          ### Required members
            * `timestamp`: A UTC Unix epoch in seconds.
      - type: httpApiKey
        in: query
        name: x-api-key
        description: >
          Clients must compute and send an HMAC signature in `signature` member
          of the request structure. The HMAC signature gets applied to the
          following payload:


          `timestamp + TRUEXWS + key + path`


          Note, path is everything after the domain name including the / (e.g.
          /api/v1).


          ### Required members

          * `signature`: The signature generated from processing the payload
          with the HMAC key.

          * `key`: The ID of the HMAC key being used.

          * `timestamp`: A UTC Unix epoch in seconds.
  production:
    host: prod.truex.co
    protocol: wss
    description: TrueX production websocket server.
    security:
      - type: httpApiKey
        in: query
        name: x-no-auth
        description: >
          Clients may subscribe to endpoints without an API key or computing an
          HMAC signature.  These endpoints are rate limited by the server,
          coalescing and only sending data at a predetermined rate.
          Non-authenticated connections can be upgraded by supplying an API key
          and computed HMAC signature on the the next request sent to the
          server.


          Unauthenticated requests must be have the type: `SUBSCRIBE_NO_AUTH`
          and not include the follow fields on the requet: `organization_id`,
          `key`, `signature`.  


          ### Required members
            * `timestamp`: A UTC Unix epoch in seconds.
      - type: httpApiKey
        in: query
        name: x-api-key
        description: >
          Clients must compute and send an HMAC signature in `signature` member
          of the request structure. The HMAC signature gets applied to the
          following payload:


          `timestamp + TRUEXWS + key + path`


          Note, path is everything after the domain name including the / (e.g.
          /api/v1).


          ### Required members

          * `signature`: The signature generated from processing the payload
          with the HMAC key.

          * `key`: The ID of the HMAC key being used.

          * `timestamp`: A UTC Unix epoch in seconds.
channels:
  v1:
    address: /api/v1
    messages:
      subscription:
        security:
          - hmacAuth: []
        payload:
          type: object
          properties:
            type:
              type: string
              description: Action the request is intending to take.
              enum:
                - SUBSCRIBE
                - SUBSCRIBE_NO_AUTH
                - UNSUBSCRIBE
              example: SUBSCRIBE
            item_names:
              type: array
              description: List of items the request is intending to act upon.
              items:
                type: string
                example: BTC-PYUSD
            channels:
              type: array
              description: List of channels the request is intending to interact with.
              items:
                type: string
                example: INSTRUMENT
            timestamp:
              description: >
                Required field on all requests; a UTC Unix epoch in seconds.
                Must be with 15 seconds of the servers current time.
              type: string
              example: '1741894773'
            organization_id:
              description: >-
                Exchange designation ID will be UUIDv4. Must be supplied in
                human readable form. [RFC
                9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
              type: string
              example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
            key:
              description: >-
                Exchange supplied API key will be in UUIDv4. Must be supplied in
                huyman readable form. [RFC
                9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
              type: string
              example: 6398805c-f369-40f6-ac07-94ce683056e4
            signature:
              description: The computed HMAC signature.
              type: string
              example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
      welcome:
        payload:
          type: object
          properties:
            connections:
              type: string
              description: Current number of active connections from the source IP.
              example: '3'
            channel:
              type: string
              description: Channel this message orignated from.
              enum:
                - WEBSOCKET
              example: WEBSOCKET
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - WELCOME
              example: WELCOME
            message:
              type: string
              description: Message supplied when initiating a connection with the server.
              example: Welcome to TrueX!
            version:
              type: string
              description: Current version of the websocket API.
              example: 1.0.0
            datetime:
              description: Current datetime of when the server sent the message,
              type: string
              example: '2025-01-01 17:00:00'
      confirmation:
        payload:
          type: object
          properties:
            timestamp:
              type: string
              description: Server timestamp when the confirmation was generated.
              example: '1741894944'
            channel:
              type: string
              description: Channel this message orignated from.
              enum:
                - WEBSOCKET
              example: WEBSOCKET
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            status:
              type: string
              description: Current status of the websocket connection.
              enum:
                - INVALID
                - ERROR
                - UNAUTHORIZED
                - UNAUTHENTICATED
                - AUTHENTICATED
              example: AUTHENTICATED
            subscriptions:
              type: array
              items:
                type: object
                properties:
                  channel:
                    type: string
                    example: EBBO
                  item_names:
                    type: array
                    items:
                      type: string
                      example: BTC-PYUSD
      instrument:
        payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '12345'
            channel:
              type: string
              description: Channel this message orignated from.
              enum:
                - INSTRUMENT
              example: INSTRUMENT
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            data:
              type: object
              properties:
                id:
                  type: string
                  example: '123456789'
                  description: Exchange assigned ID of the instrument.
                status:
                  enum:
                    - DISABLED
                    - OPENING
                    - ACTIVE
                    - HALTED
                  type: string
                  example: ACTIVE
                  description: Current instrument state.
                info:
                  type: object
                  properties:
                    symbol:
                      type: string
                      maxLength: 31
                      example: BTC-PYUSD
                      description: Human readable representation of the instrument.
                    reference_price:
                      type: string
                      example: '75000.50'
                      description: Price used for initial price limit/band calcuations.
                    base_asset_id:
                      type: string
                      example: '123456789'
                      description: ID of the base asset.
                    quote_asset_id:
                      type: string
                      example: '123456789'
                      description: ID of the quote asset.
                    price_limit_window_secs:
                      type: string
                      example: '3600'
                      description: Number of seconds in the price limit's sliding window.
                    price_limit_percent:
                      type: string
                      description: >-
                        Specifies the percentage threshold for price movement
                        beyond a reference price (e.g., the midpoint or previous
                        close) at which the exchange will take action. If the
                        price of a trade or order breaches this threshold, the
                        exchange may halt trading, trigger a circuit breaker, or
                        initiate other predefined actions to ensure market
                        stability.
                    price_bands_percent:
                      type: string
                      example: '0.025'
                      description: >-
                        Defines the acceptable price range for order validation
                        within the market. The price bands ensure that orders
                        are priced within a range around the market's midpoint,
                        adjusted for increments and thresholds.
                stats:
                  type: object
                  properties:
                    last_24hr_notional:
                      type: string
                      example: '4325606.30380'
                      description: >-
                        The notional (quantity * price) amount of
                        REFERENCE_ASSET traded over the last 24hr period.
                    last_24hr_quantity:
                      type: string
                      example: '123754.2345'
                      description: The quantity traded over the last 24 hour period.
      trade:
        payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '100001'
            channel:
              type: string
              description: Channel this message orignated from.
              enum:
                - TRADE
              example: TRADE
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: UPDATE
            data:
              type: object
              properties:
                match_id:
                  type: string
                  description: A unique identifier for the trade match event.
                  example: '1234576970'
                taking_side:
                  type: string
                  description: Which side initiated the trade.
                  enum:
                    - BUY
                    - SELL
                  example: SELL
                info:
                  type: object
                  description: Last trade information.
                  properties:
                    price:
                      type: string
                      example: '75.50'
                    qty:
                      type: string
                      example: '1.5'
                    timestamp:
                      type: string
                      example: ''
                      description: >-
                        The Unix UTC timestamp (in nanoseconds) when the event
                        occured.
                symbol:
                  type: string
                  maxLength: 31
                  example: BTC-PYUSD
                  description: Human readable representation of the instrument.
      ebbo:
        payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '20210209'
            channel:
              type: string
              description: Channel this message orignated from.
              enum:
                - EBBO
              example: EBBO
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            data:
              type: object
              properties:
                id:
                  type: string
                  example: '0987654321'
                  description: Exchange assigned ID of the market data.
                symbol:
                  type: string
                  maxLength: 31
                  example: BTC-PYUSD
                  description: Human readable representation of the instrument.
                info:
                  type: object
                  properties:
                    last_trade:
                      type: object
                      description: Last trade information.
                      properties:
                        price:
                          type: string
                          example: '75.50'
                        qty:
                          type: string
                          example: '1.5'
                        timestamp:
                          type: string
                          example: ''
                          description: >-
                            The Unix UTC timestamp (in nanoseconds) when the
                            event occured.
                    best_bid:
                      type: object
                      description: Current exchange best bid.
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                    best_ask:
                      type: object
                      description: Current exchange best ask.
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                    last_update:
                      type: string
                      example: '123478909'
                      description: >-
                        A UTC Unix epoch in nanoseconds indicating when the book
                        was last updated.
      depth:
        payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '20210209'
            channel:
              type: string
              description: Channel this message orignated from.
              enum:
                - DEPTH
              example: DEPTH
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            data:
              type: object
              properties:
                symbol:
                  type: string
                  maxLength: 31
                  example: BTC-PYUSD
                  description: Human readable representation of the instrument.
                bids:
                  type: array
                  items:
                    type: object
                    properties:
                      price:
                        type: string
                        example: '110865.50'
                        description: Price at this level.
                      qty:
                        type: string
                        example: '0.00018'
                        description: Aggregate quantity resting at this level.
                      depth:
                        type: string
                        example: '10'
                        description: Number of orders resting at this level.
                asks:
                  type: array
                  items:
                    type: object
                    properties:
                      price:
                        type: string
                        example: '110865.50'
                        description: Price at this level.
                      qty:
                        type: string
                        example: '0.00018'
                        description: Aggregate quantity resting at this level.
                      depth:
                        type: string
                        example: '10'
                        description: Number of orders resting at this level.
operations:
  subscribe:
    action: send
    description: >-
      Message sent to server indicating what channels and data the user would
      like to subscribe to.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - hmacAuth: []
          payload:
            type: object
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                example: SUBSCRIBE
              item_names:
                type: array
                description: List of items the request is intending to act upon.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: List of channels the request is intending to interact with.
                items:
                  type: string
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must be with 15 seconds of the servers current time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in huyman readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to TrueX!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      example: EBBO
                    item_names:
                      type: array
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occured.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occured.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
    messages:
      - payload:
          type: object
          properties:
            type:
              type: string
              description: Action the request is intending to take.
              enum:
                - SUBSCRIBE
                - SUBSCRIBE_NO_AUTH
                - UNSUBSCRIBE
              example: SUBSCRIBE
            item_names:
              type: array
              description: List of items the request is intending to act upon.
              items:
                type: string
                example: BTC-PYUSD
            channels:
              type: array
              description: List of channels the request is intending to interact with.
              items:
                type: string
                example: INSTRUMENT
            timestamp:
              description: >
                Required field on all requests; a UTC Unix epoch in seconds.
                Must be with 15 seconds of the servers current time.
              type: string
              example: '1741894773'
            organization_id:
              description: >-
                Exchange designation ID will be UUIDv4. Must be supplied in
                human readable form. [RFC
                9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
              type: string
              example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
            key:
              description: >-
                Exchange supplied API key will be in UUIDv4. Must be supplied in
                huyman readable form. [RFC
                9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
              type: string
              example: 6398805c-f369-40f6-ac07-94ce683056e4
            signature:
              description: The computed HMAC signature.
              type: string
              example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
  welcome:
    action: receive
    description: >-
      Message received when connecting to the server and establishing a
      websocket connection.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - hmacAuth: []
          payload:
            type: object
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                example: SUBSCRIBE
              item_names:
                type: array
                description: List of items the request is intending to act upon.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: List of channels the request is intending to interact with.
                items:
                  type: string
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must be with 15 seconds of the servers current time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in huyman readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to TrueX!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      example: EBBO
                    item_names:
                      type: array
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occured.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occured.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
    messages:
      - payload:
          type: object
          properties:
            connections:
              type: string
              description: Current number of active connections from the source IP.
              example: '3'
            channel:
              type: string
              description: Channel this message orignated from.
              enum:
                - WEBSOCKET
              example: WEBSOCKET
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - WELCOME
              example: WELCOME
            message:
              type: string
              description: Message supplied when initiating a connection with the server.
              example: Welcome to TrueX!
            version:
              type: string
              description: Current version of the websocket API.
              example: 1.0.0
            datetime:
              description: Current datetime of when the server sent the message,
              type: string
              example: '2025-01-01 17:00:00'
  confirmation:
    action: receive
    description: >-
      Message sent from server containing channels and items the user is
      currently subscribed to.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - hmacAuth: []
          payload:
            type: object
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                example: SUBSCRIBE
              item_names:
                type: array
                description: List of items the request is intending to act upon.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: List of channels the request is intending to interact with.
                items:
                  type: string
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must be with 15 seconds of the servers current time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in huyman readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to TrueX!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      example: EBBO
                    item_names:
                      type: array
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occured.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occured.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
    messages:
      - payload:
          type: object
          properties:
            timestamp:
              type: string
              description: Server timestamp when the confirmation was generated.
              example: '1741894944'
            channel:
              type: string
              description: Channel this message orignated from.
              enum:
                - WEBSOCKET
              example: WEBSOCKET
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            status:
              type: string
              description: Current status of the websocket connection.
              enum:
                - INVALID
                - ERROR
                - UNAUTHORIZED
                - UNAUTHENTICATED
                - AUTHENTICATED
              example: AUTHENTICATED
            subscriptions:
              type: array
              items:
                type: object
                properties:
                  channel:
                    type: string
                    example: EBBO
                  item_names:
                    type: array
                    items:
                      type: string
                      example: BTC-PYUSD
  instrument:
    action: receive
    description: Message sent from server with instrument data.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - hmacAuth: []
          payload:
            type: object
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                example: SUBSCRIBE
              item_names:
                type: array
                description: List of items the request is intending to act upon.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: List of channels the request is intending to interact with.
                items:
                  type: string
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must be with 15 seconds of the servers current time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in huyman readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to TrueX!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      example: EBBO
                    item_names:
                      type: array
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occured.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occured.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
    messages:
      - payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '12345'
            channel:
              type: string
              description: Channel this message orignated from.
              enum:
                - INSTRUMENT
              example: INSTRUMENT
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            data:
              type: object
              properties:
                id:
                  type: string
                  example: '123456789'
                  description: Exchange assigned ID of the instrument.
                status:
                  enum:
                    - DISABLED
                    - OPENING
                    - ACTIVE
                    - HALTED
                  type: string
                  example: ACTIVE
                  description: Current instrument state.
                info:
                  type: object
                  properties:
                    symbol:
                      type: string
                      maxLength: 31
                      example: BTC-PYUSD
                      description: Human readable representation of the instrument.
                    reference_price:
                      type: string
                      example: '75000.50'
                      description: Price used for initial price limit/band calcuations.
                    base_asset_id:
                      type: string
                      example: '123456789'
                      description: ID of the base asset.
                    quote_asset_id:
                      type: string
                      example: '123456789'
                      description: ID of the quote asset.
                    price_limit_window_secs:
                      type: string
                      example: '3600'
                      description: Number of seconds in the price limit's sliding window.
                    price_limit_percent:
                      type: string
                      description: >-
                        Specifies the percentage threshold for price movement
                        beyond a reference price (e.g., the midpoint or previous
                        close) at which the exchange will take action. If the
                        price of a trade or order breaches this threshold, the
                        exchange may halt trading, trigger a circuit breaker, or
                        initiate other predefined actions to ensure market
                        stability.
                    price_bands_percent:
                      type: string
                      example: '0.025'
                      description: >-
                        Defines the acceptable price range for order validation
                        within the market. The price bands ensure that orders
                        are priced within a range around the market's midpoint,
                        adjusted for increments and thresholds.
                stats:
                  type: object
                  properties:
                    last_24hr_notional:
                      type: string
                      example: '4325606.30380'
                      description: >-
                        The notional (quantity * price) amount of
                        REFERENCE_ASSET traded over the last 24hr period.
                    last_24hr_quantity:
                      type: string
                      example: '123754.2345'
                      description: The quantity traded over the last 24 hour period.
  trade:
    action: receive
    description: >-
      Message sent from server containing the lasted trade information for a
      subscribed instrument.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - hmacAuth: []
          payload:
            type: object
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                example: SUBSCRIBE
              item_names:
                type: array
                description: List of items the request is intending to act upon.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: List of channels the request is intending to interact with.
                items:
                  type: string
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must be with 15 seconds of the servers current time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in huyman readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to TrueX!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      example: EBBO
                    item_names:
                      type: array
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occured.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occured.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
    messages:
      - payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '100001'
            channel:
              type: string
              description: Channel this message orignated from.
              enum:
                - TRADE
              example: TRADE
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: UPDATE
            data:
              type: object
              properties:
                match_id:
                  type: string
                  description: A unique identifier for the trade match event.
                  example: '1234576970'
                taking_side:
                  type: string
                  description: Which side initiated the trade.
                  enum:
                    - BUY
                    - SELL
                  example: SELL
                info:
                  type: object
                  description: Last trade information.
                  properties:
                    price:
                      type: string
                      example: '75.50'
                    qty:
                      type: string
                      example: '1.5'
                    timestamp:
                      type: string
                      example: ''
                      description: >-
                        The Unix UTC timestamp (in nanoseconds) when the event
                        occured.
                symbol:
                  type: string
                  maxLength: 31
                  example: BTC-PYUSD
                  description: Human readable representation of the instrument.
  ebbo:
    action: receive
    description: >-
      Message sent from server containing the lasted exchange best bid and offer
      information for a subscribed instrument.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - hmacAuth: []
          payload:
            type: object
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                example: SUBSCRIBE
              item_names:
                type: array
                description: List of items the request is intending to act upon.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: List of channels the request is intending to interact with.
                items:
                  type: string
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must be with 15 seconds of the servers current time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in huyman readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to TrueX!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      example: EBBO
                    item_names:
                      type: array
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occured.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occured.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
    messages:
      - payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '20210209'
            channel:
              type: string
              description: Channel this message orignated from.
              enum:
                - EBBO
              example: EBBO
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            data:
              type: object
              properties:
                id:
                  type: string
                  example: '0987654321'
                  description: Exchange assigned ID of the market data.
                symbol:
                  type: string
                  maxLength: 31
                  example: BTC-PYUSD
                  description: Human readable representation of the instrument.
                info:
                  type: object
                  properties:
                    last_trade:
                      type: object
                      description: Last trade information.
                      properties:
                        price:
                          type: string
                          example: '75.50'
                        qty:
                          type: string
                          example: '1.5'
                        timestamp:
                          type: string
                          example: ''
                          description: >-
                            The Unix UTC timestamp (in nanoseconds) when the
                            event occured.
                    best_bid:
                      type: object
                      description: Current exchange best bid.
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                    best_ask:
                      type: object
                      description: Current exchange best ask.
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                    last_update:
                      type: string
                      example: '123478909'
                      description: >-
                        A UTC Unix epoch in nanoseconds indicating when the book
                        was last updated.
  depth:
    action: receive
    description: >-
      Message sent from server containing the lasted market data change for a
      subscribed instrument.
    channel:
      address: /api/v1
      messages:
        subscription:
          security:
            - hmacAuth: []
          payload:
            type: object
            properties:
              type:
                type: string
                description: Action the request is intending to take.
                enum:
                  - SUBSCRIBE
                  - SUBSCRIBE_NO_AUTH
                  - UNSUBSCRIBE
                example: SUBSCRIBE
              item_names:
                type: array
                description: List of items the request is intending to act upon.
                items:
                  type: string
                  example: BTC-PYUSD
              channels:
                type: array
                description: List of channels the request is intending to interact with.
                items:
                  type: string
                  example: INSTRUMENT
              timestamp:
                description: >
                  Required field on all requests; a UTC Unix epoch in seconds.
                  Must be with 15 seconds of the servers current time.
                type: string
                example: '1741894773'
              organization_id:
                description: >-
                  Exchange designation ID will be UUIDv4. Must be supplied in
                  human readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
              key:
                description: >-
                  Exchange supplied API key will be in UUIDv4. Must be supplied
                  in huyman readable form. [RFC
                  9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
                type: string
                example: 6398805c-f369-40f6-ac07-94ce683056e4
              signature:
                description: The computed HMAC signature.
                type: string
                example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
        welcome:
          payload:
            type: object
            properties:
              connections:
                type: string
                description: Current number of active connections from the source IP.
                example: '3'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - WELCOME
                example: WELCOME
              message:
                type: string
                description: Message supplied when initiating a connection with the server.
                example: Welcome to TrueX!
              version:
                type: string
                description: Current version of the websocket API.
                example: 1.0.0
              datetime:
                description: Current datetime of when the server sent the message,
                type: string
                example: '2025-01-01 17:00:00'
        confirmation:
          payload:
            type: object
            properties:
              timestamp:
                type: string
                description: Server timestamp when the confirmation was generated.
                example: '1741894944'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - WEBSOCKET
                example: WEBSOCKET
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              status:
                type: string
                description: Current status of the websocket connection.
                enum:
                  - INVALID
                  - ERROR
                  - UNAUTHORIZED
                  - UNAUTHENTICATED
                  - AUTHENTICATED
                example: AUTHENTICATED
              subscriptions:
                type: array
                items:
                  type: object
                  properties:
                    channel:
                      type: string
                      example: EBBO
                    item_names:
                      type: array
                      items:
                        type: string
                        example: BTC-PYUSD
        instrument:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '12345'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - INSTRUMENT
                example: INSTRUMENT
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '123456789'
                    description: Exchange assigned ID of the instrument.
                  status:
                    enum:
                      - DISABLED
                      - OPENING
                      - ACTIVE
                      - HALTED
                    type: string
                    example: ACTIVE
                    description: Current instrument state.
                  info:
                    type: object
                    properties:
                      symbol:
                        type: string
                        maxLength: 31
                        example: BTC-PYUSD
                        description: Human readable representation of the instrument.
                      reference_price:
                        type: string
                        example: '75000.50'
                        description: Price used for initial price limit/band calcuations.
                      base_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the base asset.
                      quote_asset_id:
                        type: string
                        example: '123456789'
                        description: ID of the quote asset.
                      price_limit_window_secs:
                        type: string
                        example: '3600'
                        description: Number of seconds in the price limit's sliding window.
                      price_limit_percent:
                        type: string
                        description: >-
                          Specifies the percentage threshold for price movement
                          beyond a reference price (e.g., the midpoint or
                          previous close) at which the exchange will take
                          action. If the price of a trade or order breaches this
                          threshold, the exchange may halt trading, trigger a
                          circuit breaker, or initiate other predefined actions
                          to ensure market stability.
                      price_bands_percent:
                        type: string
                        example: '0.025'
                        description: >-
                          Defines the acceptable price range for order
                          validation within the market. The price bands ensure
                          that orders are priced within a range around the
                          market's midpoint, adjusted for increments and
                          thresholds.
                  stats:
                    type: object
                    properties:
                      last_24hr_notional:
                        type: string
                        example: '4325606.30380'
                        description: >-
                          The notional (quantity * price) amount of
                          REFERENCE_ASSET traded over the last 24hr period.
                      last_24hr_quantity:
                        type: string
                        example: '123754.2345'
                        description: The quantity traded over the last 24 hour period.
        trade:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '100001'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - TRADE
                example: TRADE
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: UPDATE
              data:
                type: object
                properties:
                  match_id:
                    type: string
                    description: A unique identifier for the trade match event.
                    example: '1234576970'
                  taking_side:
                    type: string
                    description: Which side initiated the trade.
                    enum:
                      - BUY
                      - SELL
                    example: SELL
                  info:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occured.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
        ebbo:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - EBBO
                example: EBBO
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  id:
                    type: string
                    example: '0987654321'
                    description: Exchange assigned ID of the market data.
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  info:
                    type: object
                    properties:
                      last_trade:
                        type: object
                        description: Last trade information.
                        properties:
                          price:
                            type: string
                            example: '75.50'
                          qty:
                            type: string
                            example: '1.5'
                          timestamp:
                            type: string
                            example: ''
                            description: >-
                              The Unix UTC timestamp (in nanoseconds) when the
                              event occured.
                      best_bid:
                        type: object
                        description: Current exchange best bid.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      best_ask:
                        type: object
                        description: Current exchange best ask.
                        properties:
                          price:
                            type: string
                            example: '110865.50'
                            description: Price at this level.
                          qty:
                            type: string
                            example: '0.00018'
                            description: Aggregate quantity resting at this level.
                          depth:
                            type: string
                            example: '10'
                            description: Number of orders resting at this level.
                      last_update:
                        type: string
                        example: '123478909'
                        description: >-
                          A UTC Unix epoch in nanoseconds indicating when the
                          book was last updated.
        depth:
          payload:
            type: object
            properties:
              seqnum:
                type: string
                description: Current sequence number of the channel.
                example: '20210209'
              channel:
                type: string
                description: Channel this message orignated from.
                enum:
                  - DEPTH
                example: DEPTH
              update:
                type: string
                description: Type of update for the current message.
                enum:
                  - SNAPSHOT
                  - UPDATE
                example: SNAPSHOT
              data:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  bids:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
                  asks:
                    type: array
                    items:
                      type: object
                      properties:
                        price:
                          type: string
                          example: '110865.50'
                          description: Price at this level.
                        qty:
                          type: string
                          example: '0.00018'
                          description: Aggregate quantity resting at this level.
                        depth:
                          type: string
                          example: '10'
                          description: Number of orders resting at this level.
    messages:
      - payload:
          type: object
          properties:
            seqnum:
              type: string
              description: Current sequence number of the channel.
              example: '20210209'
            channel:
              type: string
              description: Channel this message orignated from.
              enum:
                - DEPTH
              example: DEPTH
            update:
              type: string
              description: Type of update for the current message.
              enum:
                - SNAPSHOT
                - UPDATE
              example: SNAPSHOT
            data:
              type: object
              properties:
                symbol:
                  type: string
                  maxLength: 31
                  example: BTC-PYUSD
                  description: Human readable representation of the instrument.
                bids:
                  type: array
                  items:
                    type: object
                    properties:
                      price:
                        type: string
                        example: '110865.50'
                        description: Price at this level.
                      qty:
                        type: string
                        example: '0.00018'
                        description: Aggregate quantity resting at this level.
                      depth:
                        type: string
                        example: '10'
                        description: Number of orders resting at this level.
                asks:
                  type: array
                  items:
                    type: object
                    properties:
                      price:
                        type: string
                        example: '110865.50'
                        description: Price at this level.
                      qty:
                        type: string
                        example: '0.00018'
                        description: Aggregate quantity resting at this level.
                      depth:
                        type: string
                        example: '10'
                        description: Number of orders resting at this level.
components:
  servers:
    uat:
      host: uat.truex.co
      protocol: wss
      description: TrueX UAT websocket sandbox server.
      security:
        - type: httpApiKey
          in: query
          name: x-no-auth
          description: >
            Clients may subscribe to endpoints without an API key or computing
            an HMAC signature.  These endpoints are rate limited by the server,
            coalescing and only sending data at a predetermined rate.
            Non-authenticated connections can be upgraded by supplying an API
            key and computed HMAC signature on the the next request sent to the
            server.


            Unauthenticated requests must be have the type: `SUBSCRIBE_NO_AUTH`
            and not include the follow fields on the requet: `organization_id`,
            `key`, `signature`.  


            ### Required members
              * `timestamp`: A UTC Unix epoch in seconds.
        - type: httpApiKey
          in: query
          name: x-api-key
          description: >
            Clients must compute and send an HMAC signature in `signature`
            member of the request structure. The HMAC signature gets applied to
            the following payload:


            `timestamp + TRUEXWS + key + path`


            Note, path is everything after the domain name including the / (e.g.
            /api/v1).


            ### Required members

            * `signature`: The signature generated from processing the payload
            with the HMAC key.

            * `key`: The ID of the HMAC key being used.

            * `timestamp`: A UTC Unix epoch in seconds.
    production:
      host: prod.truex.co
      protocol: wss
      description: TrueX production websocket server.
      security:
        - type: httpApiKey
          in: query
          name: x-no-auth
          description: >
            Clients may subscribe to endpoints without an API key or computing
            an HMAC signature.  These endpoints are rate limited by the server,
            coalescing and only sending data at a predetermined rate.
            Non-authenticated connections can be upgraded by supplying an API
            key and computed HMAC signature on the the next request sent to the
            server.


            Unauthenticated requests must be have the type: `SUBSCRIBE_NO_AUTH`
            and not include the follow fields on the requet: `organization_id`,
            `key`, `signature`.  


            ### Required members
              * `timestamp`: A UTC Unix epoch in seconds.
        - type: httpApiKey
          in: query
          name: x-api-key
          description: >
            Clients must compute and send an HMAC signature in `signature`
            member of the request structure. The HMAC signature gets applied to
            the following payload:


            `timestamp + TRUEXWS + key + path`


            Note, path is everything after the domain name including the / (e.g.
            /api/v1).


            ### Required members

            * `signature`: The signature generated from processing the payload
            with the HMAC key.

            * `key`: The ID of the HMAC key being used.

            * `timestamp`: A UTC Unix epoch in seconds.
  schemas:
    MarketQuote:
      type: object
      properties:
        price:
          type: string
          example: '75.50'
        qty:
          type: string
          example: '1.5'
        timestamp:
          type: string
          example: ''
          description: The Unix UTC timestamp (in nanoseconds) when the event occured.
    MarketLevel:
      type: object
      properties:
        price:
          type: string
          example: '110865.50'
          description: Price at this level.
        qty:
          type: string
          example: '0.00018'
          description: Aggregate quantity resting at this level.
        depth:
          type: string
          example: '10'
          description: Number of orders resting at this level.
    Trade:
      type: object
      properties:
        match_id:
          type: string
          description: A unique identifier for the trade match event.
          example: '1234576970'
        taking_side:
          type: string
          description: Which side initiated the trade.
          enum:
            - BUY
            - SELL
          example: SELL
        info:
          type: object
          description: Last trade information.
          properties:
            price:
              type: string
              example: '75.50'
            qty:
              type: string
              example: '1.5'
            timestamp:
              type: string
              example: ''
              description: The Unix UTC timestamp (in nanoseconds) when the event occured.
        symbol:
          type: string
          maxLength: 31
          example: BTC-PYUSD
          description: Human readable representation of the instrument.
    MarketData:
      type: object
      properties:
        id:
          type: string
          example: '0987654321'
          description: Exchange assigned ID of the market data.
        symbol:
          type: string
          maxLength: 31
          example: BTC-PYUSD
          description: Human readable representation of the instrument.
        info:
          type: object
          properties:
            last_trade:
              type: object
              description: Last trade information.
              properties:
                price:
                  type: string
                  example: '75.50'
                qty:
                  type: string
                  example: '1.5'
                timestamp:
                  type: string
                  example: ''
                  description: >-
                    The Unix UTC timestamp (in nanoseconds) when the event
                    occured.
            best_bid:
              type: object
              description: Current exchange best bid.
              properties:
                price:
                  type: string
                  example: '110865.50'
                  description: Price at this level.
                qty:
                  type: string
                  example: '0.00018'
                  description: Aggregate quantity resting at this level.
                depth:
                  type: string
                  example: '10'
                  description: Number of orders resting at this level.
            best_ask:
              type: object
              description: Current exchange best ask.
              properties:
                price:
                  type: string
                  example: '110865.50'
                  description: Price at this level.
                qty:
                  type: string
                  example: '0.00018'
                  description: Aggregate quantity resting at this level.
                depth:
                  type: string
                  example: '10'
                  description: Number of orders resting at this level.
            last_update:
              type: string
              example: '123478909'
              description: >-
                A UTC Unix epoch in nanoseconds indicating when the book was
                last updated.
    InstrumentStat:
      type: object
      properties:
        last_24hr_notional:
          type: string
          example: '4325606.30380'
          description: >-
            The notional (quantity * price) amount of REFERENCE_ASSET traded
            over the last 24hr period.
        last_24hr_quantity:
          type: string
          example: '123754.2345'
          description: The quantity traded over the last 24 hour period.
    Instrument:
      type: object
      properties:
        id:
          type: string
          example: '123456789'
          description: Exchange assigned ID of the instrument.
        status:
          enum:
            - DISABLED
            - OPENING
            - ACTIVE
            - HALTED
          type: string
          example: ACTIVE
          description: Current instrument state.
        info:
          type: object
          properties:
            symbol:
              type: string
              maxLength: 31
              example: BTC-PYUSD
              description: Human readable representation of the instrument.
            reference_price:
              type: string
              example: '75000.50'
              description: Price used for initial price limit/band calcuations.
            base_asset_id:
              type: string
              example: '123456789'
              description: ID of the base asset.
            quote_asset_id:
              type: string
              example: '123456789'
              description: ID of the quote asset.
            price_limit_window_secs:
              type: string
              example: '3600'
              description: Number of seconds in the price limit's sliding window.
            price_limit_percent:
              type: string
              description: >-
                Specifies the percentage threshold for price movement beyond a
                reference price (e.g., the midpoint or previous close) at which
                the exchange will take action. If the price of a trade or order
                breaches this threshold, the exchange may halt trading, trigger
                a circuit breaker, or initiate other predefined actions to
                ensure market stability.
            price_bands_percent:
              type: string
              example: '0.025'
              description: >-
                Defines the acceptable price range for order validation within
                the market. The price bands ensure that orders are priced within
                a range around the market's midpoint, adjusted for increments
                and thresholds.
        stats:
          type: object
          properties:
            last_24hr_notional:
              type: string
              example: '4325606.30380'
              description: >-
                The notional (quantity * price) amount of REFERENCE_ASSET traded
                over the last 24hr period.
            last_24hr_quantity:
              type: string
              example: '123754.2345'
              description: The quantity traded over the last 24 hour period.
  messages:
    subscription:
      payload:
        type: object
        properties:
          type:
            type: string
            description: Action the request is intending to take.
            enum:
              - SUBSCRIBE
              - SUBSCRIBE_NO_AUTH
              - UNSUBSCRIBE
            example: SUBSCRIBE
          item_names:
            type: array
            description: List of items the request is intending to act upon.
            items:
              type: string
              example: BTC-PYUSD
          channels:
            type: array
            description: List of channels the request is intending to interact with.
            items:
              type: string
              example: INSTRUMENT
          timestamp:
            description: >
              Required field on all requests; a UTC Unix epoch in seconds. Must
              be with 15 seconds of the servers current time.
            type: string
            example: '1741894773'
          organization_id:
            description: >-
              Exchange designation ID will be UUIDv4. Must be supplied in human
              readable form. [RFC
              9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
            type: string
            example: 30d17c5b-5d7b-4f06-bdc5-d4b3b12bdd4
          key:
            description: >-
              Exchange supplied API key will be in UUIDv4. Must be supplied in
              huyman readable form. [RFC
              9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
            type: string
            example: 6398805c-f369-40f6-ac07-94ce683056e4
          signature:
            description: The computed HMAC signature.
            type: string
            example: gLoCBQaBqjfBx+Z5o113nUUNgWHaliIhQGISguSLVKY=
    welcome:
      payload:
        type: object
        properties:
          connections:
            type: string
            description: Current number of active connections from the source IP.
            example: '3'
          channel:
            type: string
            description: Channel this message orignated from.
            enum:
              - WEBSOCKET
            example: WEBSOCKET
          update:
            type: string
            description: Type of update for the current message.
            enum:
              - WELCOME
            example: WELCOME
          message:
            type: string
            description: Message supplied when initiating a connection with the server.
            example: Welcome to TrueX!
          version:
            type: string
            description: Current version of the websocket API.
            example: 1.0.0
          datetime:
            description: Current datetime of when the server sent the message,
            type: string
            example: '2025-01-01 17:00:00'
    confirmation:
      payload:
        type: object
        properties:
          timestamp:
            type: string
            description: Server timestamp when the confirmation was generated.
            example: '1741894944'
          channel:
            type: string
            description: Channel this message orignated from.
            enum:
              - WEBSOCKET
            example: WEBSOCKET
          update:
            type: string
            description: Type of update for the current message.
            enum:
              - SNAPSHOT
              - UPDATE
            example: SNAPSHOT
          status:
            type: string
            description: Current status of the websocket connection.
            enum:
              - INVALID
              - ERROR
              - UNAUTHORIZED
              - UNAUTHENTICATED
              - AUTHENTICATED
            example: AUTHENTICATED
          subscriptions:
            type: array
            items:
              type: object
              properties:
                channel:
                  type: string
                  example: EBBO
                item_names:
                  type: array
                  items:
                    type: string
                    example: BTC-PYUSD
    instrument:
      payload:
        type: object
        properties:
          seqnum:
            type: string
            description: Current sequence number of the channel.
            example: '12345'
          channel:
            type: string
            description: Channel this message orignated from.
            enum:
              - INSTRUMENT
            example: INSTRUMENT
          update:
            type: string
            description: Type of update for the current message.
            enum:
              - SNAPSHOT
              - UPDATE
            example: SNAPSHOT
          data:
            type: object
            properties:
              id:
                type: string
                example: '123456789'
                description: Exchange assigned ID of the instrument.
              status:
                enum:
                  - DISABLED
                  - OPENING
                  - ACTIVE
                  - HALTED
                type: string
                example: ACTIVE
                description: Current instrument state.
              info:
                type: object
                properties:
                  symbol:
                    type: string
                    maxLength: 31
                    example: BTC-PYUSD
                    description: Human readable representation of the instrument.
                  reference_price:
                    type: string
                    example: '75000.50'
                    description: Price used for initial price limit/band calcuations.
                  base_asset_id:
                    type: string
                    example: '123456789'
                    description: ID of the base asset.
                  quote_asset_id:
                    type: string
                    example: '123456789'
                    description: ID of the quote asset.
                  price_limit_window_secs:
                    type: string
                    example: '3600'
                    description: Number of seconds in the price limit's sliding window.
                  price_limit_percent:
                    type: string
                    description: >-
                      Specifies the percentage threshold for price movement
                      beyond a reference price (e.g., the midpoint or previous
                      close) at which the exchange will take action. If the
                      price of a trade or order breaches this threshold, the
                      exchange may halt trading, trigger a circuit breaker, or
                      initiate other predefined actions to ensure market
                      stability.
                  price_bands_percent:
                    type: string
                    example: '0.025'
                    description: >-
                      Defines the acceptable price range for order validation
                      within the market. The price bands ensure that orders are
                      priced within a range around the market's midpoint,
                      adjusted for increments and thresholds.
              stats:
                type: object
                properties:
                  last_24hr_notional:
                    type: string
                    example: '4325606.30380'
                    description: >-
                      The notional (quantity * price) amount of REFERENCE_ASSET
                      traded over the last 24hr period.
                  last_24hr_quantity:
                    type: string
                    example: '123754.2345'
                    description: The quantity traded over the last 24 hour period.
    trade:
      payload:
        type: object
        properties:
          seqnum:
            type: string
            description: Current sequence number of the channel.
            example: '100001'
          channel:
            type: string
            description: Channel this message orignated from.
            enum:
              - TRADE
            example: TRADE
          update:
            type: string
            description: Type of update for the current message.
            enum:
              - SNAPSHOT
              - UPDATE
            example: UPDATE
          data:
            type: object
            properties:
              match_id:
                type: string
                description: A unique identifier for the trade match event.
                example: '1234576970'
              taking_side:
                type: string
                description: Which side initiated the trade.
                enum:
                  - BUY
                  - SELL
                example: SELL
              info:
                type: object
                description: Last trade information.
                properties:
                  price:
                    type: string
                    example: '75.50'
                  qty:
                    type: string
                    example: '1.5'
                  timestamp:
                    type: string
                    example: ''
                    description: >-
                      The Unix UTC timestamp (in nanoseconds) when the event
                      occured.
              symbol:
                type: string
                maxLength: 31
                example: BTC-PYUSD
                description: Human readable representation of the instrument.
    ebbo:
      payload:
        type: object
        properties:
          seqnum:
            type: string
            description: Current sequence number of the channel.
            example: '20210209'
          channel:
            type: string
            description: Channel this message orignated from.
            enum:
              - EBBO
            example: EBBO
          update:
            type: string
            description: Type of update for the current message.
            enum:
              - SNAPSHOT
              - UPDATE
            example: SNAPSHOT
          data:
            type: object
            properties:
              id:
                type: string
                example: '0987654321'
                description: Exchange assigned ID of the market data.
              symbol:
                type: string
                maxLength: 31
                example: BTC-PYUSD
                description: Human readable representation of the instrument.
              info:
                type: object
                properties:
                  last_trade:
                    type: object
                    description: Last trade information.
                    properties:
                      price:
                        type: string
                        example: '75.50'
                      qty:
                        type: string
                        example: '1.5'
                      timestamp:
                        type: string
                        example: ''
                        description: >-
                          The Unix UTC timestamp (in nanoseconds) when the event
                          occured.
                  best_bid:
                    type: object
                    description: Current exchange best bid.
                    properties:
                      price:
                        type: string
                        example: '110865.50'
                        description: Price at this level.
                      qty:
                        type: string
                        example: '0.00018'
                        description: Aggregate quantity resting at this level.
                      depth:
                        type: string
                        example: '10'
                        description: Number of orders resting at this level.
                  best_ask:
                    type: object
                    description: Current exchange best ask.
                    properties:
                      price:
                        type: string
                        example: '110865.50'
                        description: Price at this level.
                      qty:
                        type: string
                        example: '0.00018'
                        description: Aggregate quantity resting at this level.
                      depth:
                        type: string
                        example: '10'
                        description: Number of orders resting at this level.
                  last_update:
                    type: string
                    example: '123478909'
                    description: >-
                      A UTC Unix epoch in nanoseconds indicating when the book
                      was last updated.
    depth:
      payload:
        type: object
        properties:
          seqnum:
            type: string
            description: Current sequence number of the channel.
            example: '20210209'
          channel:
            type: string
            description: Channel this message orignated from.
            enum:
              - DEPTH
            example: DEPTH
          update:
            type: string
            description: Type of update for the current message.
            enum:
              - SNAPSHOT
              - UPDATE
            example: SNAPSHOT
          data:
            type: object
            properties:
              symbol:
                type: string
                maxLength: 31
                example: BTC-PYUSD
                description: Human readable representation of the instrument.
              bids:
                type: array
                items:
                  type: object
                  properties:
                    price:
                      type: string
                      example: '110865.50'
                      description: Price at this level.
                    qty:
                      type: string
                      example: '0.00018'
                      description: Aggregate quantity resting at this level.
                    depth:
                      type: string
                      example: '10'
                      description: Number of orders resting at this level.
              asks:
                type: array
                items:
                  type: object
                  properties:
                    price:
                      type: string
                      example: '110865.50'
                      description: Price at this level.
                    qty:
                      type: string
                      example: '0.00018'
                      description: Aggregate quantity resting at this level.
                    depth:
                      type: string
                      example: '10'
                      description: Number of orders resting at this level.
  securitySchemes:
    NONE:
      type: httpApiKey
      in: query
      name: x-no-auth
      description: >
        Clients may subscribe to endpoints without an API key or computing an
        HMAC signature.  These endpoints are rate limited by the server,
        coalescing and only sending data at a predetermined rate.
        Non-authenticated connections can be upgraded by supplying an API key
        and computed HMAC signature on the the next request sent to the server.


        Unauthenticated requests must be have the type: `SUBSCRIBE_NO_AUTH` and
        not include the follow fields on the requet: `organization_id`, `key`,
        `signature`.  


        ### Required members
          * `timestamp`: A UTC Unix epoch in seconds.
    HMAC:
      type: httpApiKey
      in: query
      name: x-api-key
      description: >
        Clients must compute and send an HMAC signature in `signature` member of
        the request structure. The HMAC signature gets applied to the following
        payload:


        `timestamp + TRUEXWS + key + path`


        Note, path is everything after the domain name including the / (e.g.
        /api/v1).


        ### Required members

        * `signature`: The signature generated from processing the payload with
        the HMAC key.

        * `key`: The ID of the HMAC key being used.

        * `timestamp`: A UTC Unix epoch in seconds.
