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

# Ledger Updates

GET /ws

Subscribe to Hyperliquid deposits, withdrawals, transfers, and other non-funding ledger activity for a Predict master account or subaccount.

Reference: https://docs.staging.trypredict.com/api-reference/web-socket-api/ledger-updates

## AsyncAPI Specification

```yaml
asyncapi: 2.6.0
info:
  title: Ledger Updates
  version: subpackage_ledger-updates.ledger-updates
  description: >-
    Subscribe to Hyperliquid deposits, withdrawals, transfers, and other
    non-funding ledger activity for a Predict master account or subaccount.
channels:
  /ws:
    description: >-
      Subscribe to Hyperliquid deposits, withdrawals, transfers, and other
      non-funding ledger activity for a Predict master account or subaccount.
    publish:
      operationId: subpackage_ledger-updates.ledger-updates-publish
      summary: Server message
      message:
        name: update
        payload:
          $ref: '#/components/schemas/ledgerUpdates_LedgerUpdatesMessage'
    subscribe:
      operationId: subpackage_ledger-updates.ledger-updates-subscribe
      summary: Client message
      message:
        name: subscribe
        payload:
          $ref: '#/components/schemas/ledgerUpdates_SubscribeLedgerUpdates'
servers:
  Testnet:
    url: wss://api.hyperliquid-testnet.xyz/
    protocol: wss
    x-default: true
  Mainnet:
    url: wss://api.hyperliquid.xyz/
    protocol: wss
components:
  schemas:
    ledgerUpdates_LedgerUpdatesMessage:
      type: object
      properties:
        channel:
          type: string
          enum:
            - userNonFundingLedgerUpdates
        data:
          description: Any type
      required:
        - channel
        - data
      title: LedgerUpdatesMessage
    common_SubscriptionMethod:
      type: string
      enum:
        - subscribe
        - unsubscribe
      title: SubscriptionMethod
    common_Address:
      type: string
      description: Master account or subaccount address.
      title: Address
    ledgerUpdates_LedgerUpdatesSubscription:
      type: object
      properties:
        type:
          type: string
          enum:
            - userNonFundingLedgerUpdates
        user:
          $ref: '#/components/schemas/common_Address'
      required:
        - type
        - user
      title: LedgerUpdatesSubscription
    ledgerUpdates_SubscribeLedgerUpdates:
      type: object
      properties:
        method:
          $ref: '#/components/schemas/common_SubscriptionMethod'
        subscription:
          $ref: '#/components/schemas/ledgerUpdates_LedgerUpdatesSubscription'
      required:
        - method
        - subscription
      title: SubscribeLedgerUpdates

```