> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# borrowLendUserState | Hyperliquid info

> The info endpoint with type: "borrowLendUserState" retrieves a user's borrow/lend positions and health status on Hyperliquid. On Hyperliquid info.

<Info>
  This method is available on Chainstack. Not all Hyperliquid methods are available on Chainstack, as the open-source node implementation does not support them yet — see [Hyperliquid methods](/docs/hyperliquid-methods) for the full availability breakdown.
</Info>

The `info` endpoint with `type: "borrowLendUserState"` retrieves a user's borrow/lend positions and health status on Hyperliquid. Returns the user's active token positions, overall health status, and health factor.

## Parameters

### Request body

* `type` (string, required) — The request type. Must be `"borrowLendUserState"`.
* `user` (string, required) — Onchain address in 42-character hexadecimal format.

## Response

The response is an object containing:

* `tokenToState` (array) — Array of the user's borrow/lend positions per token.
* `health` (string) — Overall health status of the user's borrow/lend positions (e.g., `"healthy"`).
* `healthFactor` (string or null) — Numeric health factor, or `null` if the user has no active borrow/lend positions.

## Example request

<CodeGroup>
  ```shell Shell theme={"system"}
  curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"type": "borrowLendUserState", "user": "0x31ca8395cf837de08b24da3f660e77761dfb974b"}' \
    https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/info
  ```

  ```python Python (hyperliquid-python-sdk) theme={"system"}
  from hyperliquid.info import Info

  # The Python SDK has no dedicated borrowLendUserState wrapper, so post the
  # request type directly through the Info client.
  info = Info("YOUR_CHAINSTACK_ENDPOINT", skip_ws=True)

  response = info.post(
      "/info",
      {
          "type": "borrowLendUserState",
          "user": "0x31ca8395cf837de08b24da3f660e77761dfb974b",
      },
  )
  print(response)
  ```

  ```typescript TypeScript (@nktkas/hyperliquid) theme={"system"}
  import { HttpTransport, InfoClient } from "@nktkas/hyperliquid";

  const transport = new HttpTransport({ apiUrl: "YOUR_CHAINSTACK_ENDPOINT" });
  const info = new InfoClient({ transport });

  const response = await info.borrowLendUserState({
    user: "0x31ca8395cf837de08b24da3f660e77761dfb974b",
  });
  console.log(response);
  ```
</CodeGroup>

<Note>
  **Use your own endpoint in your code.** The code examples use a placeholder Chainstack endpoint (YOUR\_CHAINSTACK\_ENDPOINT) — replace it with your own Hyperliquid node endpoint from the [Chainstack console](https://console.chainstack.com/). The curl above uses a shared public endpoint for quick checks only; do not use it in production.
</Note>

## Example response

```json theme={"system"}
{
  "tokenToState": [],
  "health": "healthy",
  "healthFactor": null
}
```

## Use case

The `info` endpoint with `type: "borrowLendUserState"` is useful for:

* Displaying a user's borrow/lend positions and balances
* Monitoring health factor to assess liquidation risk
* Building lending dashboards that show active supply and borrow positions
* Implementing risk alerts when health factor drops below a threshold


## OpenAPI

````yaml openapi/hyperliquid_node_api/hypercore_info/info_borrow_lend_user_state.json post /4f8d8f4040bdacd1577bff8058438274/info
openapi: 3.0.0
info:
  title: Hyperliquid Node API
  version: 1.0.0
  description: This is an API for interacting with Chainstack Hyperliquid node.
servers:
  - url: https://hyperliquid-mainnet.core.chainstack.com
security: []
paths:
  /4f8d8f4040bdacd1577bff8058438274/info:
    post:
      tags:
        - hyperliquid operations
      summary: info (borrowLendUserState)
      operationId: infoBorrowLendUserState
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: Request type
                  default: borrowLendUserState
                  enum:
                    - borrowLendUserState
                user:
                  type: string
                  description: Onchain address in 42-character hexadecimal format
                  default: '0x31ca8395cf837de08b24da3f660e77761dfb974b'
              required:
                - type
                - user
      responses:
        '200':
          description: User's borrow/lend state including positions and health
          content:
            application/json:
              schema:
                type: object

````