How Imperative Trades Work
In an imperative trade, the app specifies the execution plan before the user signs the transaction. Here’s how it works:- The app requests a order.
- The user signs and submits the order to a Solana RPC.
- Execution follows the specified path exactly.
When Imperative Trades Make Sense
Imperative trades are a good fit when an app needs:- To modify the swap transaction, which enables composability.
- Deterministic execution paths.
- Tight control over venue selection.
- Predictable behavior for automation or compliance.
- Integration with external systems that assume fixed routes.
- Strategy-driven or rules-based trading.
- Research and testing.
- Products where routing logic is part of the value proposition.