← ClaudeAtlas

dex-executionlisted

Solana DEX swap execution via Jupiter aggregator including quoting, transaction building, signing, and confirmation
Serennity007/claude-trading-skills-67 · ★ 0 · AI & Automation · score 72
Install: claude install-skill Serennity007/claude-trading-skills-67
# DEX Execution — Solana Swap Execution via Jupiter Execute token swaps on Solana through Jupiter, the dominant DEX aggregator routing across Raydium, Orca, Meteora, Phoenix, Lifinity, and 20+ other venues. ## Overview Jupiter aggregates liquidity across all major Solana DEXes to find optimal swap routes. A single swap may split across multiple pools and hop through intermediate tokens to minimize price impact. The Jupiter v6 API handles route discovery, transaction building, and fee optimization — your code handles quoting, user confirmation, signing, and submission. **Base URL**: `https://quote-api.jup.ag/v6` ## Execution Pipeline Every swap follows this seven-step pipeline. Never skip steps 2-3 (display and confirm). ### Step 1 — Get Quote ```python import httpx params = { "inputMint": "So11111111111111111111111111111111111111112", # SOL "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", # USDC "amount": 1_000_000_000, # 1 SOL in lamports "slippageBps": 50, # 0.5% } resp = httpx.get("https://quote-api.jup.ag/v6/quote", params=params) quote = resp.json() ``` ### Step 2 — Display Quote to User Always show these fields before proceeding: | Field | Source | |---|---| | Input amount | `quote["inAmount"]` (in token decimals) | | Output amount | `quote["outAmount"]` | | Minimum received | `quote["otherAmountThreshold"]` | | Price impact | `quote["priceImpactPct"]` | | Route | `quote["routePlan"]` — DEXes used | | Slippage | The `sl