Options for getting a swap price.

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

Properties

fromAmount: bigint

The amount to send in atomic units of the token.

fromToken: `0x${string}`

The token to send (source token).

gasPrice?: bigint

The gas price in Wei.

idempotencyKey?: string

The idempotency key.

The network to get a price from.

signerAddress?: `0x${string}`

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

slippageBps?: number

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

taker: `0x${string}`

The address that will perform the swap.

toToken: `0x${string}`

The token to receive (destination token).