Uniswap Swap API

The Swap API from Uniswap — 4 operation(s) for swap.

Operations 4

POST /swap Create swap calldata #
GET /swaps Get swaps status #
POST /swap_5792 Create swap EIP 5792 calldata #
POST /swap_7702 Create swap EIP 7702 calldata #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/uniswap-swap-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

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

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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

OpenAPI Specification

uniswap-swap-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.0.0
  title: Token Trading Approval Swap API
  description: 'Uniswap Labs trading APIs.


    Each operation may include the vendor extension `x-public-endpoint` (boolean): `true` when the operation is available on the public gateway for standard API keys, `false` when it is not publicly exposed. See the [OpenAPI specification extensions](https://swagger.io/docs/specification/v3_0/openapi-extensions/) definition of `x-` fields.'
servers:
- description: Uniswap Trading API
  url: https://trade-api.gateway.uniswap.org/v1
security:
- apiKey: []
tags:
- name: Swap
paths:
  /swap:
    post:
      tags:
      - Swap
      summary: Create swap calldata
      description: Create the calldata for a swap transaction (including wrap/unwrap) against the Uniswap Protocols. If the `quote` parameter includes the fee parameters, then the calldata will include the fee disbursement. The gas estimates will be **more precise** when the the response calldata would be valid if submitted on-chain.
      operationId: create_swap_transaction
      security:
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/universalRouterVersionHeader'
      - $ref: '#/components/parameters/permit2DisabledHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSwapRequest'
            example:
              quote:
                chainId: 1
                input:
                  amount: '2516'
                  token: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599'
                output:
                  amount: '996320746321162'
                  token: '0x0000000000000000000000000000000000000000'
                  recipient: '0xC9bebBA9f481b12cE6f3EA54c4B182c9636ec421'
                swapper: '0xC9bebBA9f481b12cE6f3EA54c4B182c9636ec421'
                route:
                - - type: v4-pool
                    address: '0x599326d9cd5e1ea0893305c87d5ec3199e7f05e94d72159f35dea381479a615e'
                    tokenIn:
                      chainId: 1
                      decimals: '8'
                      address: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599'
                      symbol: WBTC
                    tokenOut:
                      chainId: 1
                      decimals: '18'
                      address: '0x0000000000000000000000000000000000000000'
                      symbol: ETH
                    fee: '500'
                    tickSpacing: '10'
                    hooks: '0x0000000000000000000000000000000000000000'
                    liquidity: '82781860385007263'
                    sqrtRatioX96: '125814565506407615477027'
                    tickCurrent: '-267075'
                    amountIn: '2516'
                    amountOut: '993829944455359'
                slippage: 5.5
                tradeType: EXACT_INPUT
                quoteId: 62e83902-9455-405d-8c62-cdf8ee9e2042
                gasFeeUSD: '1.27511942409885062'
                gasFeeQuote: '489108586810000'
                gasUseEstimate: '180350'
                priceImpact: 0.14
                txFailureReasons: []
                maxPriorityFeePerGas: '2000000000'
                maxFeePerGas: '4656513686'
                gasFee: '489108586810000'
                routeString: '[V4] 100.00% = WBTC -- 0.05% [0x599326d9cd5e1ea0893305c87d5ec3199e7f05e94d72159f35dea381479a615e]ETH'
                blockNumber: '22483653'
                aggregatedOutputs:
                - amount: '993829944455360'
                  token: '0x0000000000000000000000000000000000000000'
                  recipient: '0xC9bebBA9f481b12cE6f3EA54c4B182c9636ec421'
                  bps: 9975
                  minAmount: '993829944455360'
                - amount: '2490801865802'
                  token: '0x0000000000000000000000000000000000000000'
                  recipient: '0x000000fee13a103A10D593b9AE06b3e05F2E7E1c'
                  bps: 25
                  minAmount: '2490801865802'
                portionAmount: '2490801865802'
                portionBips: 25
                portionRecipient: '0x000000fee13a103A10D593b9AE06b3e05F2E7E1c'
              permitData:
                domain:
                  name: Permit2
                  chainId: 1
                  verifyingContract: '0x000000000022D473030F116dDEE9F6B43aC78BA3'
                types:
                  PermitSingle:
                  - name: details
                    type: PermitDetails
                  - name: spender
                    type: address
                  - name: sigDeadline
                    type: uint256
                  PermitDetails:
                  - name: token
                    type: address
                  - name: amount
                    type: uint160
                  - name: expiration
                    type: uint48
                  - name: nonce
                    type: uint48
                values:
                  details:
                    token: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599'
                    amount: '1461501637330902918203684832716283019655932542975'
                    expiration: '1749845047'
                    nonce: '1'
                  spender: '0x66a9893cc07d91d95644aedd05d03f95e1dba8af'
                  sigDeadline: '1747254847'
              signature: 0xb22e7f47d8...
              simulateTransaction: true
              refreshGasPrice: true
              safetyMode: SAFE
              urgency: normal
      responses:
        '200':
          $ref: '#/components/responses/CreateSwapSuccess200'
        '400':
          $ref: '#/components/responses/BadRequest400'
        '401':
          $ref: '#/components/responses/SwapUnauthorized401'
        '404':
          $ref: '#/components/responses/SwapNotFound404'
        '429':
          $ref: '#/components/responses/RateLimitedErr429'
        '500':
          $ref: '#/components/responses/InternalErr500'
        '504':
          $ref: '#/components/responses/Timeout504'
      x-public-endpoint: true
  /swaps:
    get:
      tags:
      - Swap
      summary: Get swaps status
      description: Get the status of swap or bridge transactions. Accepts on-chain transaction hashes (`txHashes`), ERC-4337 userOperation hashes (`userOpHashes`), or both. At least one of the two must contain at least one item.
      operationId: get_swaps
      security:
      - apiKey: []
      parameters:
      - $ref: '#/components/parameters/transactionHashesParam'
      - $ref: '#/components/parameters/userOpHashesParam'
      - $ref: '#/components/parameters/chainIdParam'
      responses:
        '200':
          $ref: '#/components/responses/GetSwapsSuccess200'
        '400':
          $ref: '#/components/responses/BadRequest400'
        '404':
          $ref: '#/components/responses/SwapNotFound404'
        '429':
          $ref: '#/components/responses/RateLimitedErr429'
        '500':
          $ref: '#/components/responses/InternalErr500'
        '504':
          $ref: '#/components/responses/Timeout504'
      x-public-endpoint: true
  /swap_5792:
    post:
      tags:
      - Swap
      summary: Create swap EIP 5792 calldata
      description: Create the EIP 5792 calldata for a swap transaction (including wrap/unwrap and bridging) against the Uniswap Protocols. If the `quote` parameter includes the fee parameters, then the calldata will include the fee disbursement. The gas estimates will be **more precise** when the response calldata would be valid if submitted on-chain.
      operationId: create_swap_5792_transaction
      security:
      - apiKey: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSwap5792Request'
            example:
              quote:
                chainId: 8453
                swapper: '0xC9bebBA9f481b12cE6f3EA54c4B182c9636ec421'
                tradeType: EXACT_INPUT
                route:
                - - type: v4-pool
                    address: '0x636da53e0251b3cb0b4d10dbaff488b294f97bd5212b7e2a7c1bc3fb57fd6e31'
                    tokenIn:
                      address: '0x624e2e7fDc8903165F64891672267AB0FCB98831'
                      chainId: 8453
                      symbol: SOSO
                      decimals: '18'
                    tokenOut:
                      address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                      chainId: 8453
                      symbol: USDC
                      decimals: '6'
                    sqrtRatioX96: '51868315841017165286814'
                    liquidity: '60642987270239502'
                    tickCurrent: '-284797'
                    fee: '1'
                    tickSpacing: '1'
                    hooks: '0x0000000000000000000000000000000000000000'
                    amountIn: '4666414752365827583'
                    amountOut: '1999890'
                input:
                  amount: '4666414752365827583'
                  token: '0x624e2e7fDc8903165F64891672267AB0FCB98831'
                output:
                  amount: '1999890'
                  token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                  recipient: '0xC9bebBA9f481b12cE6f3EA54c4B182c9636ec421'
                slippage: 2.5
                priceImpact: 0.01
                gasFee: '1664618749624'
                gasFeeUSD: '0.002335228716641861'
                gasFeeQuote: '2335'
                gasUseEstimate: '162169'
                routeString: '[v4] 100.00% = [0.0001%] [1] [0x0000000000000000000000000000000000000000] 0x636da53e0251b3cb0b4d10dbaff488b294f97bd5212b7e2a7c1bc3fb57fd6e31'
                blockNumber: '45041016'
                quoteId: dccb2b4f-3b0c-46be-8e17-9fb103d44990
                gasPrice: '9000000'
                txFailureReasons: []
                aggregatedOutputs:
                - amount: '1999890'
                  token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                  recipient: '0xC9bebBA9f481b12cE6f3EA54c4B182c9636ec421'
                  bps: 10000
                  minAmount: '1949892'
              permitData:
                domain:
                  name: Permit2
                  chainId: 8453
                  verifyingContract: '0x000000000022D473030F116dDEE9F6B43aC78BA3'
                types:
                  PermitSingle:
                  - name: details
                    type: PermitDetails
                  - name: spender
                    type: address
                  - name: sigDeadline
                    type: uint256
                  PermitDetails:
                  - name: token
                    type: address
                  - name: amount
                    type: uint160
                  - name: expiration
                    type: uint48
                  - name: nonce
                    type: uint48
                values:
                  details:
                    token: '0x624e2e7fDc8903165F64891672267AB0FCB98831'
                    amount: '1461501637330902918203684832716283019655932542975'
                    expiration: '1779463380'
                    nonce: '0'
                  spender: '0x6ff5693b99212da76ad316178a184ab56d299b43'
                  sigDeadline: '1776873180'
              urgency: normal
      parameters:
      - $ref: '#/components/parameters/universalRouterVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/CreateSwap5792Success200'
        '400':
          $ref: '#/components/responses/BadRequest400'
        '401':
          $ref: '#/components/responses/SwapUnauthorized401'
        '404':
          $ref: '#/components/responses/SwapNotFound404'
        '429':
          $ref: '#/components/responses/RateLimitedErr429'
        '500':
          $ref: '#/components/responses/InternalErr500'
        '504':
          $ref: '#/components/responses/Timeout504'
      x-public-endpoint: true
  /swap_7702:
    post:
      tags:
      - Swap
      summary: Create swap EIP 7702 calldata
      description: 'Create the EIP 7702 calldata for a swap transaction (including wrap/unwrap and bridging) against the Uniswap Protocols. If the `quote` parameter includes the fee parameters, then the calldata will include the fee disbursement. The gas estimates will be **more precise** when the the response calldata would be valid if submitted on-chain.


        Native ETH / UniswapX setup: When `x-erc20eth-enabled` is `true` and the input token is native ETH, the response may include an additional native approval call (e.g. an `approveNative` step) to enable ERC20-ETH (EIP-7914) spending for the wallet. This native allowance is a prerequisite for native ETH input on UniswapX (`/quote` → `/order`) for supported wallets.'
      operationId: create_swap_7702_transaction
      security:
      - apiKey: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSwap7702Request'
            example:
              quote:
                chainId: 8453
                swapper: '0xC9bebBA9f481b12cE6f3EA54c4B182c9636ec421'
                tradeType: EXACT_INPUT
                route:
                - - type: v4-pool
                    address: '0x636da53e0251b3cb0b4d10dbaff488b294f97bd5212b7e2a7c1bc3fb57fd6e31'
                    tokenIn:
                      address: '0x624e2e7fDc8903165F64891672267AB0FCB98831'
                      chainId: 8453
                      symbol: SOSO
                      decimals: '18'
                    tokenOut:
                      address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                      chainId: 8453
                      symbol: USDC
                      decimals: '6'
                    sqrtRatioX96: '51868315841017165286814'
                    liquidity: '60642987270239502'
                    tickCurrent: '-284797'
                    fee: '1'
                    tickSpacing: '1'
                    hooks: '0x0000000000000000000000000000000000000000'
                    amountIn: '4666414752365827583'
                    amountOut: '1999890'
                input:
                  amount: '4666414752365827583'
                  token: '0x624e2e7fDc8903165F64891672267AB0FCB98831'
                output:
                  amount: '1999890'
                  token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                  recipient: '0xC9bebBA9f481b12cE6f3EA54c4B182c9636ec421'
                slippage: 2.5
                priceImpact: 0.01
                gasFee: '1636896419348'
                gasFeeUSD: '0.002335228716641861'
                gasFeeQuote: '2335'
                gasUseEstimate: '162169'
                routeString: '[v4] 100.00% = [0.0001%] [1] [0x0000000000000000000000000000000000000000] 0x636da53e0251b3cb0b4d10dbaff488b294f97bd5212b7e2a7c1bc3fb57fd6e31'
                blockNumber: '45041659'
                quoteId: ce44f65c-b16a-46e3-a3cf-23cadea6110b
                gasPrice: '9000000'
                txFailureReasons: []
                aggregatedOutputs:
                - amount: '1999890'
                  token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                  recipient: '0xC9bebBA9f481b12cE6f3EA54c4B182c9636ec421'
                  bps: 10000
                  minAmount: '1949892'
              permitData:
                domain:
                  name: Permit2
                  chainId: 8453
                  verifyingContract: '0x000000000022D473030F116dDEE9F6B43aC78BA3'
                types:
                  PermitSingle:
                  - name: details
                    type: PermitDetails
                  - name: spender
                    type: address
                  - name: sigDeadline
                    type: uint256
                  PermitDetails:
                  - name: token
                    type: address
                  - name: amount
                    type: uint160
                  - name: expiration
                    type: uint48
                  - name: nonce
                    type: uint48
                values:
                  details:
                    token: '0x624e2e7fDc8903165F64891672267AB0FCB98831'
                    amount: '1461501637330902918203684832716283019655932542975'
                    expiration: '1779464665'
                    nonce: '0'
                  spender: '0x6ff5693b99212da76ad316178a184ab56d299b43'
                  sigDeadline: '1776874465'
              smartContractDelegationAddress: '0x000000009b1d0af20d8c6d0a44e162d11f9b8f00'
      parameters:
      - $ref: '#/components/parameters/universalRouterVersionHeader'
      - $ref: '#/components/parameters/erc20EthEnabledHeader'
      responses:
        '200':
          $ref: '#/components/responses/CreateSwap7702Success200'
        '400':
          $ref: '#/components/responses/BadRequest400'
        '401':
          $ref: '#/components/responses/SwapUnauthorized401'
        '404':
          $ref: '#/components/responses/SwapNotFound404'
        '429':
          $ref: '#/components/responses/RateLimitedErr429'
        '500':
          $ref: '#/components/responses/InternalErr500'
        '504':
          $ref: '#/components/responses/Timeout504'
      x-public-endpoint: true
components:
  schemas:
    slippageTolerance:
      description: 'The slippage tolerance as a percentage up to a maximum of two decimal places. For Uniswap Protocols (v2, v3, v4), the slippage tolerance is the maximum amount the price can change between the time the transaction is submitted and the time it is executed. The slippage tolerance is a percentage of the total value of the swap.


        When submitting a quote, note that slippage tolerance works differently in UniswapX swaps where it does not set a limit on the Spread in an order. See [here](https://api-docs.uniswap.org/guides/faqs#why-do-uniswapx-quotes-have-more-slippage-than-the-tolerance-i-set) for more information.


        Note that if the trade type is `EXACT_INPUT`, then the slippage is in terms of the output token. If the trade type is `EXACT_OUTPUT`, then the slippage is in terms of the input token.


        When submitting a request, `slippageTolerance` may not be set when `autoSlippage` is defined. One of `slippageTolerance` or `autoSlippage` must be defined.'
      type: number
      pattern: ^[0-9]{0,3}\.?[0-9]{0,2}$
    ClassicInput:
      type: object
      properties:
        token:
          $ref: '#/components/schemas/inputToken'
        amount:
          $ref: '#/components/schemas/tokenAmount'
    deadline:
      type: number
      description: The unix timestamp at which the order will be reverted if not filled.
    SwapStatus:
      type: string
      enum:
      - PENDING
      - SUCCESS
      - NOT_FOUND
      - FAILED
      - EXPIRED
    inputToken:
      type: string
      description: The token which will be sent, specified by its token address. For a list of supported tokens, see the [FAQ](https://api-docs.uniswap.org/guides/faqs).
      pattern: ^(0x)?[0-9a-fA-F]{40}$
    gasPrice:
      type: string
      description: The cost per unit of gas.
    tickSpacing:
      type: number
      description: The width of ticks in this pool (e.g. the price range between two ticks) specified in basis points. For more information see the [Uniswap V3 Whitepaper](https://app.uniswap.org/whitepaper-v3.pdf).
    maxFeePerGas:
      type: string
      description: The sum of the base fee and priority fee. Subtracting `maxPriorityFeePerGas` from this value will yield the base fee to be paid for this transaction.
    TokenInRoute:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/inputToken'
        chainId:
          $ref: '#/components/schemas/ChainId'
        symbol:
          $ref: '#/components/schemas/tokenSymbol'
        decimals:
          type: string
          description: The number of decimals supported by the token. This number is used to convert token amounts to the token's common representation.
        buyFeeBps:
          $ref: '#/components/schemas/bpsFee'
        sellFeeBps:
          $ref: '#/components/schemas/bpsFee'
    V3PoolInRoute:
      title: V3 Route
      type: object
      properties:
        type:
          type: string
          default: v3-pool
        address:
          $ref: '#/components/schemas/contractAddress'
        tokenIn:
          $ref: '#/components/schemas/TokenInRoute'
        tokenOut:
          $ref: '#/components/schemas/TokenInRoute'
        sqrtRatioX96:
          $ref: '#/components/schemas/sqrtRatioX96'
        liquidity:
          $ref: '#/components/schemas/liquidity'
        tickCurrent:
          $ref: '#/components/schemas/tickCurrent'
        fee:
          $ref: '#/components/schemas/poolFee'
        amountIn:
          $ref: '#/components/schemas/tokenAmount'
        amountOut:
          $ref: '#/components/schemas/tokenAmount'
    Err504:
      type: object
      properties:
        errorCode:
          default: Timeout
          type: string
        detail:
          type: string
    portionAmount:
      type: string
      description: The portion of the swap that will be taken as a fee in the base units of the token. The fee will be taken from the output token.
    SwapSafetyMode:
      type: string
      enum:
      - SAFE
      description: Swap safety mode will automatically sweep the transaction for the native token and return it to the sender wallet address. This is to prevent accidental loss of funds in the event that the token amount is set in the transaction value instead of as part of the calldata.
    Permit:
      description: the permit2 message object for the customer to sign to permit spending by the permit2 contract.
      type: object
      properties:
        domain:
          type: object
        values:
          type: object
        types:
          type: object
    V4PoolInRoute:
      title: V4 Route
      type: object
      properties:
        type:
          type: string
          default: v4-pool
        address:
          $ref: '#/components/schemas/contractAddress'
        tokenIn:
          $ref: '#/components/schemas/TokenInRoute'
        tokenOut:
          $ref: '#/components/schemas/TokenInRoute'
        sqrtRatioX96:
          $ref: '#/components/schemas/sqrtRatioX96'
        liquidity:
          $ref: '#/components/schemas/liquidity'
        tickCurrent:
          $ref: '#/components/schemas/tickCurrent'
        fee:
          $ref: '#/components/schemas/poolFee'
        tickSpacing:
          $ref: '#/components/schemas/tickSpacing'
        hooks:
          type: string
          description: The address of the hook for the pool, if any. If the pool has no hook, this field will be the null address (e.g. 0x0000000000000000000000000000000000000000).
        amountIn:
          $ref: '#/components/schemas/tokenAmount'
        amountOut:
          $ref: '#/components/schemas/tokenAmount'
      required:
      - type
      - address
      - tokenIn
      - tokenOut
      - sqrtRatioX96
      - liquidity
      - tickCurrent
      - fee
      - tickSpacing
      - hooks
    gasLimit:
      type: string
      description: The maximum units of gas that will be consumed by this transaction.
    Err400:
      type: object
      properties:
        errorCode:
          default: RequestValidationError
          type: string
        detail:
          type: string
    V2PoolInRoute:
      title: V2 Route
      type: object
      properties:
        type:
          type: string
          default: v2-pool
        address:
          $ref: '#/components/schemas/contractAddress'
        tokenIn:
          $ref: '#/components/schemas/TokenInRoute'
        tokenOut:
          $ref: '#/components/schemas/TokenInRoute'
        reserve0:
          $ref: '#/components/schemas/V2Reserve'
        reserve1:
          $ref: '#/components/schemas/V2Reserve'
        amountIn:
          $ref: '#/components/schemas/tokenAmount'
        amountOut:
          $ref: '#/components/schemas/tokenAmount'
    maxPriorityFeePerGas:
      type: string
      description: The maximum tip to the block builder. Adjusted based upon the urgency specified in the request.
    CreateSwap5792Response:
      type: object
      properties:
        requestId:
          $ref: '#/components/schemas/RequestId'
        from:
          $ref: '#/components/schemas/Address'
        chainId:
          $ref: '#/components/schemas/ChainId'
        calls:
          type: array
          items:
            $ref: '#/components/schemas/TransactionRequest5792'
        gasFee:
          $ref: '#/components/schemas/gasFee'
      required:
      - requestId
      - from
      - chainId
      - calls
    ClassicOutput:
      type: object
      properties:
        token:
          $ref: '#/components/schemas/outputToken'
        amount:
          $ref: '#/components/schemas/tokenAmount'
        recipient:
          $ref: '#/components/schemas/receiverWalletAddress'
    sqrtRatioX96:
      type: string
      description: The square root of the ratio of the token0 and token1 in the pool, as a Q64.64 number. For more information see the [Uniswap V3 Whitepaper](https://app.uniswap.org/whitepaper-v3.pdf).
    CreateSwapRequest:
      type: object
      description: The parameters **signature** and **permitData** should only be included if *permitData* was returned from **/quote**.
      properties:
        quote:
          oneOf:
          - $ref: '#/components/schemas/ClassicQuote'
          - $ref: '#/components/schemas/WrapUnwrapQuote'
          - $ref: '#/components/schemas/BridgeQuote'
        signature:
          type: string
          description: The signed permit.
        includeGasInfo:
          type: boolean
          default: false
          deprecated: true
          description: Use `refreshGasPrice` instead.
        refreshGasPrice:
          type: boolean
          default: false
          description: If true, the gas price will be re-fetched from the network.
        simulateTransaction:
          type: boolean
          default: false
          description: If true, the transaction will be simulated. If the simulation results on an onchain error, endpoint will return an error.
        permitData:
          allOf:
          - $ref: '#/components/schemas/Permit'
        safetyMode:
          $ref: '#/components/schemas/SwapSafetyMode'
        deadline:
          $ref: '#/components/schemas/deadline'
        urgency:
          $ref: '#/components/schemas/Urgency'
      required:
      - quote
    TransactionHash:
      type: string
      description: The unique hash of the transaction.
      pattern: ^(0x)?[0-9a-fA-F]{64}$
    V2Reserve:
      description: The remaining reserve of this token in the pool.
      type: object
      properties:
        token:
          $ref: '#/components/schemas/TokenInRoute'
        quotient:
          description: The quantity of this token remaining in the pool, specified in the base units of the token.
          type: string
    portionAmountReceiverAddress:
      type: string
      description: The wallet address which will receive the fee.
    contractAddress:
      type: string
      description: The address of a contract which will be used to facilitate the swap.
      pattern: ^(0x)?[0-9a-fA-F]{40}$
    ClassicQuote:
      title: Classic Quote
      type: object
      properties:
        input:
          $ref: '#/components/schemas/ClassicInput'
        output:
          $ref: '#/components/schemas/ClassicOutput'
        swapper:
          $ref: '#/components/schemas/senderWalletAddress'
        chainId:
          $ref: '#/components/schemas/ChainId'
        slippage:
          $ref: '#/components/schemas/slippageTolerance'
        tradeType:
          $ref: '#/components/schemas/TradeType'
        gasFee:
          $ref: '#/components/schemas/gasFee'
        gasFeeUSD:
          $ref: '#/components/schemas/gasFeeUSD'
        gasFeeQuote:
          $ref: '#/components/schemas/gasFeeInCurrency'
        route:
          type: array
          items:
            type: array
            items:
              oneOf:
              - $ref: '#/components/schemas/V2PoolInRoute'
              - $ref: '#/components/schemas/V3PoolInRoute'
              - $ref: '#/components/schemas/V4PoolInRoute'
        portionBips:
          $ref: '#/components/schemas/portionBips'
        portionAmount:
          $ref: '#/components/schemas/portionAmount'
        portionRecipient:
          $ref: '#/components/schemas/portionAmountReceiverAddress'
        routeString:
          type: string
          description: The route in string format.
        quoteId:
          $ref: '#/components/schemas/quoteId'
        gasUseEstimate:
          type: string
          description: The estimated gas use. It does NOT include the additional gas for token approvals.
        blockNumber:
          type: string
          description: The current block number.
        gasPrice:
          $ref: '#/components/schemas/gasPrice'
        maxFeePerGas:
          $ref: '#/components/schemas/maxFeePerGas'
        maxPriorityFeePerGas:
          $ref: '#/components/schemas/maxPriorityFeePerGas'
        txFailureReasons:
          description: The reason(s) why the transaction failed during simulation.
          type: array
          items:
            $ref: '#/components/schemas/TransactionFailureReason'
        priceImpact:
          type: number
          description: The impact the trade has on the market price of the pool, between 0-100 percent
        aggregatedOutputs:
          type: array
          items:
            $ref: '#/components/schemas/AggregatedOutput'
    NullablePermit:
      description: the permit2 message object for the customer to sign to permit spending by the permit2 contract.
      type:
      - object
      - 'null'
      properties:
        domain:
          type: object
        values:
          type: object
        types:
          type: object
    Err429:
      type: object
      properties:
        errorCode:
          default: Ratelimited
          type: string
        detail:
          type: string
    senderWalletAddress:
      type: string
      description: The wallet address which will be used to send the token.
      pattern: ^(0x)?[0-9a-fA-F]{40}$
    AggregatedOutput:
      description: An array of all outputs of the proposed transaction. This includes the swap as well as any fees collected by the API integrator. This does not include pool fees when routing is through a Uniswap Protocol pool.
      type: object
      properties:
        token:
          $ref: '#/components/schemas/outputToken'
        amount:
          $ref: '#/components/schemas/tokenAmount'
        recipient:
          $ref: '#/components/schemas/receiverWalletAddress'
        bps:
          $ref: '#/components/schemas/bps'
        minAmount:
          $ref: '#/components/schemas/minAmount'
    Address:
      type: string
      pattern: ^(0x)?[0-9a-fA-F]{40}$
    tokenSymbol:
      type: string
      description: The symbol of the token.
    CreateSwap7702Request:
      type: object
      properties:
        quote:
          oneOf:
          - $ref: '#/components/schemas/ClassicQuote'
          - $ref: '#/components/schemas/WrapUnwrapQuote'
          - $ref: '#/components/schemas/BridgeQuote'
        permitData:
          $ref: '#/components/schemas/NullablePermit'
        smartContractDelegationAddress:
          $ref: '#/components/schemas/Address'
        includeGasInfo:
          type: boolean
          default: false
        deadline:
          $ref: '#/components/schemas/deadline'
        urgency:
          $ref: '#/components/schemas/Urgency'
        simulateTransaction:
          type: boolean
      required:
      - quote
    liquidity:
      type: string
      description: The amount of liquidity in the pool at a given tick. For more information see the [Uniswap V3 Whitepaper](https://app.uniswap.org/whitepaper-v3.pdf).
    receiverWalletAddress:
      type: string
      description: The wallet address which will receive the token.
      pattern: ^(0x)?[0-9a-fA-F]{40}$
    TransactionRequest5792:
      type: object
      properties:
        to:
          $ref: '#/components/schemas/receiverWalletAddress'
        data:
          type: string
          description: The calldata for the transaction.
        value:
          type: string
          description: The quantity of ETH tokens approved for spending by the transaction, denominated in wei. Note that by default Uniswap Labs sets this to the maximum approvable spend.
        gasLimit:
          $ref: '#

# --- truncated at 32 KB (49 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/uniswap/refs/heads/main/openapi/uniswap-swap-api-openapi.yml