Best route for a swap

Returns the best execution route (targets, calldatas, amounts, minAmountOut), measured price impact in ppm, split suggestions for large orders, and server-resolved fee legs. Amounts are raw integer token units.

get/v1/route

Request

  • Base URL: https://api.epsilon.exchange
  • URL: https://api.epsilon.exchange/v1/route
  • Auth: API key in header X-API-Key

Query parameters

tokenInstring required

ERC-20 address (0x-hex)

tokenOutstring required

ERC-20 address (0x-hex)

amountInstring required

Raw integer amount in tokenIn's smallest unit

slippagePpminteger

Slippage tolerance in parts-per-million

directSwap'0' | '1'

1 = quote the direct swap path, 0 = quote the signed-order (keeper) path

walletstring

Trading wallet — resolves account-specific fee legs

referrerstring

Permissionless rev-share: your payout address (nonzero 0x…). The served feeLegs.referrer becomes this address; have the maker sign it and the referral leg of every fill is paid to you on-chain. The ppm is policy-set and cannot be changed. No registration required.

Response

Route

object required

Changes

No recorded changes to this operation across all 1 revision of this API.