What you’ll build: A complete trade flow using solver auction liquidity.Time required: 10-15 minutesPrerequisites: Basic understanding of EVM wallets and token approvals.
How It Differs from the RFQ API
The RFQ API provides firm market maker quotes with guaranteed execution and guaranteed fill. The Aggregation API runs a solver auction - multiple solvers compete to fill your order across all available on-chain liquidity. This gives you broader token coverage (including long-tail assets) at the cost of requiring a slippage tolerance.1. Request a Quote
Optional parameters:
Swap and send:
taker_address signs the order; the bought tokens go to receiver_address. receiver_address is optional and defaults to taker_address. Works in both gasless and self-execution modes.Choosing sell_amounts vs buy_amounts
Choosing sell_amounts vs buy_amounts
- Use
sell_amountswhen you know exactly how much you want to sell (e.g., “Sell 1 WETH”) - Use
buy_amountswhen you know exactly how much you want to receive (e.g., “Buy 5000 USDC”)
Understanding the Response
The response structure depends on whether you requested gasless or self-execution mode. Gasless response - includestoSign (the EIP-712 message you must sign). No tx object since Bebop handles on-chain submission:
tx object (settlement calldata ready to broadcast) and toSign:
2. Approve Tokens
Before the settlement contract can move your sell tokens, you need an ERC-20 approval on theapprovalTarget address from the quote response. See the Token Approvals guide for the full check-and-approve flow.
3. Sign & Submit
The Aggregation API supports two execution modes. Choose the one that fits your integration:- Self-Execution
- Gasless
With self-execution (With self-execution, there’s no separate EIP-712 signing step and no
gasless=false), the quote response includes a tx object containing the complete settlement calldata. You broadcast the transaction yourself./order POST. The tx object contains everything needed for settlement.Permit2 Signing Variant
When usingapproval_type=Permit2 with gasless execution, the signing structure changes. Instead of signing JamOrder directly, you sign a PermitBatchWitnessTransferFrom that wraps the order:
toSign will contain permitted, spender, nonce, deadline, and witness (which is the JamOrder data) instead of the flat JamOrder fields.
4. Poll for Settlement
Both execution modes support status polling via/order-status.
The status response also includes:
Full Example
- Self-Execution
- Gasless
Next Steps
Token Approvals
Set up ERC-20 approvals before trading.
RFQ API Quickstart
Compare with the RFQ API for firm market maker pricing.