Skip to main content

Swap V3 User Reference

Last verified against the Socket Swap V3 swagger: 2026-06-10. This reference covers the user-facing Swap V3 endpoints:
  • GET /v3/swap/quote: Swap V3 quote API. userOps=tx maps to OpenRouter direct routes.
  • GET /v3/swap/status: Swap V3 status API.
Use relative paths in this document with the API base URL for the target environment.

Endpoint Selection

Use /v3/swap/quote to fetch executable transaction routes, deposit-address routes, and CEX withdraw routes in one normalized route model. OpenRouter direct routes currently support:
  • Same-chain swaps when originChainId === destinationChainId.
  • Cross-chain bridge routes when originChainId !== destinationChainId.

Common Token and Amount Rules

  • inputAmount is 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.
  • receiverAddress must be valid for the destination chain.
  • userAddress is required for OpenRouter transaction routes.
  • Same-chain quotes reject identical inputToken and outputToken.

Swap V3 Quote

Request

Required query parameters: Optional query parameters: Active same-chain DEX provider IDs: Cross-chain bridge provider IDs:

Same-Chain OpenRouter Swap Example

Cross-Chain OpenRouter Bridge Example

Response Shape

Important route fields:

Swap V3 Status

Request

Parameters: The v3 status endpoint looks up execution state by quoteId.

Response Shape

Status values:

Execution Flow

  1. Request quotes from /v3/swap/quote with userOps=tx.
  2. Select a route. Prefer routeTags or compare output.valueInUsd, estimatedTime, and gasFee.
  3. Check quote freshness with expiresAt.
  4. If approval is present, approve approval.spenderAddress for approval.amount of approval.tokenAddress.
  5. Submit the route transaction from userAddress. For an EVM route, send txData.object as the transaction.
  6. Poll status with the returned quoteId.
  7. Continue polling until the route reaches a terminal status.

Fees

Integrator fees are set with feeBps and feeTakerAddress. Rules:
  • feeBps and feeTakerAddress must be provided together.
  • feeBps must be greater than 0 and at most 10000.
  • 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.
Swap V3 exposes the net output and execution data. It does not expose a separate affiliate fee object on tx routes.

Validation and Error Notes

Common 400 errors:
  • Missing userOps for /v3/swap/quote.
  • Missing originChainId for userOps=tx.
  • Missing userAddress for userOps=tx.
  • Missing refundAddress for userOps=deposit or userOps=cex-withdraw.
  • Missing exchange for userOps=cex-withdraw.
  • Invalid slippage.
  • Invalid or unsupported chain ID.
  • destinationPayload without destinationGasLimit, or the reverse.
  • feeBps without feeTakerAddress, or the reverse.
  • Provider listed in both include and exclude filters.
Quote responses can return an empty route list when providers fail to quote, the route is unsupported, OpenRouter is not deployed for the origin chain in the active environment, or filters exclude all providers.

Implementation Notes for Integrators

  • OpenRouter EVM routes usually ask the user to approve the AllowanceHolder contract, not the final bridge or DEX.
  • The transaction to is usually the AllowanceHolder. The OpenRouter call is wrapped inside the returned calldata.
  • Use quoteId exactly as returned. It is used for status lookup and source transaction recording.
  • Do not rebuild calldata client-side. Use the returned txData.
  • Do not send expired quotes.
  • For same-chain swaps, routeDetails.dexDetails is populated in Swap V3 when route metadata is available.
  • For cross-chain routes, routeDetails.bridgeDetails describes the bridge leg. If there is an origin swap leg, routeDetails.dexDetails may also be present.