When to use gasless: You’re building a consumer-facing product where users shouldn’t think about gas. For solvers and aggregators executing trades programmatically, see the self-execution quickstart.
How It Differs from Self-Execution
1. Request a Gasless Quote
Addgasless=true and the relevant approval parameters to your quote request:
Approval Parameters
2. Sign the Quote
Sign the EIP-712 typed data from the quote response - the same signing flow as self-execution:RFQ_EIP712_TYPES dictionary contains the EIP712Domain and all three order type definitions. The API selects the order type automatically based on the trade structure - use the onchainOrderType from the quote response as your primaryType.
EIP-712 order type schemas
EIP-712 order type schemas
SingleOrder - simple one-to-one swaps (e.g. WETH → USDC):
3. Submit the Order
Unlike self-execution, gasless orders are submitted to Bebop’s/v3/order endpoint. Bebop handles the on-chain settlement:
4. Monitor Settlement
Poll the order status endpoint to track progress:Order Statuses
The
order-status response also includes txHash (when available) and amounts (received token amounts after settlement).
Full Example
Dependencies:
pip install httpx eth_account (or uv add httpx eth_account)Using Permit2 Approvals
Withapproval_type=Standard, the user must have approved the settlement contract before trading (a one-time on-chain transaction per token). Permit2 removes this requirement by using an off-chain signature for token approvals instead.
This differs from the Aggregation API’s Permit2 flow. The Aggregation API wraps the order inside
PermitBatchWitnessTransferFrom - you sign a single combined message. The RFQ API keeps order signing unchanged and adds a separate PermitBatch signature for token approvals.How it works
-
One-time setup: Approve the Permit2 contract (
0x000000000022D473030F116dDEE9F6B43aC78BA3) for your sell tokens. This is a standard ERC-20approve()- the same kind of transaction you’d do for the settlement contract with Standard approvals, but targeting the Permit2 contract instead. -
Request a quote with
approval_type=Permit2:
-
Sign the order the same way as Standard -
BebopSettlementdomain, same order types. ThetoSigndata is identical. -
Check
requiredSignaturesin the quote response. If it contains token addresses, generate aPermitBatchsignature:
- POST to
/orderwith the additionalpermit2field:
On subsequent trades for the same token,
requiredSignatures will be empty once the Permit2 allowance is active. In that case, no permit2 field is needed in the POST body - it works the same as Standard.