Overview
POST /v1/swap returns a SwapPlan:
- a fresh derived
quote - an ordered list of
instructions[]to execute on-chain
Request parameters
The request includes:chainId,tokenIn,tokenOuttradeType(EXACT_INorEXACT_OUT)amount(smallest units as a string)slippageBps(basis points)
recipient: where swap outputs should be sent (if applicable)deadline: a time-bound constraint for execution
Understanding the response
SwapPlan.instructions[] is an ordered list of EVM calls. Each instruction includes:
to: contract address to call (typically a router)data: calldata hexvalue: wei to send (as a string)constraints: execution constraints such asnotAfterandmaxSlippageBps
instructions[] contains exactly one item. Future upgrades may return multiple instructions (for example, approval + swap).
Who executes?
- Direct integration (core): you call the Business API and receive
instructions[]. You sign and broadcast using your own wallet infrastructure. - Client Node (coming soon): you call your self-hosted Client Node with
executionMode=execute. It fetches the swap plan from the Business API, then signs and broadcasts locally, returning execution receipts (such astxHash).
Example
Next steps
- Orchestrate a multi-step payout: Payments