> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suave.money/llms.txt
> Use this file to discover all available pages before exploring further.

# Execute Routes & Quotes

> After obtaining a route, you can delegate to the SDK to execute it.

<Card title="Disclaimer" icon="triangle-exclamation">
  The Suave Aggregator SDK will only function properly in a browser-like environment. You can use a library like [web3-mock](https://github.com/DePayFi/web3-mock) to simulate this in Node.js.
</Card>

Use the `executeRoute` function to begin executing a route.

Here is a simple example of executing a route for bridging [10 USDC](https://arbiscan.io/token/0xaf88d065e77c8cC2239327C5EDb3A432268e5831) on Arbitrum to the maximum amount of [DAI](https://polygonscan.com/token/0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063) on Polygon. Note that you will need to configure a [Viem](https://viem.sh/) wallet client to your preferences in order to begin executing.

```ts theme={null}
import { getRoutes, RouteResponse, executeRoute } from '@suave-money/sdk'
import { createWalletClient, http } from 'viem'
import { mainnet } from 'viem/chains'

const client = createWalletClient({
  chain: mainnet,
  transport: http()
})

const routes: RouteResponse[] = await getRoutes({
  inputAmount: '10000000', // 10 USDC
  fromChainId: 42161, // Arbitrum
  fromToken: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831', // USDC on Arbitrum
  toChainId: 137, // Polygon
  toToken: '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063' // DAI on Polygon
})

const chosenRoute = routes[0]

await executeRoute(chosenRoute, {
  walletClient: client
})
```

## Execution parameters

Below are the parameters for the `executeRoutes` function along with their descriptions:

[route](#) `RouteResponse` `required`

This is a route object as produced by the `getRoutes` function.

[walletClient](#) `WalletClient` `required`

This is a Viem-compatible wallet client object which will be used for resolving onchain transactions such as swapping and bridging. See the [Viem docs](https://viem.sh/docs/clients/wallet) for more details.
