GET /v3/swap/quote— fetch executable transaction routes, deposit-address routes, and CEX withdraw routesGET /v3/swap/status— poll the status of a submitted routeGET /v3/swap/supported-chains— list supported chainsGET /v3/swap/tokens/list— list supported tokensGET /v3/swap/tokens/search— search tokens by address, name, or symbol
x-api-key and affiliate headers. For testing without credentials, use https://public-backend.socket.tech. See Get API Access for the full breakdown.
Endpoint Selection
Use/v3/swap/quote with userOps=tx for OpenRouter direct routes, which support:
- Same-chain swaps when
originChainId === destinationChainId - Cross-chain bridge routes when
originChainId !== destinationChainId
userOps=deposit. See the Deposit Addresses Guide.
Common Token and Amount Rules
inputAmountis a string in the smallest token unit for EVM-style chains.- The native token address is
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE. - EVM addresses are normalized to lowercase by the API.
receiverAddressmust be valid for the destination chain.userAddressis required for OpenRouter transaction routes.- Same-chain quotes reject identical
inputTokenandoutputToken.
Step 1: Get a Quote
Request
| Parameter | Type | Description |
|---|---|---|
userOps | string | Comma-separated route types. Use tx for OpenRouter transaction routes. Also supports deposit and cex-withdraw. |
originChainId | string | Required for tx and deposit. Source chain ID. |
destinationChainId | string | Destination chain ID. |
inputToken | string | Source token address. |
inputAmount | string | Source amount in smallest units. |
outputToken | string | Destination token address. |
receiverAddress | string | Destination receiver address. |
userAddress | string | Required for tx. Source wallet that will sign the transaction. |
| Parameter | Type | Description |
|---|---|---|
slippage | number string | Slippage percent, for example 0.5. |
feeBps | number string | Integrator fee in basis points. Supports decimals. Requires feeTakerAddress. |
feeTakerAddress | string | Fee recipient. Required when feeBps is set. |
includeProvider | string | Comma-separated provider IDs to include. |
excludeProvider | string | Comma-separated provider IDs to exclude. Cannot overlap with includeProvider. |
refuel | true or false | Optional refuel request. Defaults to false. |
destinationPayload | hex string | Destination payload. Requires destinationGasLimit. |
destinationGasLimit | string | Gas limit for destinationPayload. Requires destinationPayload. |
refundAddress | string | Required for deposit and cex-withdraw. |
exchange | string | Required for cex-withdraw, for example coinbase or binance. |
Same-chain DEX provider IDs
| Provider ID | Display name |
|---|---|
bebopPmm | Bebop |
kyberswap | Kyberswap |
openocean | OpenOcean |
zeroxv2 | 0x |
Cross-chain bridge provider IDs
| Provider ID | Display name |
|---|---|
staked-relay | Relay |
staked-across | Across |
staked-gnosis-native | Gnosis Native |
staked-polygon-native | Polygon Native |
staked-native-op-stack | OP Stack Native |
cctp-v2 | Circle CCTP V2 |
cctp-v2-slow | Circle CCTP V2 Slow |
staked-celer | Celer |
staked-arbitrum-native | Arbitrum Native Bridge |
staked-near-intents | Near Intents |
staked-oft | OFT |
staked-mayan | Mayan |
staked-scroll-native | Scroll Native |
Example: Same-chain swap
Example: Cross-chain bridge
Quote response
| Field | Description |
|---|---|
quoteId | Stable route ID. Use it for status polling. For OpenRouter tx routes this is the on-chain request hash. |
expiresAt | Unix timestamp after which the quote should be discarded. |
output.amount | Expected destination output amount after applicable fees. |
output.minAmountOut | Minimum acceptable destination output amount. |
suggestedSlippage | Suggested slippage percent returned by the API. |
routeTags | Ranking labels: SUGGESTED, FASTEST, MAX_OUTPUT. |
routeDetails.bridgeDetails | Bridge leg metadata, including provider ID, token addresses, amounts, and slippage. |
routeDetails.dexDetails | Same-chain or origin-swap DEX leg metadata when present. |
routeDetails.feeDetails | Integrator fee metadata when a fee applies. Otherwise null. |
approval | Present for ERC20 inputs. Approve this spender before sending txData. |
txData.kind | Transaction type. OpenRouter EVM routes use evm_tx. |
txData.object | Transaction payload to send from userAddress. |
gasFee.gasToken | Native gas token metadata for the source chain. |
statusCheck | Suggested polling endpoint and cadence. |
Step 2: Check Approval
If theapproval field is present in the route response, approve the approval.spenderAddress for approval.amount of approval.tokenAddress before submitting the transaction.
OpenRouter EVM routes usually ask the user to approve the AllowanceHolder contract, not the final bridge or DEX. The
to address in txData is typically the AllowanceHolder.Step 3: Submit the Transaction
SubmittxData.object as a transaction from userAddress.
Step 4: Poll Status
Request
| Parameter | Required | Description |
|---|---|---|
quoteId | Yes | Quote ID returned by /v3/swap/quote. |
includeQuoteDetails | No | Set to true to include stored quote row details in the response. |
quoteId.
Status response
| Status | Meaning |
|---|---|
PENDING | Quote or route has not started. |
IN_PROGRESS | Source transaction is known, destination completion is pending. |
COMPLETED | Route is complete. |
FAILED | Route failed. |
EXPIRED | Quote or execution window expired. |
REFUNDED | Funds were refunded. |
Full Execution Flow
- Request quotes from
/v3/swap/quotewithuserOps=tx. - Select a route. Prefer
routeTagsor compareoutput.valueInUsd,estimatedTime, andgasFee. - Check quote freshness with
expiresAt— do not send expired quotes. - If
approvalis present, approveapproval.spenderAddressforapproval.amount. - Submit the route transaction from
userAddressusingtxData.object. - Poll status with the returned
quoteId. - Poll until the route reaches a terminal status.
Fees
Integrator fees are set withfeeBps and feeTakerAddress.
Rules:
feeBpsandfeeTakerAddressmust be provided together.feeBpsmust be greater than0and at most10000.- For direct DEX routes, fees can be taken from input or output depending on the OpenRouter fee resolution.
- For direct bridge no-swap routes, fees are forced to the input side.
- The client-facing output amount is already net of applicable fees.
Validation and Error Notes
Common400 errors:
- Missing
userOpsfor/v3/swap/quote. - Missing
originChainIdforuserOps=tx. - Missing
userAddressforuserOps=tx. - Missing
refundAddressforuserOps=depositoruserOps=cex-withdraw. - Missing
exchangeforuserOps=cex-withdraw. - Invalid
slippage. - Invalid or unsupported chain ID.
destinationPayloadwithoutdestinationGasLimit, or the reverse.feeBpswithoutfeeTakerAddress, or the reverse.- Provider listed in both include and exclude filters.
Implementation Notes
- OpenRouter EVM routes usually ask the user to approve the AllowanceHolder contract, not the final bridge or DEX.
- Use
quoteIdexactly as returned — it is used for status lookup and source transaction recording. - Do not rebuild calldata client-side. Use the returned
txData. - For same-chain swaps,
routeDetails.dexDetailsis populated when route metadata is available. - For cross-chain routes,
routeDetails.bridgeDetailsdescribes the bridge leg. If there is an origin swap leg,routeDetails.dexDetailsmay also be present.
Charging Fees
Add integrator fees to your quotes
Deposit Addresses
Accept deposits from any chain
Destination Payload
Execute calldata on the destination chain
Chain Support
See all supported networks