{"uid":"cap_HZuEfE4wu47sWg9wlwpPv","slug":"vybe-solana-analytics-api-trading-swap-endpoint-fcd04b74","name":"Vybe Solana Analytics API – Trading Swap Endpoint","description":"Builds an unsigned swap transaction with slippage protection and fee deduction. Direct protocol integrations with Raydium, Meteora, Pumpfun, and others, with aggregator fallbacks for maximum route coverage.\n\nThis route is currently in beta and is subject to change.","url":"https://x402-api.vybenetwork.xyz/v4/trading/swap?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["accountAddress","amount","inputMintAddress","outputMintAddress"],"properties":{"amount":{"type":"number","format":"double","description":"Amount to swap (in UI units)"},"router":{"enum":["titan","jupiter","vybe"],"type":"string"},"gasless":{"type":"boolean","nullable":true,"description":"Use Vybe fee payer for gas"},"partner":{"type":"string","nullable":true,"description":"Partner identifier for fee routing"},"swapFee":{"type":"number","format":"double","nullable":true,"description":"Service fee percentage (e.g., 1 for 1%)"},"protocol":{"allOf":[{"enum":["PUMPFUN","PUMPSWAP","RAYDIUMAMMV4","RAYDIUMCPMM","RAYDIUMCLMM","RAYDIUMLAUNCHLAB","METEORADBC","METEORADAMM2","METEORADLMM","SANCTUM"],"type":"string"}],"nullable":true},"simulate":{"type":"boolean","nullable":true,"description":"Simulate transaction without building"},"slippage":{"type":"number","format":"double","nullable":true,"description":"Slippage tolerance (percentage)"},"poolAddress":{"allOf":[{"type":"string","format":"pubkey"}],"nullable":true},"accountAddress":{"type":"string","format":"pubkey"},"inputMintAddress":{"type":"string","format":"pubkey"},"outputMintAddress":{"type":"string","format":"pubkey"},"autoCalculateSlippage":{"type":"boolean","nullable":true,"description":"Auto-calculate optimal slippage"}}},"responseSchema":{"type":"object","required":["transaction","provider","details","slippage","slippageSource"],"properties":{"details":{"type":"object","required":["inputAmount","inputMintAddress","outputMintAddress","inputDecimals","outputDecimals","swapFee","quote","closeAccountIx"],"properties":{"quote":{"type":"object","required":["inAmount","outAmount","provider"],"properties":{"inAmount":{"type":"string","description":"Input amount in base units"},"provider":{"type":"string","description":"Provider name for the quote"},"outAmount":{"type":"string","description":"Output amount in base units"}}},"swapFee":{"type":"integer","format":"int64","minimum":0,"description":"Swap fee amount"},"inputAmount":{"type":"number","format":"double","description":"Input amount in decimal units"},"inputDecimals":{"type":"integer","format":"int32","minimum":0,"description":"Input token decimals"},"closeAccountIx":{"type":"boolean","description":"Whether close account instruction is included"},"outputDecimals":{"type":"integer","format":"int32","minimum":0,"description":"Output token decimals"},"inputMintAddress":{"type":"string","description":"Input token label/mint"},"outputMintAddress":{"type":"string","description":"Output token label/mint"}}},"provider":{"type":"string","description":"Provider name"},"slippage":{"type":"number","format":"double","description":"Slippage percentage"},"transaction":{"type":"string","description":"Base64-encoded unsigned transaction"},"slippageSource":{"type":"string","description":"Source of slippage (e.g., \"manual\", \"auto\")"}}},"example":null,"exampleRequest":null,"tags":["x402","finance"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.012","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.012","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_No9eAVuMxpzzFA3E0QLyW","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.012","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Retrieves on-chain swap/trade data for a given Solana trading pair or transaction, returning detailed swap analytics from Vybe Network's Solana data infrastructure.","exampleAgentPrompt":"Pull the swap details from Vybe for the Solana transaction signature 5xQ3...abc — I want to know the input token, output token, amounts, and the execution price on-chain.","exampleUseCases":null,"resultDescription":"Returns structured on-chain swap data including input and output token mint addresses, token amounts, execution price, fees, pool/market identifier, wallet involved, and block timestamp for the requested Solana swap.","failureModes":["402 Payment Required — x402 USDC payment not attached or insufficient; check x-payment-info header for required amount","404 Not Found — transaction signature or swap record does not exist on-chain or in Vybe's index","400 Bad Request — malformed request body, missing required fields such as transaction signature or token addresses","429 Too Many Requests — prepaid credits exhausted for WebSocket streaming tier","503 Service Unavailable — Vybe indexer temporarily behind or unavailable"],"whenToPreferThis":"Choose this endpoint when you need detailed on-chain swap/trade execution data from the Solana blockchain without an API key or signup — particularly useful for agents that can pay per-request in USDC via x402 and need real-time or historical DEX swap analytics from Vybe Network's Solana index.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-24T14:43:45.661Z","isFirstParty":false,"canonicalSlug":"vybe-solana-analytics-api-trading-swap-endpoint-fcd04b74"}