Skip to main content
type GetSwapPriceResult = {
  liquidityAvailable: true;
  network: EvmSwapsNetwork;
  fromToken: string;
  fromAmount: string;
  toToken: string;
  toAmount: string;
  minToAmount: string;
  fees:   | SwapFees
     | null;
  issues:   | SwapIssues
     | null;
  totalNetworkFee: string | null;
};
Returned when liquidity is available for the requested swap.

Properties

PropertyTypeDescription
liquidityAvailabletrueAlways true when this type is returned.
networkEvmSwapsNetworkThe network.
fromTokenstringThe fromToken address.
fromAmountstringThe fromAmount in atomic units.
toTokenstringThe toToken address.
toAmountstringExpected output at current market price, in atomic units.
minToAmountstringMinimum output after slippage, in atomic units.
fees| SwapFees | nullFees to be deducted in this transaction, or null.
issues| SwapIssues | nullPreflight issues (e.g. insufficient allowance or balance) that may prevent execution, or null.
totalNetworkFeestring | nullThe estimated total network cost of the swap. On chains where there is no L1 data cost, it is calculated as gas * gasPrice. On chains where there is an L1 data cost, it is calculated as gas * gasPrice + L1 data cost.