Complete Lifecycle
Follow this end-to-end workflow to integrate prediction markets into your application:1. Discover Markets
Find and explore on-chain prediction markets using the Prediction Market
Metadata API. Filter by categories, tags, and market status to discover
available trading opportunities.
2. Trade Tokens
Use the DFlow Trade API to buy and sell prediction market outcome tokens.
The API automatically handles both synchronous and asynchronous execution
modes.
3. Track Positions
Retrieve and display a user’s prediction market positions by querying
on-chain token accounts and mapping them to market data.
4. Redeem Outcomes
When markets are determined, check if outcome tokens are redeemable and
request redemption orders to exchange winning tokens for stablecoins.
Core Concepts
Trade Lifecycle
Understanding how positions are opened, managed, and closed is essential for building prediction market applications.Increase Position
Learn how traders open new orders to increase their position in an event
outcome. Outcome tokens are minted when orders are filled.
Reduce Position
Understand how traders reduce existing positions by selling outcome tokens
back for stablecoins. Supports both synchronous and asynchronous execution.
Settlement & Redemption
Discover how events are settled, outcomes are determined, and traders redeem
their winning outcome tokens for payouts.
Infrastructure Primitives
These foundational concepts power DFlow’s prediction market infrastructure:Series, Events, and Markets
Understand the hierarchical structure of prediction market organization and
how series, events, and markets relate to each other.
From Spot Tokens to Market Positions
Learn how trades route from any spot token to outcome tokens through the
settlement mint, including automatic market tokenization for uninitialized
markets.
Async & Sync Trades
Understand the difference between synchronous (atomic) and asynchronous
(multi-transaction) trade execution modes and when each is used.
Prediction Market Terminology
Reference guide for key terms and concepts used in DFlow’s prediction market
infrastructure.
Trading Configuration
Full customization of your trading experience:Slippage Tolerance
Configure how much price movement you’re willing to accept during trades.
Choose between auto and custom slippage settings.
Priority Fees
Control transaction priority and execution speed with exact or max priority
fee configurations.
Order Endpoint
Request a trade order with a single endpoint. Returns a quote and
transaction ready to sign, automatically handling sync and async execution
modes.