> ## 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 or bridge quote

> Returns the best available DEX route for matching chain IDs, or a bridge route for different chains.
Returns a saved, pending quote with ordered transaction steps. Submit the steps yourself before the five-minute deadline (Unix seconds).
Input `amount` uses whole-token units; response amounts use integer strings in each token's smallest units.



## 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 or bridge quote
      description: >-
        Returns the best available DEX route for matching chain IDs, or a bridge
        route for different chains.

        Returns a saved, pending quote with ordered transaction steps. Submit
        the steps yourself before the five-minute deadline (Unix seconds).

        Input `amount` uses whole-token units; response amounts use integer
        strings in each token's smallest units.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/uatu.QuoteRequest'
        description: Swap or bridge request
        required: true
      responses:
        '200':
          description: Saved quote with route and transaction steps
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/server.APIResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/uatu.Quote'
        '400':
          description: Invalid request or quote unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.APIResponse'
        '401':
          description: API key is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.APIResponse'
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.APIResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    uatu.QuoteRequest:
      type: object
      required:
        - amount
        - destinationChainId
        - originChainId
        - recipientAddress
        - tokenIn
        - tokenOut
      properties:
        amount:
          type: string
          example: '1.5'
        destinationChainId:
          type: integer
          example: 1
        originChainId:
          type: integer
          example: 1
        recipientAddress:
          type: string
        slippageBps:
          type: integer
          example: 50
        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
        amountOutMinimum:
          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'
        slippageBps:
          type: integer
        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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: |-
        Organization API key issued from the Uatu console, sent as
        "Bearer uatu_live_...". The X-API-Key header carrying the bare
        key is accepted as an alternative.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.