Features
- Best execution: JIT routing re-optimizes your route at execution time, so you get the best available price even as liquidity shifts.
- Live market data: The quote stream pushes top-of-book prices, and the book stream pushes ten levels of depth. Use them to build live tickers and order books without polling.
- Gasless swaps: Your app can sponsor users’ transaction fees, so they trade without holding SOL for gas.
- Composable transactions: Each call to the order endpoint returns a transaction, so you can bundle it with your own instructions and run them atomically.
- Fine-grained control: Optional parameters cover slippage, priority fees, and venue restrictions, so you decide how each order routes and lands.
How it works
- The app requests an order from the
/orderendpoint with input mint, output mint, and amount, plus optional parameters like slippage, platform fees, priority fees, and venue restriction. - The user signs the returned transaction.
- The app submits it to a Solana RPC and confirms status.
Prediction market outcome tokens are SPL tokens too, so they route through the same
/order endpoint. The flow on this page applies to both standard spot pairs and Kalshi outcome-token swaps.DFlow also offers an intent-based declarative trade flow via
GET /intent for stronger sandwich protection. The majority of builders stay on /order; /intent is the opt-in for apps where sandwich exposure matters more than transaction composability. Token-2022 mints (including Kalshi outcome tokens) are not supported on /intent.