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
Get a quote and execute a swap in under 5 minutes.
Install
Or via CDN (exposes window.ArgyrosSDK):
<script src="https://cdn.argyros.trade/sdk.umd.js"></script>
1. Initialize
import { ArgyrosSDK } from "@argyros/sdk";
const sdk = new ArgyrosSDK({
apiKey: "argy_your_api_key",
chain: "solana",
});
2. Get a Quote
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
const swap = await sdk.swap({
userWallet: "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
inputMint: "So11111111111111111111111111111111111111112",
outputMint: "uSd2czE61Evaf76RNbq4KPpXnkiL3irdzgLFUMe3NoG",
amount: "1000000000",
swapMode: "ExactIn",
slippageBps: 50,
});
4. Sign and Submit
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 — all
SDKConfig options
- Quote — full
quote() reference
- Swap — full
swap() reference with sign+submit patterns
- Error Handling — handling rate limits, auth errors, no routes
- Examples — React, Next.js, Node.js, and CDN examples