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

# Quickstart

> From zero to a signed swap in three steps.

The API lives at `https://swap-api.sodae.io`. No account or API key is needed today. See [API overview](https://docs.voxel.ag/api/overview.md) for conventions.

**1. Get a quote**

Amounts are in the token's base units. 1 SOL is `1000000000` lamports. Common tokens accept a symbol in place of the mint address.

```bash theme={null}
curl "https://swap-api.sodae.io/v1/quote?input_mint=SOL&output_mint=USDC&amount=1000000000&slippage_bps=50"
```

```json theme={null}
{
  "input_mint": "So11111111111111111111111111111111111111112",
  "output_mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "in_atoms": 1000000000,
  "out_atoms": 104555250,
  "out_ui": 104.55525,
  "min_out_atoms": 104032473,
  "slippage_bps": 50,
  "price_impact_bps": 0,
  "route": [
    { "pool": "7wXt…", "dex": "Whirlpool", "in_mint": "So111…", "out_mint": "EPjF…",
      "in_atoms": 1000000000, "out_atoms": 104555250, "fee_bps": 4 }
  ],
  "splits": [],
  "provider": "soda"
}
```

`out_atoms` is the expected output. `min_out_atoms` is the floor the transaction enforces after slippage.

**2. Build the swap**

Send the same parameters plus the wallet that will sign. The response holds a base64 transaction for that wallet.

```bash theme={null}
curl -X POST https://swap-api.sodae.io/v1/swap \
  -H "content-type: application/json" \
  -d '{
    "input_mint": "SOL",
    "output_mint": "USDC",
    "amount_in_atoms": 1000000000,
    "slippage_bps": 50,
    "user_wallet": "<your wallet public key>"
  }'
```

```json theme={null}
{
  "tx_base64": "gQ…",
  "recent_blockhash": "9bK…",
  "last_valid_block_height": 351234567,
  "lookup_tables": [],
  "provider": "soda",
  "route": { "out_atoms": 104555250, "min_out_atoms": 104032473, "legs": [ … ] }
}
```

**3. Sign and send**

Decode the transaction, sign it with the wallet named in `user_wallet` and send it to any RPC. Confirm it with `recent_blockhash` and `last_valid_block_height`.

> [!WARNING]
>
> The transaction uses Solana transaction format v1. `@solana/web3.js` 1.x cannot decode it. See [Transaction format](https://docs.voxel.ag/api/swap.md#transaction-format).

## Next steps

> **[TypeScript guide](https://docs.voxel.ag/guides/typescript.md)**
>
> A complete quote, swap, sign and send flow.

> **[Streaming quotes](https://docs.voxel.ag/api/quote-stream.md)**
>
> Keep a price fresh without polling.

> **[Errors](https://docs.voxel.ag/errors.md)**
>
> What `no_route` and `price_impact_too_high` mean.


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