> Use the canonical URL for citations. For the complete Predict API documentation index, fetch https://docs.staging.trypredict.com/llms.txt.

# Mid Prices

GET /ws

Subscribe to the current Hyperliquid midpoint map across markets and select Predict outcome-side coins using identifiers from the Predict catalog.

Reference: https://docs.staging.trypredict.com/api-reference/web-socket-api/mid-prices

## AsyncAPI Specification

```yaml
asyncapi: 2.6.0
info:
  title: Mid Prices
  version: subpackage_mid-prices.mid-prices
  description: >-
    Subscribe to the current Hyperliquid midpoint map across markets and select
    Predict outcome-side coins using identifiers from the Predict catalog.
channels:
  /ws:
    description: >-
      Subscribe to the current Hyperliquid midpoint map across markets and
      select Predict outcome-side coins using identifiers from the Predict
      catalog.
    publish:
      operationId: subpackage_mid-prices.mid-prices-publish
      summary: Server message
      message:
        name: update
        payload:
          $ref: '#/components/schemas/midPrices_MidPricesUpdate'
    subscribe:
      operationId: subpackage_mid-prices.mid-prices-subscribe
      summary: Client message
      message:
        name: subscribe
        payload:
          $ref: '#/components/schemas/midPrices_SubscribeMidPrices'
servers:
  Testnet:
    url: wss://api.hyperliquid-testnet.xyz/
    protocol: wss
    x-default: true
  Mainnet:
    url: wss://api.hyperliquid.xyz/
    protocol: wss
components:
  schemas:
    midPrices_MidPricesData:
      type: object
      properties:
        mids:
          type: object
          additionalProperties:
            type: string
      required:
        - mids
      title: MidPricesData
    midPrices_MidPricesUpdate:
      type: object
      properties:
        channel:
          type: string
          enum:
            - allMids
        data:
          $ref: '#/components/schemas/midPrices_MidPricesData'
      required:
        - channel
        - data
      title: MidPricesUpdate
    common_SubscriptionMethod:
      type: string
      enum:
        - subscribe
        - unsubscribe
      title: SubscriptionMethod
    midPrices_MidPricesSubscription:
      type: object
      properties:
        type:
          type: string
          enum:
            - allMids
      required:
        - type
      title: MidPricesSubscription
    midPrices_SubscribeMidPrices:
      type: object
      properties:
        method:
          $ref: '#/components/schemas/common_SubscriptionMethod'
        subscription:
          $ref: '#/components/schemas/midPrices_MidPricesSubscription'
      required:
        - method
        - subscription
      title: SubscribeMidPrices

```