v4

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-123911.3 KB

LiFi API compatibility endpoint for getting swap quotes. Accepts LiFi-formatted requests and returns LiFi-formatted responses.

post/lifi/quote

Request body

fromTokenstring required

Ethereum contract address (20 bytes) encoded as hexadecimal with 0x prefix

toTokenstring required

Ethereum contract address (20 bytes) encoded as hexadecimal with 0x prefix

fromAmountstring required

Amount of an ERC20 token as a decimal string (no scientific notation)

slippagenumber float

The slippage tolerance as a decimal fraction (e.g., 0.005 for 0.5%). Must be in interval [0..1].

Example request

{
  "slippage": 0.005
}

Response

Successfully calculated swap route with LiFi-compatible response

fromAmountstring required

Amount of an ERC20 token as a decimal string (no scientific notation)

toAmountstring required

Amount of an ERC20 token as a decimal string (no scientific notation)

toAmountMinstring required

Amount of an ERC20 token as a decimal string (no scientific notation)

slippagenumber float required

The applied slippage tolerance as a decimal fraction (e.g., 0.005 for 0.5%)

approveToAddressstring

Ethereum contract address (20 bytes) encoded as hexadecimal with 0x prefix

gasEstimationinteger required

Estimated gas consumption for the swap

Example response

{
  "slippage": 0.005,
  "gasEstimation": 180000
}