Skip to main content

Subscribe

{
  "method": "subscribe",
  "subscription": {
    "type": "accountSummary",
    "user": "0x742d35cc6634c0532925a3b844bc9e7595f0beb"
  }
}

Response

{
  "channel": "accountSummary",
  "data": {
    "user": "0x742d35cc6634c0532925a3b844bc9e7595f0beb",
    "summary": {
      "crossMaintenanceMargin": "500.00",
      "accountBalance": "10000.00",
      "availableMargin": "9000.00",
      "crossMarginSummary": {
        "totalUnrealizedPnL": "50.00",
        "accountValue": "10050.00",
        "collateralValue": "10000.00",
        "crossMarginRatio": "2.0100",
        "totalMarginUsed": "1000.00",
        "crossAccountLeverage": "0.50"
      },
      "balances": [
        {
          "coin": "USDC",
          "hold": "0",
          "segregated": "0",
          "total": "10000.00",
          "borrowed": "0"
        }
      ],
      "assetPositions": [
        {
          "type": "oneWay",
          "position": {
            "coin": "BTC",
            "cumFunding": {
              "allTime": "0",
              "sinceChange": "0",
              "sinceOpen": "0"
            },
            "entryPx": "50000.00",
            "leverage": {
              "type": "cross",
              "value": "5"
            },
            "liquidationPx": null,
            "marginUsed": "1000.00",
            "maxLeverage": "10",
            "positionValue": "5000.00",
            "returnOnEquity": "0.05",
            "szi": "0.1",
            "unrealizedPnl": "50.00",
            "hasTpsl": false
          }
        }
      ],
      "borrowedUsdc": "0.00",
      "debtPersisted": "0.00",
      "borrowApr": "0.0523",
      "pendingWithdrawalsCount": 0,
      "time": 1701234567890
    }
  }
}

Notes

  • Numeric values are serialized as strings except for counters and timestamps. - The server sends an initial snapshot only when account data is available. - Updates may include lastWithdrawalResult when a withdrawal completes or fails.