What problem does it solve? Integrating token swaps and prediction market trading on Solana requires stitching together routing, quoting, transaction building, MEV protection, and market data feeds. This Skill consolidates the complete DFlow protocol surface—Swap API, Trade API, Prediction Market Metadata API, and WebSocket streaming—into one reference so you can implement trading flows without hunting through scattered docs. ## Core Features & Use Cases - Spot Token Swaps: Execute imperative swaps (quote + swap transaction) or declarative intent-based swaps with deferred route optimization, slippage control, priority fees, and Jito bundle MEV protection. - Prediction Market Trading: Query events, markets, orderbooks, and trade history via the Metadata API, then buy or sell YES/NO outcome tokens through the unified Trade API with sync/async execution monitoring. - Production Patterns: Platform fee collection, gasless sponsored swaps, custom destination accounts, retry logic with exponential backoff, and rate-limit handling. - Use Case: Build a Solana app where users swap SOL for USDC with best-price routing, or create a prediction market interface that streams live orderbook updates and lets users trade outcome tokens with a single order call. ## Quick Start Ask the AI to write TypeScript code that gets a DFlow quote and executes a swap of 1 SOL to USDC using the Trade API with an API key.