Skip to main content

Max leverage range

GET 

/v1/data/loop/range/leverage

Compute the maximum amount that can be opened in a leverage position.

Single-pair mode (provide marketUidIn + marketUidOut): returns the max open amount for one specific pair.

Multi-pair mode (provide lender + chainId): returns the max open amount for all leverage pairs of a lender, optionally filtered by marketUidIn / marketUidOut.

Zap mode: If payAmount and payPriceUSD are provided, the calculation includes the deposited amount as additional collateral before computing the leverage range.

GET fetches user balances on-chain (requires account). POST accepts a SimulationBody in the request body.

Plain-text reference — GET /v1/data/loop/range/leverage

Parameters

ParameterInTypeRequiredDescription
marketUidInquerystringnoMarket identifier for the input (debt/short) side.
marketUidOutquerystringnoMarket identifier for the output (collateral/long) side.
accountquerystringnoWallet address. Required for GET (on-chain balance fetch).
accountIdquerystringnoSub-account ID (e.g. Euler V2, Init Capital).
lenderquerystringnoLender identifier. Required for multi-pair mode. See the LenderId schema for the full set of accepted values.
chainIdquerystringnoChain ID. Required for multi-pair mode. See the ChainId schema for the full set of supported chains.
payAmountquerystringnoAmount of the pay asset to deposit (for zap calculation). Triggers zap mode when present.
payPriceUSDquerystringnoUSD price of the pay asset. If omitted, defaults to the long (collateral) asset price from the pair.

Response 200

FieldTypeDescription
successTrue
dataobject[]Array of range results.
data[].chainIdstringEVM chain id, as a decimal string. See the ChainId schema.
data[].lenderstringProtocol identifier. See the LenderId schema.
data[].marketLongUidstringMarket UID of the collateral side
data[].marketShortUidstringMarket UID of the debt side
data[].marketNameLongstringDisplay name of the collateral market/vault (e.g. the Euler eVault name). Disambiguates rows that share the collateral/debt token symbols and lender.
data[].marketNameShortstringDisplay 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[].curatorNameLongstringCurator/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[].curatorNameShortstringCurator/brand of the debt (controller) market. Same semantics as curatorNameLong.
data[].assetLongstringCollateral asset address
data[].assetShortstringDebt asset address
data[].assetGroupLongstring
data[].assetGroupShortstring
data[].symbolLongstringCollateral token symbol
data[].nameLongstringCollateral token name
data[].symbolShortstringDebt token symbol
data[].nameShortstringDebt token name
data[].collateralFactorLongnumberLiquidation collateral factor for the long side
data[].borrowCollateralFactorLongnumberBorrow-adjusted collateral factor for the long side
data[].borrowFactorLongnumberBorrow factor for the long side
data[].collateralDisabledLongbooleanWhether collateral is disabled for the long asset
data[].debtDisabledLongbooleanWhether debt is disabled for the long asset
data[].collateralFactorShortnumberLiquidation collateral factor for the short side
data[].borrowCollateralFactorShortnumberBorrow-adjusted collateral factor for the short side
data[].borrowFactorShortnumberBorrow factor for the short side
data[].collateralDisabledShortbooleanWhether collateral is disabled for the short asset
data[].debtDisabledShortbooleanWhether debt is disabled for the short asset
data[].eModeConfigIdstringE-mode configuration ID
data[].eModestringE-mode category
data[].aprBasenumberBase APR (deposit - borrow + intrinsic, before rewards)
data[].aprTotalnumberTotal APR (base + rewards)
data[].maxLeveragenumberHighest leverage multiple reachable in this market.
data[].ltvnumberLoan-to-value ratio (0-1)
data[].depositRateLongnumber
data[].variableBorrowRateShortnumber
data[].intrinsicYieldLongnumber
data[].intrinsicYieldShortnumber
data[].variableBorrowDisabledShortbooleanTrue 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[].termsShortobject[]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

Max open range for one or more leverage pairs