Many-to-one and one-to-many shapes shine when you’re rebalancing a portfolio, consolidating stablecoin balances, or fanning one asset out into several - without running a separate swap (and paying separate overhead) for each leg.
What Changes vs a Single-Token Trade
The API surface barely moves. The differences: Request: list several entries inintent.inputs[] or intent.outputs[] instead of one each.
Response: the order payload widens to cover every leg. When one LP fills everything, you get a single-counterparty order; when several LPs each take a slice, the payload becomes a split fill with one entry per counterparty.
Signing: unchanged - preflight hands you the complete typed envelope for whatever shape came back, and you sign it verbatim. One signature covers every leg.
1. Quote a Multi-Token Intent
List each leg as its own entry. Amounts pair with their own entry, so decimals stay unambiguous.Many-to-one: sell USDC + DAI → buy USDT
One-to-many: sell WETH → buy USDC + DAI + USDT
Flip the shape: a single input, several outputs. UseExactOutput when you want to pin how much of each output token arrives:
2. Read the Multi-Leg Response
The response looks like any other quote list, withpreview widened to every leg:
When a single LP covers the whole intent, the preview pairs your inputs against its combined delivery:
3. Preflight, Sign, Settle
Shape makes no difference to your code. Preflight the quote you picked, sign the typed data it returns, submit - the same three calls as a one-to-one trade:The order payload’s shape - single counterparty or split fill - is chosen by the platform from how LPs answered your intent. You never select it: sign whatever preflight returns. The Order Submission guide breaks down what the envelope always binds.