Quick Start

Make your first token swap on Uniswap in minutes using Custom Linking, the Uniswap API, SDK, or Solidity.

Uniswap offers distinct methods for integrating swapping functionality into your application. Choosing the right approach depends on your specific needs regarding customization, control, and development resources.

Choose Your Implementation Path

Best ForComplexityFull Guide
DApps, Wallets, Agents, BotsLowUniswap API

Use the Uniswap API to integrate swapping quickly without implementing routing logic yourself.

Step 1: Get your API key

Create an API key at developers.uniswap.org/dashboard.

Step 2: Authenticate your requests

All requests require an API key.

curl --request POST \
  --url https://trade-api.gateway.uniswap.org/v1/quote \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --data '{"tokenIn":"0x...","tokenOut":"0x...","amount":"1000000","type":"EXACT_INPUT","tokenInChainId":1,"tokenOutChainId":1,"swapper":"0x..."}'

Step 3: Request a quote

Call /quote to get the most efficient route based on current inputs and expected output.

const response = await fetch('https://trade-api.gateway.uniswap.org/v1/quote', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
  },
  body: JSON.stringify({
    tokenIn: '0x0000000000000000000000000000000000000000', // ETH
    tokenOut: '0xdAC17F958D2ee523a2206206994597C13D831ec7', // USDT
    tokenInChainId: 1,
    tokenOutChainId: 1,
    type: 'EXACT_INPUT',
    amount: '1000000000000000000', // 1 ETH in wei
    swapper: '0x...', // User wallet
    slippageTolerance: 0.5, // 0.5%
  }),
})

const quote = await response.json()

Step 4: Build the execution request

Use the routing value from /quote to choose the next endpoint:

DUTCH_V2, DUTCH_V3, PRIORITY -> call POST /order
CLASSIC, WRAP, UNWRAP, BRIDGE -> call POST /swap

Step 5: Sign and submit

For POST /swap, sign with the user wallet and broadcast the returned transaction through your RPC provider. For POST /order, sign and submit the order payload, then monitor status with GET /orders. Your app still handles nonce strategy, error handling, and status tracking.

Where to go next