batchClearinghouseStates

Get clearinghouse states for multiple users in a single request.

Get clearinghouse states for multiple users in a single request.

💧New endpoint - this endpoint is not a part of original Hyperliquid API and is added by us for builder convenience.

POST Request

Field
Type
Description

type

string

Must be "batchClearinghouseStates"

users

array

Array of Ethereum addresses

dex

string

Perp DEX name. Defaults to empty string (native DEX). Use "ALL_DEXES" to fetch clearinghouse state across all dexes (native + all HIP-3 dexes) in one request.

Limits

You can query 1000 users at once. Note that with the ALL_DEXES field passed that limit is 100 users.

curl -X POST https://api.hydromancer.xyz/info \
  -H "Authorization: Bearer $HYDROMANCER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "batchClearinghouseStates",
    "users": [
      "0x0000000000000000000000000000000000000001",
      "0x0000000000000000000000000000000000000002"
    ]
  }'

Response Fields

Field
Type
Description

successful_states

array

Array of [address, clearinghouseState] tuples

successful_states[n][0]

string

User address

successful_states[n][1].marginSummary

object

Margin summary (accountValue, totalMarginUsed, totalNtlPos, totalRawUsd, withdrawable)

successful_states[n][1].crossMarginSummary

object

Cross margin summary (same fields as marginSummary)

successful_states[n][1].assetPositions

array

Array of position objects

successful_states[n][1].time

int

Timestamp in milliseconds

failed_wallets

array

Array of addresses that failed to fetch

Response
Response ALL_DEXES

Last updated