---
title: "Get Route"
method: GET
path: "/defi/v1/dex/getroute"
tags: ["dex"]
---

# Get Route

`GET /defi/v1/dex/getroute`

## Request

- Base URL: `https://svc.blockdaemon.com`
- URL: `https://svc.blockdaemon.com/defi/v1/dex/getroute`
- Auth: API key in header `X-API-Key`

Returns detailed routing information for a token swap between a specified token pair. It provides a breakdown of the swap path, including each liquidity source involved, the corresponding swap details such as input/output amounts, and any associated fees, enabling users to assess and choose the optimal route for their trade.

> 💡 
**Compute Unit Value:** `30` (Fixed)

## Query parameters

- `dexId` '2600': The unique ID to specify the decentralized exchange (DEX) within a particular blockchain. Find more [here](https://docs.blockdaemon.com/docs/defi-api-supported-protocols#supported-dexs-protocols).
- `path` string, required: Array of token contract addresses for the source and destination tokens. Provide [srcTokenAddress, dstTokenAddress].
- `amountIn` string, required: Amount of the input token to provide, specified in the token's smallest denomination (base units). Do not send human-readable decimal values. Examples: to swap 1 WETH (18 decimals), use "1000000000000000000"; to swap 1 USDC (6 decimals), use "1000000".
- `vsCurrencies` string: A comma-separated list of currency symbols to convert the amount into, such as 'USD,EUR'. This parameter is optional and allows retrieving values in multiple fiat currencies.

## Response `200`

Successful response

- object
  - `status` integer
  - `msg` string
  - `data` object

---

[API](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api.md) - [All operations](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api/llms.txt) - [OpenAPI document](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api/revisions/ec053b7c8041?raw)
