lendborrow

Get User Account Data

Provide detailed account metrics for a user, including available amounts for repayment, borrowing, and withdrawal, as well as the health factor—a key indicator of account risk. This endpoint is crucial for monitoring your overall position and managing risk within the lending protocol.

💡 Compute Unit Value: 110 (Fixed)

get/defi/v1/lendborrow/getuseraccountdata

Request

  • Base URL
    https://svc.blockdaemon.com
  • URL
    https://svc.blockdaemon.com/defi/v1/lendborrow/getuseraccountdata
  • Auth
    API key in header X-API-Key

Query parameters

lendborrowId'1000' | '1003' | '1005' | '1200' | '1208' | '1203' | '1204' | '1205' | '1206' | '1207' | '1100' | '1300' | '1302' | '1400' | '1401' | '1402' | '1403' | '1404'

The unique ID to specify the lending and borrowing protocol for routing relevant queries or transactions.

Example:1000
assetstring required

Asset value matching the market. Defaults to USDC if market is not provided.

Example:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
addressstring required

Public address of the sender.

Example:0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402
interestRateModestring required

Interest rate mode as defined by Aave. Default is 1.

Example:1
vsCurrenciesstring

A comma-separated list of currency symbols to convert the amount into, such as 'USD,EUR'. This parameter is optional and allows retrieving values in multiple fiat currencies.

Example:usd,eur,gbp
useCustomVaultsboolean

A boolean flag to scope the API request. If true, the request will be processed using the partner's dedicated vaults. If false or omitted, it uses the standard public pools.

marketstring

Asset market, such as USDC or WETH. Defaults to USDC if not provided.

Example:USDC
marketIdstring required

Specifies the market Id of any market in Morpho.

Example:0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5

Response

Successful response

statusnumber

Numeric status code indicating success or failure of the API call

msgstring

Human-readable message describing the API result or error

Example response

{
  "status": 200,
  "msg": "success",
  "data": {
    "loanToken": "0x4200000000000000000000000000000000000006",
    "collateralToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "withdrawAmount": "27603",
    "borrowAmount": "6578056778199",
    "repayAmount": "17251486154514",
    "isHealthy": true,
    "healthFactor": "1381303538641903951",
    "tokenAddress": "0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be",
    "borrowErrorMessage": "The Stable Rate is not enabled for this currency",
    "prices": {
      "usd": [
        {
          "0x4200000000000000000000000000000000000006": "3604.381135033486"
        },
        {
          "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913": "0.9999131743897419"
        }
      ]
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.