Skip to main content
POST
borrowLendUserState | Hyperliquid Info API

Credit Cost

1 per call

Processing

Realtime
The Hyperliquid info endpoint with type: "borrowLendUserState" is used to monitor a wallet’s current borrow/lend positions and liquidation risk (account health) in a single call.
Estimate your monthly cost for this API using the Pricing Calculator.
  • Wire-equal to POST api.hyperliquid.xyz/info with {"type": "borrowLendUserState", "user": "..."}.
  • tokenToState is an array of [tokenIndex, state] pairs — empty for users with no borrow/lend positions (the common case). tokenIndex is the Hyperliquid token index (e.g. 150 = HYPE on mainnet).
  • Each state has borrow and supply objects shaped { "value": <string>, "basis": <string> } — value is the amount owed or held now, basis is the cost basis.
  • health is one of "healthy", "atRisk", or "liquidatable"; healthFactor is a decimal string, or nulluntil the user borrows.
  • Balances and healthFactor are decimal strings — keep them as strings or use a fixed-precision decimal type rather than parsing as floats.
Returns a user’s current spot borrow/lend state: the borrowed and supplied (lent) balance of each token the user holds a position in, plus an account-level health summary. The payload is a JSON object with tokenToState, health, and healthFactor; tokenToState is an array of [tokenIndex, state] pairs and is empty for users with no borrow/lend positions.

Endpoint

Request

string
required
Always "borrowLendUserState".
string
required
The wallet address (lowercase 0x-prefixed hex).

Example

Response

A single object. This wallet borrows USDC (token 0) against HYPE (token 150) it has supplied:
A wallet with no borrow/lend positions returns an empty tokenToState and a null healthFactor:

Field descriptions

value, basis and healthFactor are returned as decimal strings, preserving upstream precision. Do not parse them as floats.
array
One [tokenIndex, state] pair per token the user has a borrow/lend position in. Empty when the user has none.
string
Account health: "healthy", "atRisk" or "liquidatable".
string | null
Account health factor as a decimal string, or null until the user borrows.

userBorrowLendInterest

fetch a user’s borrow/lend interest accrual history.

clearinghouseState

fetch a single user’s perpetuals account state by wallet address.

spotClearinghouseState

fetch a single user’s spot account balances by wallet address.

liquidatable

list accounts currently eligible for liquidation.
See all Hyperliquid endpoints: Overview hub · Info API reference Last reviewed: 2026-11-05