shortcuts

Quote from a token to another

Changed on
get/api/v1/shortcuts/quote

Request

  • Base URL
    https://api.enso.finance
  • URL
    https://api.enso.finance/api/v1/shortcuts/quote
  • Auth
    HTTP bearer

Query parameters

chainIdnumber required

Chain ID of the network to execute the transaction on

fromAddressstring
Example:0xd8da6bf26964af9d7eed9e03e53415d37aa96045

Ethereum address of the wallet to send the transaction from

routingStrategy'ensowallet-v2' | 'router' | 'delegate' | 'router-legacy' | 'delegate-legacy' nullable

Routing strategy to use

tokenInstring[] required

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

[
  "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
]
tokenOutstring[] required

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

[
  "0x6b175474e89094c44da98b954eedeac495271d0f"
]
amountInstring[] required

Amount of tokenIn to swap in wei

[
  "1000000000000000000"
]
ignoreAggregatorsstring[] nullable

A list of swap aggregators to be ignored from consideration

ignoreStandardsstring[] nullable

A list of standards to be ignored from consideration

effort'light' | 'medium' | 'high' | 'max'

Latency/quality trade-off for aggregator querying. light returns fastest (short aggregator wait with early return once two usable quotes arrive), medium waits the full short window, high is the default balanced behavior, and max queries all aggregators in parallel with an extended wait for best execution (higher CU cost)

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[]

Example response

{
  "route": [
    {
      "via": "cctp-forwarder"
    }
  ]
}

Changes