Skip to main content
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.

Increase a Position

Add size to an existing position with controlled execution.

Decrease a Position

Reduce position size or close exposure with a single trade.

Monitor Market Lifecycle

Track market status changes and redemption availability.

Handle Fees

Handle prediction market fees.

Redeem Outcome Tokens

Redeem determined outcome tokens when markets settle.

Close Outcome Token Accounts

Burn remaining tokens and reclaim rent.

Need Help?

https://mintcdn.com/dflow/a8Yx7HBusmKl4Z7w/images/meteor-icons_discord.svg?fit=max&auto=format&n=a8Yx7HBusmKl4Z7w&q=85&s=0ea834bc8a9fa3fe161ba181329effda

Join Our Discord

Connect with other developers, get help, and stay updated on the latest DFlow developments.
https://mintcdn.com/dflow/a8Yx7HBusmKl4Z7w/images/meteor-icons_telegram.svg?fit=max&auto=format&n=a8Yx7HBusmKl4Z7w&q=85&s=e928c5dd68311ff0d419936a35c86eed

Dev Notifications

Join the DFlow Dev Notifications Telegram group to stay in the loop on new features and other announcements.