For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get account loan info

This endpoint returns loan and collateral information for a given account under unified margin.

GET /api/v1/account/loan

Query Parameters

Field
Type
Need
Description
Example

"account"

string

required

Account address

42trU9A5...

/api/v1/account/loan?account=42trU9A5...

Response

  • Status 200: Successfully retrieved account loan info

{
  "success": true,
  "data": {
    "borrowed": "1250.500000",
    "pending_interest": "3.250000",
    "collateral_utilization": "0.45",
    "total_interest_earned": "120.750000",
    "total_interest_paid": "85.300000",
    "spot_balances": [
      {
        "symbol": "SOL",
        "amount": "10.00000000",
        "ltv_ratio": "0.90",
        "market_value": "1500.000000",
        "collateral_value": "1350.000000"
      }
    ],
    "updated_at": 1716200000000
  },
  "error": null,
  "code": null
}
Field
Type
Description

'borrowed'

decimal string

Current borrowed amount in USD

'pending_interest'

decimal string

Accrued interest not yet repaid

'collateral_utilization'

decimal string

Ratio of borrowed amount to total spot collateral capacity

'total_interest_earned'

decimal string

Total interest earned as a lender (cumulative)

'total_interest_paid'

decimal string

Total interest paid as a borrower (cumulative, returned as positive)

'spot_balances'

array

Spot balances with their effective LTV and collateral contribution (see below)

'updated_at'

integer

Timestamp in milliseconds of last data update

Spot Balance Fields

Field
Type
Description

'symbol'

string

Spot asset symbol

'amount'

decimal string

Spot balance amount

'ltv_ratio'

decimal string

Effective LTV ratio used for loan collateral

'market_value'

decimal string

Raw marked-to-market USD value of this positive spot balance

'collateral_value'

decimal string

Effective collateral contribution of this asset after LTV/cap logic

  • Status 404: Account loan cache not found

  • Status 500: Internal server error

Code Example (Python)

Last updated