Skip to main content

Max collateral swap range

GET 

/v1/data/loop/range/collateral-swap

Compute the maximum amount for a collateral swap.

The max swappable amount equals the user's collateral deposit in the source (input) asset.

Requires positions[] in the POST body (or account for GET) to read the user's collateral balances.

Plain-text reference — GET /v1/data/loop/range/collateral-swap

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).

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 collateral swap range