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

# API cookbook

> Find the endpoints and examples for what you want to build.

Start with the task below, then open its recipe for code and the details to handle in your app. The examples use plain JavaScript and Route's HTTP API at `https://api.route.fun`. No API key is required.

## Tokens and wallets

| Build this                             | Endpoint                                                 | Recipe                                                             |
| -------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------ |
| A token picker with the starter list   | [GET /api/v2/tokens](/api-reference/v2-tokens)           | [Select and import tokens](/cookbook/select-tokens)                |
| Import a token by its contract address | [GET /api/v2/tokens?address=…](/api-reference/v2-tokens) | [Look up an address](/cookbook/select-tokens#look-up-an-address)   |
| Show a wallet's listed token balances  | [GET /api/v2/tokens?wallet=…](/api-reference/v2-tokens)  | [Add wallet balances](/cookbook/select-tokens#add-wallet-balances) |

## Quotes and swaps

| Build this                                         | Endpoint                                       | Recipe                                                                |
| -------------------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------- |
| Read supported providers and executor addresses    | [GET /api/v2/config](/api-reference/v2-config) | [Prepare a swap](/cookbook/prepare-swap)                              |
| Show a swap quote and compare the available routes | [GET /api/v2/quote](/api-reference/v2-quote)   | [Compare swap quotes](/cookbook/compare-quotes)                       |
| Turn an ETH quote into an unsigned transaction     | [POST /api/v2/swap](/api-reference/v2-swap)    | [Prepare a native-ETH swap](/cookbook/prepare-swap)                   |
| Handle approvals, signing and confirmation         | Swap API plus the user's wallet                | [Complete the wallet flow](/cookbook/wallet-lifecycle)                |
| Recover from an expired quote or busy API          | HTTP status, error code and `Retry-After`      | [Handle API failures](/cookbook/wallet-lifecycle#handle-api-failures) |

## Activity and fees

| Build this                                      | Endpoint                                           | Recipe                                        |
| ----------------------------------------------- | -------------------------------------------------- | --------------------------------------------- |
| Display total transactions and estimated volume | [GET /api/v2/activity](/api-reference/v2-activity) | [Show swap activity](/cookbook/show-activity) |
| Display swap fees                               | Current quote fields and the active fee schedule   | [Integrate swap fees](/cookbook/tiered-fees)  |

## Before you start

Use Robinhood Chain, chain ID `4663`. Pass amounts as integer strings in token base units. A quote is an estimate; `/api/v2/swap` prepares an unsigned transaction, and the user's wallet signs it.

Route's API discloses [pair-dependent swap fees](/concepts/fees) from 0% to 0.50%. Users pay network gas. The public API does not include a market-data feed.
