CDP SDK TypeScript - v1.31.0
    Preparing search index...

    Interface GetSwapPriceResult

    Result of getting a swap price.

    interface GetSwapPriceResult {
        liquidityAvailable: true;
        toToken: `0x${string}`;
        fromToken: `0x${string}`;
        fromAmount: bigint;
        toAmount: bigint;
        minToAmount: bigint;
        blockNumber: bigint;
        fees: SwapFees;
        issues: SwapIssues;
        gas?: bigint;
        gasPrice?: bigint;
    }
    Index

    Properties

    liquidityAvailable: true

    Whether liquidity is available for the swap.

    toToken: `0x${string}`

    The token to receive (destination token).

    fromToken: `0x${string}`

    The token to send (source token).

    fromAmount: bigint

    The amount to send in atomic units of the token.

    toAmount: bigint

    The amount to receive in atomic units of the token.

    minToAmount: bigint

    The minimum amount to receive after slippage in atomic units of the token.

    blockNumber: bigint

    The block number at which the liquidity conditions were examined.

    fees: SwapFees

    The estimated fees for the swap.

    issues: SwapIssues

    Potential issues discovered during validation.

    gas?: bigint

    The gas estimate for the swap.

    gasPrice?: bigint

    The gas price in Wei.