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

# SDK quickstart

> Install @argyros/sdk and run your first Fogo swap — quote, build, sign, submit — in under five minutes.

Get a quote and execute a swap in under 5 minutes.

***

## Install

```bash theme={"theme":"github-dark"}
npm install @argyros/sdk
```

Or via CDN (exposes `window.ArgyrosSDK`):

```html theme={"theme":"github-dark"}
<script src="https://cdn.argyros.trade/sdk.umd.js"></script>
```

***

## 1. Initialize

```typescript theme={"theme":"github-dark"}
import { ArgyrosSDK } from "@argyros/sdk";

const sdk = new ArgyrosSDK({
  apiKey: "argy_your_api_key",
  chain: "solana",
});
```

***

## 2. Get a Quote

```typescript theme={"theme":"github-dark"}
const quote = await sdk.quote({
  inputMint: "So11111111111111111111111111111111111111112",
  outputMint: "uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG",
  amount: "1000000000", // 1 SOL
  swapMode: "ExactIn",
  slippageBps: 50,
});

console.log(`${quote.amountOut} USDC, impact: ${quote.priceImpactPercent}`);
```

***

## 3. Build a Swap Transaction

```typescript theme={"theme":"github-dark"}
const swap = await sdk.swap({
  userWallet: "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
  inputMint: "So11111111111111111111111111111111111111112",
  outputMint: "uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG",
  amount: "1000000000",
  swapMode: "ExactIn",
  slippageBps: 50,
});
```

***

## 4. Sign and Submit

```typescript theme={"theme":"github-dark"}
import { Connection, VersionedTransaction } from "@solana/web3.js";

const connection = new Connection("https://mainnet.fogo.io");

const tx = VersionedTransaction.deserialize(
  Buffer.from(swap.transaction, "base64")
);
tx.sign([wallet]); // your Keypair or wallet adapter

const sig = await connection.sendTransaction(tx);
await connection.confirmTransaction({
  signature: sig,
  lastValidBlockHeight: swap.lastValidBlockHeight,
  blockhash: tx.message.recentBlockhash,
});

console.log("Swap confirmed:", sig);
```

***

## Next Steps

* [Configuration](./configuration.md) -- all `SDKConfig` options
* [Quote](./quote.md) -- full `quote()` reference
* [Swap](./swap.md) -- full `swap()` reference with sign+submit patterns
* [Error Handling](./error-handling.md) -- handling rate limits, auth errors, no routes
* [Examples](./examples.md) -- React, Next.js, Node.js, and CDN examples
