These recipes assume familiarity with Solana’s transaction and network connection logic.
If unfamiliar, please read the Solana Cookbook.
General
Authenticating Requests
Learn how to authenticate requests with API keys for production usage.
Endpoints
Endpoints for Trading and Prediction Markets APIs.
API Keys
Request an API key.
Trading Tokens
Build trading functionality for spot and prediction markets using DFlow’s unified APIs. Trade tokens with automatic routing across major Solana DEXs, supporting both synchronous (atomic) and asynchronous (multi-transaction) execution modes.Declarative Trades
Execute declarative trades where routing is optimized at execution time.
Imperative Trades
Execute imperative trades with full control over the route plan.
Platform Fees
Add platform fees to monetize trading volume.
Priority Fees
Control execution speed with priority fees.
Trade Outcome Tokens
Trade prediction market tokens.
Prediction Markets
Integrate prediction markets into your app. Discover markets, track positions, and redeem outcomes using our APIs.Discover Prediction Markets
Discover markets and outcome token mints using the Metadata API.
Trade Into a Position
Trade from spot tokens into outcome tokens using the Trade API.
Track User Positions
Track positions by mapping wallet balances to markets and outcomes.