---
title: "Best route for a swap"
method: GET
path: "/v1/route"
---

# Best route for a swap

`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`

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.

## Query parameters

- `tokenIn` string, required
- `tokenOut` string, required
- `amountIn` string, required
- `slippagePpm` integer
- `directSwap` '0' | '1'
- `wallet` string
- `referrer` string

## Response `200`

Route

- object

## Other responses

- `401`: Missing or invalid API key
- `429`: Per-key rate limit exceeded — see X-RateLimit-* and Retry-After headers

---

[API](https://skmtc.dev/epsilon/apis/epsilon-public-api.md) · [All operations](https://skmtc.dev/epsilon/apis/epsilon-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/epsilon/apis/epsilon-public-api/revisions/8a6e06ae2b0d?raw)
