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

# Get Swap Quote

> Get a quote for swapping tokens. Supports same-chain and cross-chain swaps.

Routes are automatically optimized across multiple DEXs and bridges for the best rates.




## OpenAPI

````yaml POST /swap/quote
openapi: 3.1.0
info:
  title: Zet API
  description: >
    The Zet API enables businesses to integrate smart on/off ramp, token swap,
    and cross-chain transfer capabilities into their applications.


    Built on ERC-4337 smart accounts with gas-sponsored transactions, Zet
    handles the complexity of blockchain interactions so you can focus on your
    product.


    ## Base URL


    ```

    https://api.zet.money/v1

    ```


    ## Authentication


    All requests must include your API key in the `x-api-key` header. Contact
    [zetdotmoney@gmail.com](mailto:zetdotmoney@gmail.com) to obtain your API
    keys.


    ## Rate Limits


    - **60 requests per minute** per API key (default)

    - Rate limit headers are included in every response

    - Contact us for higher limits
  version: 1.0.0
  contact:
    name: Zet Support
    url: https://zet.money/support
    email: support@zet.money
  license:
    name: Proprietary
servers:
  - url: https://api.zet.money/v1
    description: Production
  - url: https://api-staging.zet.money/v1
    description: Staging
security:
  - apiKey: []
tags:
  - name: Wallets
    description: Create and manage smart wallets for your users
  - name: On-Ramp
    description: Buy crypto with Nigerian Naira (NGN)
  - name: Off-Ramp
    description: Sell crypto for Nigerian Naira (NGN)
  - name: Swap
    description: Swap tokens on the same chain or across chains
  - name: Cross-Chain Transfer
    description: Transfer tokens across different blockchains
  - name: Webhooks
    description: Register webhook URLs to receive async event notifications
  - name: Transactions
    description: Query transaction history and details
paths:
  /swap/quote:
    post:
      tags:
        - Swap
      summary: Get swap quote
      description: >
        Get a quote for swapping tokens. Supports same-chain and cross-chain
        swaps.


        Routes are automatically optimized across multiple DEXs and bridges for
        the best rates.
      operationId: getSwapQuote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapQuoteRequest'
      responses:
        '200':
          description: Swap quote with route details.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/SwapQuote'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    SwapQuoteRequest:
      type: object
      required:
        - fromToken
        - toToken
        - amount
      properties:
        fromToken:
          type: string
          description: Token symbol to swap from.
          example: USDC
        toToken:
          type: string
          description: Token symbol to swap to.
          example: ETH
        amount:
          type: string
          description: Amount of `fromToken` to swap.
          example: '100'
        fromChain:
          $ref: '#/components/schemas/PrimaryChain'
          default: base
        toChain:
          $ref: '#/components/schemas/PrimaryChain'
          default: base
          description: >-
            Target chain. If different from `fromChain`, this becomes a
            cross-chain swap.
        slippage:
          type: number
          description: Maximum slippage tolerance as a percentage.
          default: 0.3
          example: 0.5
    SwapQuote:
      type: object
      properties:
        quoteId:
          type: string
          example: qt_01H8X5...
        fromToken:
          type: string
          example: USDC
        toToken:
          type: string
          example: ETH
        fromChain:
          $ref: '#/components/schemas/PrimaryChain'
        toChain:
          $ref: '#/components/schemas/PrimaryChain'
        fromAmount:
          type: string
          description: Amount of source token.
          example: '100'
        toAmount:
          type: string
          description: Estimated amount of destination token.
          example: '0.0285'
        rate:
          type: string
          description: Exchange rate (fromToken per toToken).
          example: '3508.77'
        isCrossChain:
          type: boolean
          example: false
        fees:
          type: object
          properties:
            platformFee:
              type: string
              description: Zet platform fee (always 50 NGN), converted to source token.
              example: '0.032'
            platformFeeFiat:
              type: string
              description: Platform fee in NGN.
              example: '50'
            bridgeFee:
              type: string
              description: Bridge/DEX fee from the routing provider (if cross-chain).
              example: '0'
            totalFee:
              type: string
              example: '0.013'
        route:
          type: object
          description: Summary of the swap route.
          properties:
            steps:
              type: integer
              description: Number of steps in the route.
              example: 1
            estimatedTime:
              type: string
              description: Estimated execution time.
              example: 30 seconds
            providers:
              type: array
              items:
                type: string
              description: DEX/bridge providers used.
              example:
                - DEX V3
        expiresAt:
          type: string
          format: date-time
    PrimaryChain:
      type: string
      enum:
        - base
        - bsc
      description: Primary chains where Zet-managed wallets operate
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: INVALID_REQUEST
            message:
              type: string
              example: The 'amount' field is required.
  responses:
    BadRequest:
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error:
              code: INVALID_REQUEST
              message: The 'amount' field must be a positive number.
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error:
              code: UNAUTHORIZED
              message: Invalid API key.
    RateLimited:
      description: Rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error:
              code: RATE_LIMITED
              message: Rate limit exceeded. Try again in 60 seconds.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Zet API key. Contact zetdotmoney@gmail.com to obtain your keys.

````