Skip to main content
DFlow has a single, unified trading API that builders can use to trade different asset types through the same interface. Today, users can trade spot crypto and prediction market outcomes. From an app’s perspective, trading follows the same high-level flow: request a quote, present it to a user, and submit a signed transaction for execution. What changes across asset types is the underlying trade mechanics, not the integration surface. DFlow supports two trade types: declarative trades and imperative trades. Choose declarative trades when adaptability and execution quality matter more than enforcing a specific route. Choose imperative trades when deterministic routing, explicit venue control, or strategy-driven execution matter more than adaptation. When trading spot crypto, builders can use either declarative or imperative trades, and execution is synchronous. Prediction market trades use imperative async trades backed by Concurrent Liquidity Programs.

TLDR; Declarative vs Imperative Trades