quote

API reference to fetch a quote for a swap.

Enzyme

To execute swap with your Enzyme vault note the following:

  • taker: Address of your Enzyme vault

  • txOrigin: Address of the authorized "Manager" or "Asset Manager"

  • encodingType: Set to "enzyme-vault"

Get quote for a swap

get
Query parameters
sellTokenstringRequired

Address of the sell token

Example: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
buyTokenstringRequired

Address of the buy token

Example: 0x2260fac5e5542a773aa44fbcfedf7c193bc2c599
sellAmountstringRequired

Sell amount in token base units (e.g. Wei for ETH)

Example: 1000000000000
takerstringRequired

Address which holds the sellToken. (Allowance has to be set before execution)

Example: 0xab5801a7d398351b8be11c439e05c5b3259aec9b
txOriginstringOptional

Address of the external account that executed the tx. (Only needed if taker is a contract)

Example: 0xab5801a7d398351b8be11c439e05c5b3259aec9b
typesarrayOptional

(WIP) Liquidity sources types

sourcesanyOptional

Configuration allows three strategies: empty, include or exclude.

  • Empty: all sources are enabled.
  • Include (Whitelisting): only the given sources are enabled.
  • Exclude (Blacklisting): all sources except the given ones are enabled.
maxSlippageBpsnumber · max: 10000Optional

Maximum allowed slippage for the swap. (in basis points)

Default: 50
maxPriceImpactBpsnumber · max: 10000Optional

Max price impact for the swap. (in basis points)

Default: 10000
priceImpactExceedsErrorbooleanOptional

If true an error is returned if the price impact is exceeded. Otherwise an issue (warning) is added to the response. Defaults to false.

Default: false
minExpirySecnumber · min: 10 · max: 120Optional

Min quote expiry. (in seconds) RFQ/OTC quotes from market makers have hard expiries between 40-90 seconds. If minExpiry is set higher then MM expiries these MMs are excluded. (Keep in mind that MM pricing might be better than DEX pricing, especially if quantity is high)

Default: 35
skipSimulationbooleanOptional

Skip Tenderly simulation

Default: false
skipChecksbooleanOptional

Skip balance and allowance checks

Default: false
encodingTypestring · enumOptional

Encoding type for the returned raw transaction.

Default: basicPossible values:
Header parameters
x-api-keystringOptional

31Third API key (Request via [email protected])

chain-idstringOptional

Chain ID as hex string. (e.g.: 0x1 for Ethereum mainnet)

Responses
200Success
application/json
get
/1.3/swap/quote
200Success

Last updated