HyperliquidHyperliquid REST APIUser data

Get Clearinghouse State

Returns comprehensive account state including margin, positions, and risk metrics.

Rate Limit: 20 weight

POST
/v1/info/clearinghouseState

Request Body

application/json

type*enum<string>required

Request type identifier

Available options: clearinghouseState
user*stringrequired

User's Ethereum address

Response Body

application/json

application/json

curl -X POST "https://api.hypereth.io/v1/info/clearinghouseState" \  -H "Content-Type: application/json" \  -d '{    "type": "clearinghouseState",    "user": "0x31ca8395cf837de08b24da3f660e77761dfb974b"  }'
{
  "assetPositions": [
    {
      "position": {
        "coin": "BTC",
        "szi": "0.5",
        "entryPx": "43000.0",
        "positionValue": "21625.0",
        "returnOnEquity": "5.25",
        "unrealizedPnl": "125.0",
        "leverage": {
          "type": "cross",
          "value": "2.5",
          "rawUsd": "8650.0"
        },
        "liquidationPx": "38500.0",
        "marginUsed": "4312.50",
        "maxLeverage": "20",
        "cumFunding": {
          "allTime": "25.75",
          "sinceChange": "2.50",
          "sinceOpen": "5.25"
        }
      },
      "type": "oneWay"
    }
  ],
  "crossMaintenanceMarginUsed": "800.0",
  "crossMarginSummary": {
    "accountValue": "10250.75",
    "totalNtlPos": "25000.0",
    "totalRawUsd": "10000.0",
    "totalMarginUsed": "1500.0"
  },
  "marginSummary": {
    "accountValue": "10250.75",
    "totalNtlPos": "25000.0",
    "totalRawUsd": "10000.0",
    "totalMarginUsed": "1500.0"
  },
  "withdrawable": "8750.75",
  "time": 0
}
{
  "error": "Insufficient margin for order placement",
  "code": 1001,
  "details": {}
}