Skip to main content

RangeResult

Leverage pair metadata enriched with the computed max open amount. Inherits all fields from LeveragePair.

chainIdstring
lenderstring
marketLongUidstring

Market UID of the collateral side

marketShortUidstring

Market UID of the debt side

assetLongstring

Collateral asset address

assetShortstring

Debt asset address

assetGroupLongstring
assetGroupShortstring
symbolLongstring

Collateral token symbol

nameLongstring

Collateral token name

symbolShortstring

Debt token symbol

nameShortstring

Debt token name

collateralFactorLongnumber

Liquidation collateral factor for the long side

Example: 0.94
borrowCollateralFactorLongnumber

Borrow-adjusted collateral factor for the long side

Example: 0.92
borrowFactorLongnumber

Borrow factor for the long side

Example: 1
collateralDisabledLongboolean

Whether collateral is disabled for the long asset

debtDisabledLongboolean

Whether debt is disabled for the long asset

collateralFactorShortnumber

Liquidation collateral factor for the short side

Example: 0.94
borrowCollateralFactorShortnumber

Borrow-adjusted collateral factor for the short side

Example: 0.92
borrowFactorShortnumber

Borrow factor for the short side

Example: 1
collateralDisabledShortboolean

Whether collateral is disabled for the short asset

debtDisabledShortboolean

Whether debt is disabled for the short asset

eModeConfigIdstring

E-mode configuration ID

eModestring

E-mode category

aprBasenumber

Base APR (deposit - borrow + intrinsic, before rewards)

aprTotalnumber

Total APR (base + rewards)

maxLeveragenumber
ltvnumber

Loan-to-value ratio (0-1)

depositRateLongnumber
variableBorrowRateShortnumber
intrinsicYieldLongnumber
intrinsicYieldShortnumber
variableBorrowDisabledShortbooleannullable

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.

