> ## 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.

# Solana

> The same quote-and-build call on Solana: mints instead of addresses, nothing to approve.

Base URL `https://partners.route.fun/solana`. Same call as every other chain: `GET /quote` with `in`, `out` and `amount`, plus
`recipient` for the transaction. What differs:

| | EVM chains | Solana |
| - | - | - |
| Tokens | Addresses | Mints (base58) |
| Approve first | Yes, `swap.spender` | No |
| Native token | Zero address | Wrapped SOL mint `So11111111111111111111111111111111111111112` |
| Response fields | camelCase (`swap.netOut`) | snake\_case (`amount_out_after_fee`) |

Amounts are raw units (1 SOL = `1000000000`). A SOL input is taken from the wallet's native SOL, and SOL output arrives as native
SOL.

```bash theme={null}
curl -G "https://partners.route.fun/solana/quote" \
  --data-urlencode "in=So11111111111111111111111111111111111111112" \
  --data-urlencode "out=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" \
  --data-urlencode "amount=100000000"
```

```json Response (trimmed) theme={null}
{
  "amount_out": 9783530,
  "amount_out_after_fee": 9781574,
  "fee_bps": 2,
  "fee_tier": "nativeStable",
  "hops": ["So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"],
  "legs": [ ... ],
  "slot": 463174643
}
```

## Swap

```ts theme={null}
import { Connection, VersionedTransaction } from "@solana/web3.js";

const ROUTE = "https://partners.route.fun/solana";

// Backend: a partner key stays on the server. (On the public tier, drop the header.)
export async function buildSwap(input: string, output: string, amount: bigint, user: string) {
  const q = new URLSearchParams({ in: input, out: output, amount: amount.toString(), recipient: user, slippageBps: "50" });
  const res = await fetch(`${ROUTE}/quote?${q}`, { headers: { authorization: `Bearer ${process.env.ROUTE_API_KEY}` } });
  const body = await res.json();
  if (!res.ok) throw new Error(body.error ?? `Route returned ${res.status}`);
  return body; // tx, amount_out, amount_out_after_fee, min_out, fee_bps, expiry_slot
}

// Client: the wallet signs and sends.
export async function sendSwap(build: { tx: string }, wallet: { signTransaction(t: VersionedTransaction): Promise<VersionedTransaction> }, connection: Connection) {
  const signed = await wallet.signTransaction(VersionedTransaction.deserialize(Buffer.from(build.tx, "base64")));
  const sig = await connection.sendRawTransaction(signed.serialize(), { maxRetries: 3 });
  await connection.confirmTransaction(sig, "confirmed");
  return sig;
}
```

Before answering, Route runs the whole transaction on current state and never returns one that fails. `min_out` is enforced on
chain. The transaction expires at `expiry_slot`, about 60 seconds out: build again rather than resend.

| Parameter | Default | |
| - | - | - |
| `slippageBps` | `50` | `min_out` is the quote less this |
| `cuPrice` | `10000` | Priority fee, micro-lamports per compute unit |
| `split` | | `true` or `false`: allow routes split across paths |
| `exclude` | | Quotes without `recipient`: comma-separated venue labels or program ids not to use |
| `gasless` | `false` | Route's relayer pays the network fee ([gasless](https://docs.route.fun/solana/gasless.md)) |

## Programs

| Program | Address |
| - | - |
| route-exec (swaps) | `6Fjz5w34GB4otWHR12Hrni2tDRZme97dGcNbTU7dY8ho` |
| route-delegate (orders, agents) | `AfeNwe9GoDXzLnXG3hrJpu1esXTHS9JatxsAb71cBNgL` |

Only Route's treasury multisig can upgrade them. Neither has had a formal third-party audit.

## Not on Solana

Streaming quotes, JIT routing, vault zaps and partner fees are Robinhood Chain only. Some private market makers on Solana only
accept routers they have approved, so Route does not route through them yet.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.