borrowLendUserState
Returns a user's borrow/lend positions and account health.
Field
Type
Description
type
string
Must be "borrowLendUserState"
user
string
User Ethereum address (required)
Request
curl -X POST https://api.hydromancer.xyz/info \
-H "Authorization: Bearer $HYDROMANCER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "borrowLendUserState",
"user": "0xd38809cc442fe4f10937c5988d2b723a15a89e5b"
}'import requests
import os
import json
response = requests.post(
'https://api.hydromancer.xyz/info',
json={
'type': 'borrowLendUserState',
'user': '0xd38809cc442fe4f10937c5988d2b723a15a89e5b'
},
headers={
'Authorization': f'Bearer {os.environ["HYDROMANCER_API_KEY"]}',
'Content-Type': 'application/json'
}
)
print(json.dumps(response.json(), indent=2))Response Fields
Field
Type
Description
tokenToState
array
Array of [tokenIndex, state] pairs describing the user's per-token borrow/lend position (empty if none)
health
string
Account health status (e.g. "healthy")
healthFactor
string?
Account health factor, null when the user has no borrow/lend position
Last updated