Skip to main content
LLM prompt — copy and paste into your coding agent
The Socket Swap V3 API (/v3/swap) replaces the legacy Socket API (/v2). The new API is simpler — a single quote call returns ready-to-send transaction data. No server-side route sessions, no multi-step build flow. The base URL also changes:

What changed at a glance


Execution flow

Before (v2):
  1. GET /v2/quote → pick a route
  2. POST /v2/route/start → register the route, get activeRouteId
  3. GET /v2/approval/check-allowance → check if approval needed
  4. GET /v2/approval/build-tx → build approval tx
  5. GET /v2/route/build-next-tx?activeRouteId=... → get tx calldata
  6. Submit the transaction on-chain
  7. GET /v2/route/prepare?activeRouteId=&userTxIndex=&txHash= → report tx hash
  8. Repeat steps 5–7 for multi-tx routes
After (v3):
  1. GET /v3/swap/quote → get routes with txData included
  2. If route.approval is present, approve approval.spenderAddress for approval.amount
  3. Submit route.txData.object on-chain
  4. Poll GET /v3/swap/status?quoteId=... until terminal status
All routes are single-transaction. No server-side session required.

Parameter mapping

Headers

Query parameters

singleTxOnly, maxUserTxs, uniqueRoutesPerBridge, disableSwapping, bridgeWithGas, bridgeWithInsurance, isContractCall, and showAutoRoutes are not supported in v3.

Approval

In v2 you called two separate endpoints to check and build approval transactions. In v3, the quote response tells you everything you need:
If approval is present, approve spenderAddress for amount of tokenAddress before submitting. If approval is null, no approval is needed.

Status

Before:
After:
Poll until you see a terminal status:

Quick example

v2 request:
v3 equivalent:

API Reference

Full Socket Swap V3 API reference

Get API Access

Request production API credentials