POST /submit
Build a broadcast-ready transaction from a previously fetched quoteId.
POST /submit to convert a quoteId from POST /quote into the calldata your wallet broadcasts.
- Authentication:
x-api-keyheader required. - Quote TTL: quotes expire roughly 10 seconds after
/quote. Submitting an expiredquoteIdreturns404.
Request
- Endpoint
- Body
Body parameters
permit payload
When you have a fresh EIP-2612 permit signature for tokenIn, include it to skip the standard approve transaction.
Response
- 200 OK
- 404 Not Found
- 400 Bad Request
- 429 Rate Limited
Response fields
Sending the transaction
The response is intentionally minimal so any signer works. Example withviem:
Native ETH and unwrap behavior
value carries amountIn and the router wraps to WETH internally. See the Native ETH guide for the full matrix.
Common pitfalls
404 on /submit
/quote with the same parameters and resubmit. Don’t cache quoteId longer than expiresAt minus a small safety window.`value` is 0 for ETH swaps
useNativeIn: true. The router can’t infer it from tokenIn alone in /submit because the API does not assume the user has changed their mind since /quote.Tx reverts with slippage error
/quote and broadcast. Increase slippageBps slightly or re-quote and resend.Allowance error
tokenIn. Approve O1Router for at least amountIn, or use a permit payload. See ERC-20 approvals.Authorizations
Body
20-byte hex address. The sentinel
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE (or the zero
address) signals the chain's native asset (ETH on Base) and is
recognized in tokenIn/tokenOut.
^0x[a-fA-F0-9]{40}$Override routePlan.nativeIn. When true the router wraps
msg.value to WETH before dispatching legs.
Override routePlan.nativeOut. When true the router unwraps WETH to ETH for the recipient.
Non-negative integer encoded as a decimal string (wei).
^[0-9]+$Non-negative integer encoded as a decimal string (wei).
^[0-9]+$Non-negative integer encoded as a decimal string (wei).
^[0-9]+$Response
Transaction payload
20-byte hex address. The sentinel
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE (or the zero
address) signals the chain's native asset (ETH on Base) and is
recognized in tokenIn/tokenOut.
^0x[a-fA-F0-9]{40}$Hex-encoded bytes.
^0x[a-fA-F0-9]*$msg.value in wei (non-zero only for native-in swaps).
^[0-9]+$