Skip to main content
POST
/
v1
/
info
/
clearinghouseState
Get Clearinghouse State
curl --request POST \
  --url https://api.hypereth.io/v1/info/clearinghouseState \
  --header 'Content-Type: application/json' \
  --data '{
  "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": 123
}

Body

application/json
type
enum<string>
required

Request type identifier

Available options:
clearinghouseState
user
string
required

User's Ethereum address

Response

Account clearinghouse state

Comprehensive account state

assetPositions
object[]

User's current positions

crossMaintenanceMarginUsed
string

Cross maintenance margin used

Example:

"800.0"

crossMarginSummary
object

Cross margin account summary

marginSummary
object

Margin account summary

withdrawable
string

Amount available for withdrawal

Example:

"8750.75"

time
integer

State timestamp