Max close range
GET/v1/data/loop/range/close
Compute the maximum amount for closing (deleveraging) a position.
The max closeable amount is bounded by the smaller of the user's collateral and debt. amountIn = collateral withdrawn, amountOut = debt repaid.
Use denomination=exactInput (default) to base the range on collateral, or exactOutput to base it on debt.
Requires positions[] in the POST body (or account for GET) to read collateral and debt balances.
Plain-text reference — GET /v1/data/loop/range/close
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
marketUidIn | query | string | no | Market identifier for the input (debt/short) side. |
marketUidOut | query | string | no | Market identifier for the output (collateral/long) side. |
account | query | string | no | Wallet address. Required for GET (on-chain balance fetch). |
accountId | query | string | no | Sub-account ID (e.g. Euler V2, Init Capital). |
denomination | query | exactInput, exactOutput | no | Which side is the base denomination for the range. |
Response 200
| Field | Type | Description |
|---|---|---|
success | True | |
data | object[] | Array of range results. |
data[].chainId | string | EVM chain id, as a decimal string. See the ChainId schema. |
data[].lender | string | Protocol identifier. See the LenderId schema. |
data[].marketLongUid | string | Market UID of the collateral side |
data[].marketShortUid | string | Market UID of the debt side |
data[].marketNameLong | string | Display name of the collateral market/vault (e.g. the Euler eVault name). Disambiguates rows that share the collateral/debt token symbols and lender. |
data[].marketNameShort | string | Display name of the debt market/vault. For Euler this is the controller (debt) eVault — the primary way to tell otherwise-identical WETH→USDC rows apart. |
data[].curatorNameLong | string | Curator/brand of the collateral market (Euler: resolved from the vault governor). Null for lenders without a curator, or until the curator registry is seeded. Render as "curatorName + symbol", falling back to marketNameLong. |
data[].curatorNameShort | string | Curator/brand of the debt (controller) market. Same semantics as curatorNameLong. |
data[].assetLong | string | Collateral asset address |
data[].assetShort | string | Debt asset address |
data[].assetGroupLong | string | |
data[].assetGroupShort | string | |
data[].symbolLong | string | Collateral token symbol |
data[].nameLong | string | Collateral token name |
data[].symbolShort | string | Debt token symbol |
data[].nameShort | string | Debt token name |
data[].collateralFactorLong | number | Liquidation collateral factor for the long side |
data[].borrowCollateralFactorLong | number | Borrow-adjusted collateral factor for the long side |
data[].borrowFactorLong | number | Borrow factor for the long side |
data[].collateralDisabledLong | boolean | Whether collateral is disabled for the long asset |
data[].debtDisabledLong | boolean | Whether debt is disabled for the long asset |
data[].collateralFactorShort | number | Liquidation collateral factor for the short side |
data[].borrowCollateralFactorShort | number | Borrow-adjusted collateral factor for the short side |
data[].borrowFactorShort | number | Borrow factor for the short side |
data[].collateralDisabledShort | boolean | Whether collateral is disabled for the short asset |
data[].debtDisabledShort | boolean | Whether debt is disabled for the short asset |
data[].eModeConfigId | string | E-mode configuration ID |
data[].eMode | string | E-mode category |
data[].aprBase | number | Base APR (deposit - borrow + intrinsic, before rewards) |
data[].aprTotal | number | Total APR (base + rewards) |
data[].maxLeverage | number | Highest leverage multiple reachable in this market. |
data[].ltv | number | Loan-to-value ratio (0-1) |
data[].depositRateLong | number | |
data[].variableBorrowRateShort | number | |
data[].intrinsicYieldLong | number | |
data[].intrinsicYieldShort | number | |
data[].variableBorrowDisabledShort | boolean | True when the debt (short) market is a Lista DAO brokered market — it cannot be looped at a variable rate, only at one of the fixed terms in termsShort. variableBorrowRateShort is 0/undefined for such pairs. |
data[].termsShort | object[] | Fixed-term rate card for the debt (short) side when it is a Lista DAO brokered market. Each entry is one loop option — see the per-term net-APR recipe. null/empty for regular variable-rate pairs. For Term Finance an empty card means "not borrowable right now" rather than "no offers" — read fixedTerm.auction for why. |
Example response
{
"success": true,
"data": [
{
"chainId": "1",
"lender": "AAVE_V3",
"marketLongUid": "string",
"marketShortUid": "string",
"marketNameLong": "string",
"marketNameShort": "string",
"curatorNameLong": "string",
"curatorNameShort": "string",
"assetLong": "string",
"assetShort": "string",
"assetGroupLong": "string",
"assetGroupShort": "string",
"symbolLong": "string",
"nameLong": "string",
"symbolShort": "string",
"nameShort": "string",
"collateralFactorLong": 0.94,
"borrowCollateralFactorLong": 0.92,
"borrowFactorLong": 1,
"collateralDisabledLong": true,
"debtDisabledLong": true,
"collateralFactorShort": 0.94,
"borrowCollateralFactorShort": 0.92,
"borrowFactorShort": 1,
"collateralDisabledShort": true,
"debtDisabledShort": true,
"eModeConfigId": "string",
"eMode": "string",
"aprBase": 1.0,
"aprTotal": 1.0,
"maxLeverage": 1.0,
"ltv": 1.0,
"depositRateLong": 1.0,
"variableBorrowRateShort": 1.0,
"intrinsicYieldLong": 1.0,
"intrinsicYieldShort": 1.0,
"variableBorrowDisabledShort": true,
"termsShort": [
{
"termId": 2,
"depositApr": 1.0,
"available": 1.0,
"durationDays": 7,
"durationSecs": 604800,
"apr": 3.85,
"aprAtAmount": 1.0,
"fillable": 1.0,
"capped": true,
"ladder": [
{
"apr": 1.0,
"units": "string",
"assets": 1.0
}
]
}
],
"fixedTerm": {
"model": "term",
"maturity": 1,
"fees": {},
"earlyRepay": {},
"provider": {},
"auction": {
"status": "open",
"canBorrow": true,
"canLend": true,
"secondsUntilClose": 263000,
"implications": [
"string"
],
"id": "string",
"startTime": 1,
"revealTime": 1,
"endTime": 1,
"minBorrowAmount": "1000000000",
"minLendAmount": "1000000000"
}
},
"rewardAprLong": 1.0,
"rewardAprShort": 1.0,
"rewardsLong": [
{}
],
"rewardsShort": [
{}
],
"totalDepositsLong": 1.0,
"totalDebtLong": 1.0,
"totalLiquidityLong": 1.0,
"totalDepositsShort": 1.0,
"totalDebtShort": 1.0,
"totalLiquidityShort": 1.0,
"totalDepositsUsdLong": 1.0,
"totalDebtUsdLong": 1.0,
"totalLiquidityUsdLong": 1.0,
"totalDepositsUsdShort": 1.0,
"totalDebtUsdShort": 1.0,
"totalLiquidityUsdShort": 1.0,
"borrowLiquidityShort": 1.0,
"withdrawLiquidityLong": 1.0,
"depositableLong": 1.0,
"utilizationLong": 1.0,
"utilizationShort": 1.0,
"underlyingInfoLong": {
"asset": {},
"prices": {},
"oraclePrice": {}
},
"underlyingInfoShort": {
"asset": {},
"prices": {},
"oraclePrice": {}
}
}
]
}
Request
Responses
- 200
- 400
- 429
- 500
- 502
Max close range
Validation error
Rate limited. Unauthenticated callers share a per-IP budget; send an x-api-key header to lift it. Retry with exponential backoff.
Unexpected server error. Safe to retry with backoff.
An upstream data source or protocol origin failed (error.code is ORIGIN_FAILED). error.details carries the per-origin status. This is also what a missing or malformed required parameter currently returns, rather than a 400.