v1

latestOpenAPI 3.0.02026-07-26278284.4 KB
DeFi Shortcuts

Quote from a token to another

Returns the expected output amount and selected route for a token swap without executable transaction calldata.

get/api/v1/shortcuts/quote

Query parameters

chainIdnumber

Chain ID of the network to execute the quote on

fromAddressstring
Example:0xd8da6bf26964af9d7eed9e03e53415d37aa96045

Ethereum address of the wallet to quote from

tokenInstring[] required

Ethereum address of the token to swap from. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

[
  "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
]
tokenOutstring[] required

Ethereum address of the token to swap to. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

[
  "0x6b175474e89094c44da98b954eedeac495271d0f"
]
amountInstring[] required

Amount of tokenIn to swap in wei

[
  "1000000000000000000"
]
routingStrategy'ensowallet-v2' | 'router' | 'delegate' | 'router-legacy' | 'delegate-legacy' nullable

Routing strategy to use

feestring[]

Fee in basis points (1/10000) for each amountIn value. Must be in range 0-100. If specified, this percentage of each amountIn value will be sent to feeReceiver

[
  "100"
]
feeReceiverstring
Example:0x220866B1A2219f40e72f5c628B65D54268cA3A9D

The Ethereum address that will receive the collected fee. Required if fee is provided

ignoreAggregatorsstring[] nullable

A list of swap aggregators to be ignored from consideration

ignoreStandardsstring[] nullable

A list of standards to be ignored from consideration

Response

amountOutstring required
priceImpactnumber nullable

Price impact in basis points, null if USD price not found

feeAmountstring[]

An array of the fee amount collected for each tokenIn

ensoFeeAmountstring[]