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
| 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). |
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[].collateralDesk | object | The 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[].debtDesk | object | The credit desk of the debt (short) asset — only whose money you OWE. A debt is not an exposure; never group strategies by it. |
data[].collateralAssetClass | stock, 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[].debtAssetClass | stock, etf, pre-ipo, fund, credit, commodity, … (7 values) | The same for the debt (short) asset. What debtAssetClasses= matches. |
data[].collateralUnderlyingTicker | string | The real-world ticker the collateral tracks (TSLA); equity classes only. What collateralUnderlyingTickers= matches. |
data[].debtUnderlyingTicker | string | The real-world ticker the debt asset tracks; equity classes only. What debtUnderlyingTickers= matches. |
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[].minDebtShort | number | Gearbox 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
- 200
- 400
- 429
- 500
- 502
Max collateral swap 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.