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

    Interface GetSwapPriceOptions

    Options for getting a swap price.

    interface GetSwapPriceOptions {
        network: EvmSwapsNetwork;
        toToken: `0x${string}`;
        fromToken: `0x${string}`;
        fromAmount: bigint;
        taker: `0x${string}`;
        signerAddress?: `0x${string}`;
        gasPrice?: bigint;
        slippageBps?: number;
        idempotencyKey?: string;
    }
    Index

    Properties

    network: EvmSwapsNetwork

    The network to get a price from.

    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.

    taker: `0x${string}`

    The address that will perform the swap.

    signerAddress?: `0x${string}`

    The signer address (only needed if taker is a smart contract).

    gasPrice?: bigint

    The gas price in Wei.

    slippageBps?: number

    The slippage tolerance in basis points (0-10000).

    idempotencyKey?: string

    The idempotency key.