Skip to main content
GET
/
v2
/
credit
/
positions
Python (SDK)
from compass_api_sdk import CompassAPI, models


with CompassAPI(
    api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:

    res = compass_api.credit.credit_positions(chain=models.V2CreditPositionsChain.BASE, owner="0x01E62835dd7F52173546A325294762143eE4a882")

    # Handle response
    print(res)
{
  "account_summary": {
    "health_factor": "<string>",
    "total_collateral_usd": "<string>",
    "total_debt_usd": "<string>",
    "available_borrows_usd": "<string>",
    "ltv": "<string>",
    "emode_category_id": 0,
    "emode_label": "<string>"
  },
  "collateral_positions": [],
  "debt_positions": [],
  "borrowable_tokens": [],
  "total_usd_value": "<string>"
}

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Query Parameters

chain
enum<string>
default:base
required
Available options:
arbitrum,
base,
ethereum
owner
string
default:0x01E62835dd7F52173546A325294762143eE4a882
required

The address of the owner of the credit account to get positions for.

Response

Successful Response

Credit account positions response with per-reserve positions and account summary.

account_summary
AccountSummary · object
required

Aave account-level summary (health factor, LTV, etc.).

collateral_positions
CollateralPosition · object[]

All collateral positions, one per reserve.

debt_positions
DebtPosition · object[]

All debt positions, one per reserve.

borrowable_tokens
BorrowableToken · object[]

All tokens available for borrowing with max amounts based on current collateral.

total_usd_value
string | null

Net position value in USD (total collateral - total debt). Null if prices unavailable.