activeAssetData
Get asset data for a specific user and coin.
activeAssetData gives you a wallet's trading settings and capacity for one coin in a single API request: its leverage, the largest order it can place, and the margin available.
It works for main perps and HIP-3 markets (e.g. xyz:XYZ100).
POST Request
Field
Type
Description
type
string
Must be "activeAssetData"
user
string
Ethereum address (0x-prefixed, 42 characters)
coin
string
symbol e.g. "BTC"
curl -X POST https://api.hydromancer.xyz/info \
-H "Authorization: Bearer $HYDROMANCER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "activeAssetData",
"user": "0x0000000000000000000000000000000000000000",
"coin": "BTC"
}'import requests
import os
response = requests.post(
'https://api.hydromancer.xyz/info',
json={
'type': 'activeAssetData',
'user': '0x0000000000000000000000000000000000000000',
'coin': 'BTC'
},
headers={
'Authorization': f'Bearer {os.environ.get("HYDROMANCER_API_KEY")}',
'Content-Type': 'application/json'
}
)
print(response.json())Response Fields
Field
Type
Description
user
string
User address
coin
string
Coin symbol
leverage.type
string
Leverage type ("cross" or "isolated")
leverage.value
int
Leverage value
leverage.rawUsd
string | null
Raw USD margin (only present if isolated)
maxTradeSzs
array
Maximum trade sizes [long, short]
availableToTrade
array
Available to trade [long, short]
markPx
string
Current mark price
Last updated