Read the docs
Once verified, it’s time to integrate. The following resources will help you start fast:
- Solana Intent Swaps SDK
- Intent Swaps API documentation. When using the OpenAPI specs, make sure you select Solana in the network selector to get the correct information.
- Example integration tests demonstrating order creation, fill, and cancellation flows on Solana using the Bankrun simulator.
- Core method building the fill transaction instruction, including resolver whitelist check and required account layout.
Retrieve active orders
Use the Intent Swap API endpoint to fetch active orders: GET /v2.0/1/order/active.
Calculate current price
Calculate the current price, using the Dutch auction parameters.
Execute order on-chain
Use the SDK method FusionSwapContract.fill() to build and send the on-chain fill instruction. This call constructs the full transaction, including the resolver’s whitelist verification and all required token and escrow accounts.
Execution tips
- The
fillinstruction does not support post-actions. You must send the taker token before receiving the maker token. - Solana has strict limits on transaction size. If you need extra actions, use batching tools (for example, Jito) to send several transactions together.
- In most cases, you can execute everything from a regular wallet (EOA) without writing your own program.