Skip to main content
GET
/
v3
/
swap
/
quote
Get quotes
curl --request GET \
  --url https://public-backend.socket.tech/v3/swap/quote
{
  "success": true,
  "statusCode": 200,
  "result": {
    "originChainId": 42161,
    "destinationChainId": 42161,
    "userAddress": "0x3e8cb4bd04d81498ab4b94a392c334f5328b237b",
    "receiverAddress": "0x3e8cb4bd04d81498ab4b94a392c334f5328b237b",
    "input": {
      "token": {
        "chainId": 42161,
        "address": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
        "name": "USDC",
        "symbol": "USDC",
        "decimals": 6,
        "logoURI": "https://assets.coingecko.com/coins/images/6319/large/USDC.png?1769615602",
        "icon": "https://assets.coingecko.com/coins/images/6319/large/USDC.png?1769615602"
      },
      "amount": "100000",
      "priceInUsd": 1,
      "valueInUsd": 0.1
    },
    "routes": [
      {
        "userOp": "tx",
        "quoteId": "0x759a82929538535f6186da129b49e42f3fa22539cde911a2f394bf9d1e3732b4",
        "expiresAt": 1781000089,
        "output": {
          "token": {
            "chainId": 42161,
            "address": "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",
            "name": "USDT0",
            "symbol": "USDT0",
            "decimals": 6,
            "logoURI": "https://assets.coingecko.com/coins/images/53705/large/usdt0.jpg?1737086183",
            "icon": "https://assets.coingecko.com/coins/images/53705/large/usdt0.jpg?1737086183"
          },
          "amount": "100023",
          "minAmountOut": "99022",
          "priceInUsd": 0.999872,
          "valueInUsd": 0.1000101971
        },
        "estimatedTime": 1,
        "slippage": 1,
        "suggestedSlippage": 1,
        "routeTags": [
          "FASTEST",
          "MAX_OUTPUT",
          "SUGGESTED"
        ],
        "routeDetails": {
          "dexDetails": {
            "protocol": {
              "name": "zeroxv2",
              "displayName": "0x",
              "icon": "https://media.socket.tech/dexes/zerox.svg"
            },
            "inputTokenAddress": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
            "outputTokenAddress": "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",
            "amountIn": "100000",
            "amountOut": "100023",
            "minAmountOut": "99022",
            "slippage": 1
          },
          "bridgeDetails": null,
          "feeDetails": null
        },
        "approval": {
          "spenderAddress": "0x0000000000001fF3684f28c67538d4D072C22734",
          "amount": "100000",
          "tokenAddress": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
          "userAddress": "0x3e8cb4bd04d81498ab4b94a392c334f5328b237b"
        },
        "txData": {
          "kind": "evm_tx",
          "object": {
            "chainId": 42161,
            "to": "0x0000000000001fF3684f28c67538d4D072C22734",
            "data": "0x2213bc0b...",
            "value": "0"
          }
        },
        "gasFee": {
          "gasToken": {
            "chainId": 42161,
            "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
            "name": "Arbitrum Ether",
            "symbol": "ETH",
            "decimals": 18,
            "logoURI": "https://media.socket.tech/networks/ethereum.svg",
            "icon": "https://media.socket.tech/networks/ethereum.svg"
          },
          "gasLimit": "237034",
          "gasPrice": "20066000",
          "estimatedFee": "4756324244000",
          "feeInUsd": 0.0079402077
        },
        "statusCheck": {
          "endpoint": "https://public-backend.socket.tech/v3/swap/status?quoteId=0x759a82929538535f6186da129b49e42f3fa22539cde911a2f394bf9d1e3732b4",
          "method": "GET",
          "intervalSec": 5,
          "maxDurationSec": 600
        }
      }
    ]
  },
  "message": null
}

Query Parameters

userOps
enum<string>[]
required

Requested user operation types. Use a comma-separated value or repeat the query param. Allowed values: tx, deposit, cex-withdraw.

Available options:
tx,
deposit,
cex-withdraw
Example:
["tx", "deposit"]
destinationChainId
string
default:8453
required

Destination chain ID.

Example:

"8453"

inputToken
string
default:0xaf88d065e77c8cc2239327c5edb3a432268e5831
required

Input token address on originChainId, or token symbol when userOps is cex-withdraw and originChainId is omitted.

Example:

"0xaf88d065e77c8cc2239327c5edb3a432268e5831"

inputAmount
string
default:1000000
required

Input amount in token base units. HyperCore origins accept decimal strings.

Example:

"1000000"

outputToken
string
default:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
required

Output token address on destinationChainId.

Example:

"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"

receiverAddress
string
default:0x3e8cB4bd04d81498aB4b94a392c334F5328b237b
required

Destination receiver address. Final recipient for plain routes; executor/contract receiver when destinationPayload is set.

Example:

"0x3e8cB4bd04d81498aB4b94a392c334F5328b237b"

originChainId
string
default:42161
required

Origin chain ID. Required for tx and deposit userOps; optional for cex-withdraw.

Example:

"42161"

userAddress
string
default:0x3e8cB4bd04d81498aB4b94a392c334F5328b237b
required

Origin wallet address. Required for tx userOp.

Example:

"0x3e8cB4bd04d81498aB4b94a392c334F5328b237b"

slippage
string

Slippage tolerance percentage.

refundAddress
string

Address to refund funds to. Required for deposit and cex-withdraw userOps.

feeBps
string

Affiliate fee in basis points. Must be provided together with feeTakerAddress.

feeTakerAddress
string

Address that receives the affiliate fee. Must be provided together with feeBps.

refuel
enum<string>

Whether to request gas refuel. Must be exactly true or false.

Available options:
true,
false
destinationPayload
string

Hex payload to execute on the destination receiver. Requires destinationGasLimit when set.

destinationGasLimit
string

Gas limit for destination payload execution. Requires destinationPayload when set.

includeProvider
string

Comma-separated provider IDs to include. Same-chain routes treat these as DEX IDs; cross-chain routes treat these as public bridge IDs.

excludeProvider
string

Comma-separated provider IDs to exclude. Same-chain routes treat these as DEX IDs; cross-chain routes treat these as public bridge IDs.

exchange
string

CEX exchange ID. Required for cex-withdraw userOp.

Response

200 - application/json

V3 swap quote routes.