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[].collateralDeskobjectThe CREDIT DESK of the collateral (long) asset — the strategy's exposure and what to group strategies by. null when the asset names no issuer.
data[].debtDeskobjectThe credit desk of the debt (short) asset — only whose money you OWE. A debt is not an exposure; never group strategies by it.
data[].collateralAssetClassstock, etf, pre-ipo, fund, credit, commodity, … (7 values)WHAT KIND of real-world asset the collateral (long) asset is, from token-lists props.rwa; null = not a tokenized real-world asset. What collateralAssetClasses= matches.
data[].debtAssetClassstock, etf, pre-ipo, fund, credit, commodity, … (7 values)The same for the debt (short) asset. What debtAssetClasses= matches.
data[].collateralUnderlyingTickerstringThe real-world ticker the collateral tracks (TSLA); equity classes only. What collateralUnderlyingTickers= matches.
data[].debtUnderlyingTickerstringThe real-world ticker the debt asset tracks; equity classes only. What debtUnderlyingTickers= matches.
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[].minDebtShortnumberGearbox only: the minimum position DEBT on the debt leg, in the same human units as borrowLiquidityShort. A loop whose borrow is below it cannot be built (10–150 WETH / $5k–$500k on live CreditManagers), so hide the pair for smaller positions.

Request​

Responses​

Max open range for one or more leverage pairs