termsShort object[]nullable

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.

  • Array [
  • termIdinteger

    Broker-defined term identifier. Pass to /v1/actions/lending/borrow?termId=…. Numeric on-chain; some upstream feeds serialize it as a string — coerce with Number() when comparing.

    Example: 2
    durationDaysnumber

    How long the position is locked at the fixed rate, in days (e.g. 7, 14, 30).

    Example: 7
    durationSecsnumbernullable

    Term duration in seconds (raw on-chain value).

    Example: 604800
    aprnumber

    Annualised borrow APR for this term, in percent (e.g. 3.85 = 3.85%). Same unit as variableBorrowRate / stableBorrowRate.

    Example: 3.85
  • ]
  • rewardAprLongnumber

    Total reward APR on the collateral side

    rewardAprShortnumber

    Total reward APR on the debt side

    rewardsLongobject[]nullable

    Reward programs for the collateral side

    rewardsShortobject[]nullable

    Reward programs for the debt side

    totalDepositsLongnumber

    Total deposits in token units (long side)

    totalDebtLongnumber

    Total debt in token units (long side)

    totalLiquidityLongnumber

    Total liquidity in token units (long side)

    totalDepositsShortnumber

    Total deposits in token units (short side)

    totalDebtShortnumber

    Total debt in token units (short side)

    totalLiquidityShortnumber

    Total liquidity in token units (short side)

    totalDepositsUsdLongnumber
    totalDebtUsdLongnumber
    totalLiquidityUsdLongnumber
    totalDepositsUsdShortnumber
    totalDebtUsdShortnumber
    totalLiquidityUsdShortnumber
    borrowLiquidityShortnumber

    Available borrow liquidity (debt side) in token units

    withdrawLiquidityLongnumber

    Available withdraw liquidity (collateral side) in token units

    depositableLongnumber

    Remaining deposit capacity (collateral side) in token units

    utilizationLongnumber
    utilizationShortnumber
    underlyingInfoLong object

    Collateral asset metadata including token info, market prices, and oracle prices

    asset object

    Token metadata (address, symbol, name, decimals, logoURI, assetGroup)

    property name*any

    Token metadata (address, symbol, name, decimals, logoURI, assetGroup)

    prices object

    Market prices (priceUsd, priceUsd24h, priceChange24h)

    property name*any

    Market prices (priceUsd, priceUsd24h, priceChange24h)

    oraclePrice object

    On-chain oracle prices (oraclePrice, oraclePriceUsd)

    property name*any

    On-chain oracle prices (oraclePrice, oraclePriceUsd)

    underlyingInfoShort object

    Debt asset metadata including token info, market prices, and oracle prices

    asset object

    Token metadata (address, symbol, name, decimals, logoURI, assetGroup)

    property name*any

    Token metadata (address, symbol, name, decimals, logoURI, assetGroup)

    prices object

    Market prices (priceUsd, priceUsd24h, priceChange24h)

    property name*any

    Market prices (priceUsd, priceUsd24h, priceChange24h)

    oraclePrice object

    On-chain oracle prices (oraclePrice, oraclePriceUsd)

    property name*any

    On-chain oracle prices (oraclePrice, oraclePriceUsd)

    amountInnumberrequired

    Max open amount in the short (debt) asset units

    Example: 1.5
    amountOutnumberrequired

    Max open amount in the long (collateral) asset units

    Example: 1.2
    amountUSDnumberrequired

    Max open amount in USD

    Example: 3000
    payAmountUSDnumber

    USD value of the zap deposit (only present when payAmount query param is provided)

    Example: 2300
    modeAnalysis object

    E-mode switching analysis (only present in multi-pair mode)

    userModestring

    User's current e-mode ID

    Example: 0
    targetModestring

    Pair's optimal e-mode ID

    Example: 2
    canSwitchToTargetModeboolean

    Whether user can switch to the target mode without conflicting positions

    userModeRange object

    Range in the user's current mode (null if pair disabled in that mode)

    amountInnumberrequired

    Amount in the input asset units

    Example: 1.5
    amountOutnumberrequired

    Amount in the output asset units

    Example: 1.2
    amountUSDnumberrequired

    Amount in USD

    Example: 3000
    targetModeRange object

    Range in the pair's optimal mode

    amountInnumberrequired

    Amount in the input asset units

    Example: 1.5
    amountOutnumberrequired

    Amount in the output asset units

    Example: 1.2
    amountUSDnumberrequired

    Amount in USD

    Example: 3000
    RangeResult
    {
    "amountIn": 1.5,
    "amountOut": 1.2,
    "amountUSD": 3000,
    "payAmountUSD": 2300,
    "modeAnalysis": {
    "userMode": "0",
    "targetMode": "2",
    "canSwitchToTargetMode": true,
    "userModeRange": {
    "amountIn": 1.5,
    "amountOut": 1.2,
    "amountUSD": 3000
    },
    "targetModeRange": {
    "amountIn": 1.5,
    "amountOut": 1.2,
    "amountUSD": 3000
    }
    },
    "chainId": "string",
    "lender": "string",
    "marketLongUid": "string",
    "marketShortUid": "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": 0,
    "aprTotal": 0,
    "maxLeverage": 0,
    "ltv": 0,
    "depositRateLong": 0,
    "variableBorrowRateShort": 0,
    "intrinsicYieldLong": 0,
    "intrinsicYieldShort": 0,
    "variableBorrowDisabledShort": true,
    "termsShort": [
    {
    "termId": 2,
    "durationDays": 7,
    "durationSecs": 604800,
    "apr": 3.85
    }
    ],
    "rewardAprLong": 0,
    "rewardAprShort": 0,
    "rewardsLong": [
    {}
    ],
    "rewardsShort": [
    {}
    ],
    "totalDepositsLong": 0,
    "totalDebtLong": 0,
    "totalLiquidityLong": 0,
    "totalDepositsShort": 0,
    "totalDebtShort": 0,
    "totalLiquidityShort": 0,
    "totalDepositsUsdLong": 0,
    "totalDebtUsdLong": 0,
    "totalLiquidityUsdLong": 0,
    "totalDepositsUsdShort": 0,
    "totalDebtUsdShort": 0,
    "totalLiquidityUsdShort": 0,
    "borrowLiquidityShort": 0,
    "withdrawLiquidityLong": 0,
    "depositableLong": 0,
    "utilizationLong": 0,
    "utilizationShort": 0,
    "underlyingInfoLong": {
    "asset": {},
    "prices": {},
    "oraclePrice": {}
    },
    "underlyingInfoShort": {
    "asset": {},
    "prices": {},
    "oraclePrice": {}
    }
    }