Added

v1.10.0 - 2025-10-14

Added

  • New mmp WebSocket channel for Market Maker Protection events

    • Purpose: Monitor when MMP (Market Maker Protection) is triggered, temporarily freezing an account's trading when risk thresholds are exceeded
    • Benefits: Real-time notifications of risk threshold violations, proactive risk management, automated trading pause awareness
    • New capabilities: Track freeze status, monitor freeze duration, filter by account or trading pair

    Example subscription:

    {
      "channel": "mmp",
      "query": {
        "smart_account_address": "0x1234567890abcdef1234567890abcdef12345678",
        "pair": "BTC_USDC"  // optional
      }
    }

    Event data received:

    {
      "kind": "event",
      "type": "mmp_triggered",
      "timestamp_ms": 1677721600000,
      "data": {
        "smart_account_address": "0xabCDEF1234567890ABcDEF1234567890aBCDeF12",
        "pair_symbol": "ETH_USDC",
        "frozen_until": 1677721660000,
        "frozen_duration_seconds": 60
      }
    }

    Query parameters:

    • smart_account_address (optional): Filter events for a specific smart account
    • pair (optional): Filter events for a specific trading pair (BTC_USDC, ETH_USDC, or ARB_USDC)

    Use cases:

    • Market makers monitoring their own MMP status
    • Risk management systems tracking protection triggers
    • Automated trading bots pausing operations during freeze periods
  • New bankruptcy WebSocket channel for account bankruptcy events

    • Purpose: Monitor when account equity becomes negative after liquidation attempts, representing losses absorbed by the insurance fund
    • Benefits: Real-time bankruptcy notifications, insurance fund impact tracking, systemic risk monitoring
    • New capabilities: Track bankruptcy events by market, monitor insurance fund utilization

    Example subscription:

    {
      "channel": "bankruptcy",
      "query": {
        "market": "ETH_USDC"  // optional
      }
    }

    Event data received:

    {
      "kind": "event",
      "type": "bankruptcy",
      "timestamp_ms": 1677721600000,
      "data": {
        "marginAccountId": "550e8400-e29b-41d4-a716-446655440000",
        "market": "ETH_USDC"
      }
    }

    Query parameters:

    • market (optional): Filter events by trading pair (BTC_USDC, ETH_USDC, ARB_USDC, or USDC_USDC)

    Use cases:

    • Risk managers monitoring systemic risk indicators
    • Insurance fund tracking and analysis
    • Market health monitoring and alerting

Documentation

  • Complete WebSocket API documentation updates
    • Added detailed channel descriptions for mmp and bankruptcy channels
    • Added event data structures with field descriptions
    • Added subscription examples with multiple query parameter combinations
    • Updated Available Channels table with new entries
    • Updated Event Types table with mmp_triggered and bankruptcy events