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"
  }'

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

Response
{
  "tokenToState": [],
  "health": "healthy",
  "healthFactor": null
}

Last updated