Uniswap · Example Payload

Uniswap Get Swap Quote Example

BlockchainCryptocurrencyDeFiDecentralized ExchangeLiquiditySwaps

Uniswap Get Swap Quote Example is an example object payload from Uniswap, with 2 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

requestresponse

Example Payload

Raw ↑
{
  "request": {
    "method": "POST",
    "url": "https://trade-api.gateway.uniswap.org/v1/quote",
    "headers": {
      "Content-Type": "application/json",
      "x-api-key": "YOUR_API_KEY"
    },
    "body": {
      "type": "EXACT_INPUT",
      "tokenInChainId": 1,
      "tokenOutChainId": 1,
      "tokenIn": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
      "tokenOut": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "amount": "1000000000000000000",
      "slippageTolerance": "0.5",
      "swapper": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
      "protocols": ["V3", "V4"],
      "routingPreference": "BEST_PRICE"
    }
  },
  "response": {
    "status": 200,
    "body": {
      "routing": "CLASSIC",
      "requestId": "f3c5e2d1-b4a6-4c8f-9e0d-1a2b3c4d5e6f",
      "quote": {
        "chainId": 1,
        "input": {
          "token": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
          "amount": "1000000000000000000"
        },
        "output": {
          "token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
          "amount": "2498123456",
          "recipient": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
        },
        "slippage": 0.5,
        "priceImpact": 0.12,
        "gasFeeUSD": "3.21",
        "routeString": "[V3] 100.00% WETH — 0.05% — USDC"
      }
    }
  }
}

Work with this as data

Every example here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for examples

4 MCP tools reach this
  • find_examplesBrowse and filter every example in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This example
curl "https://apis.io/api/v1/examples/uniswap-get-swap-quote-example"
All examples
curl "https://apis.io/api/v1/examples?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.