clearinghouseState
Get the complete clearinghouse state for a single user.
POST Request
Field
Type
Description
type
string
Must be "clearinghouseState"
user
string
Ethereum address (0x-prefixed, 42 characters)
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.
Usage
If ALL_DEXES is not passed one call will consume 1 point.
When passing ALL_DEXES as dex the points consumed is the number of dexes that are operational. Therefore, you should be mindful about if you really need to this.
curl -X POST https://api.hydromancer.xyz/info \
-H "Authorization: Bearer $HYDROMANCER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "clearinghouseState",
"user": "0x0000000000000000000000000000000000000000"
}'import requests
import os
response = requests.post(
'https://api.hydromancer.xyz/info',
json={
'type': 'clearinghouseState',
'user': '0x0000000000000000000000000000000000000000'
},
headers={
'Authorization': f'Bearer {os.environ.get("HYDROMANCER_API_KEY")}',
'Content-Type': 'application/json'
}
)
print(response.json())Last updated