> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uatu.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Swap Quote

> Resolves the pools for a token pair on the given chain, prices the swap against
each DEX's on-chain contracts concurrently, and returns the best output together
with the encoded Permit2 approval and swap calldata needed to execute it.
Quotes carry a 1-minute deadline and are persisted with a pending status.



## OpenAPI

````yaml /api-reference/openapi.json post /quotes
openapi: 3.0.0
info:
  description: |-
    DEX aggregation and swap-quote API for EVM chains.
    Maintains a catalogue of blockchains, tokens, DEXes and liquidity
    pools, and serves executable swap quotes built from on-chain AMM data.
  title: uatu API
  contact: {}
  version: 0.1.0
servers:
  - url: https://api.uatu.dev
    description: Hosted API
  - url: http://localhost:8080
    description: Self-hosted instance (set PORT in your environment)
security: []
tags:
  - name: quotes
    description: Price a swap and get the calldata needed to execute it.
  - name: catalogue
    description: Discover the chains, tokens, DEXes and pools uatu knows about.
paths:
  /quotes:
    post:
      tags:
        - quotes
      summary: Create a Swap Quote
      description: >-
        Resolves the pools for a token pair on the given chain, prices the swap
        against

        each DEX's on-chain contracts concurrently, and returns the best output
        together

        with the encoded Permit2 approval and swap calldata needed to execute
        it.

        Quotes carry a 1-minute deadline and are persisted with a pending
        status.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uatu.QuoteRequest'
        description: request body to create a swap quote
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/server.APIResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/uatu.Quote'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.APIResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.APIResponse'
components:
  schemas:
    uatu.QuoteRequest:
      type: object
      required:
        - amount
        - chain
        - chainId
        - recipientAddress
        - tokenIn
        - tokenOut
      properties:
        amount:
          type: string
        chain:
          type: string
        chainId:
          type: integer
        recipientAddress:
          type: string
        tokenIn:
          type: string
        tokenOut:
          type: string
    server.APIResponse:
      type: object
      required:
        - message
      properties:
        code:
          type: integer
        data: {}
        message:
          type: string
    uatu.Quote:
      type: object
      properties:
        amountIn:
          type: string
        amountInFloat:
          type: string
        amountOut:
          type: string
        amountOutFloat:
          type: string
        createdAt:
          type: string
        deadline:
          type: integer
        destinationChain:
          type: string
        destinationChainId:
          type: integer
        explorerUrl:
          type: string
        hash:
          type: string
        originChain:
          type: string
        originChainId:
          type: integer
        pairAddress:
          type: string
        quoteId:
          type: string
        recipientAddress:
          type: string
        route:
          $ref: '#/components/schemas/uatu.Route'
        status:
          type: string
          enum:
            - pending
            - completed
            - failed
        steps:
          type: array
          items:
            $ref: '#/components/schemas/uatu.Actions'
        tokenIn:
          $ref: '#/components/schemas/uatu.Token'
        tokenOut:
          $ref: '#/components/schemas/uatu.Token'
        updatedAt:
          type: string
        walletAddress:
          type: string
    uatu.Route:
      type: object
      properties:
        dex:
          type: string
        fees:
          description: Fees is the route fee in the input token's smallest unit.
          type: string
        logo:
          type: string
        name:
          type: string
    uatu.Actions:
      type: object
      properties:
        amount:
          type: string
        chainId:
          type: integer
        data:
          type: string
        from:
          type: string
        message:
          type: string
        spender:
          type: string
        to:
          type: string
        value:
          type: string
    uatu.Token:
      type: object
      properties:
        address:
          type: string
        blockchainId:
          type: integer
        decimals:
          type: integer
        logo:
          type: string
        name:
          type: string
        slug:
          type: string
        symbol:
          type: string

````