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

# Get Quote

> Find the best quote to exchange tokens via AKKA router. Returns expected output amount and optional token/protocol information. The Pathfinder algorithm splits transactions across multiple protocols and market depths to find the most efficient swap route.

<Info>
  The quote endpoint returns the best available rate but does **not** generate transaction data.
  To execute the swap, use the [swap endpoint](/api-reference/get-swap).
</Info>

## Optional response fields

By default, the response only includes `dstAmount`. Use these flags to include additional data:

| Flag                     | What it adds                                                                   |
| ------------------------ | ------------------------------------------------------------------------------ |
| `includeTokensInfo=true` | `srcToken` and `dstToken` metadata (symbol, name, decimals, logo)              |
| `includeGas=true`        | `gas` — estimated gas amount                                                   |
| `includeRoutes=true`     | `routes` — parallel path breakdown with pools and tokens                       |
| `includeGraph=true`      | `graph` — flat list of on-chain DAG hops (mirrors the actual router execution) |


## OpenAPI

````yaml GET /swap/v1/{chainId}/quote
openapi: 3.0.3
info:
  title: AKKA Finance API
  version: 1.0.0
  description: >-
    AKKA Finance liquidity aggregation API. Find the best swap routes across
    multiple DEXes and execute token swaps with optimal pricing.
  contact:
    name: AKKA Finance
    url: https://akka.finance
    email: support@akka.finance
servers:
  - url: https://api.akka.finance
    description: Production
security:
  - apiKey: []
paths:
  /swap/v1/{chainId}/quote:
    get:
      tags:
        - Quote & Swap
      summary: Get quote for token swap
      description: >-
        Find the best quote to exchange tokens via AKKA router. Returns expected
        output amount and optional token/protocol information. The Pathfinder
        algorithm splits transactions across multiple protocols and market
        depths to find the most efficient swap route.
      operationId: getQuote
      parameters:
        - name: chainId
          in: path
          required: true
          description: Blockchain chain ID
          schema:
            type: integer
            enum:
              - 999
            example: 999
        - name: src
          in: query
          required: true
          description: >-
            Source token contract address. Use
            `0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee` for the native token
            (HYPE on HyperEVM).
          schema:
            type: string
            pattern: ^0x[a-fA-F0-9]{40}$
            example: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'
        - name: dst
          in: query
          required: true
          description: Destination token contract address.
          schema:
            type: string
            pattern: ^0x[a-fA-F0-9]{40}$
            example: '0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb'
        - name: amount
          in: query
          required: true
          description: >-
            Amount to swap in the smallest unit (wei). For example, 1 HYPE =
            `1000000000000000000` (18 decimals).
          schema:
            type: string
            example: '1000000000000000000'
        - name: includeTokensInfo
          in: query
          required: false
          description: >-
            Include `srcToken` and `dstToken` metadata (symbol, name, decimals,
            logo) in the response.
          schema:
            type: boolean
            default: false
        - name: includeGas
          in: query
          required: false
          description: Include estimated gas amount in the response.
          schema:
            type: boolean
            default: false
        - name: includeRoutes
          in: query
          required: false
          description: >-
            Include the details of the swap routes (pools, tokens, percentages)
            in the response.
          schema:
            type: boolean
            default: false
        - name: includeGraph
          in: query
          required: false
          description: >-
            Include the on-chain DAG step list (one entry per pool hop) under
            `graph`. Mirrors what the AkkaRouter actually executes, including
            fan-in/fan-out at intermediate tokens.
          schema:
            type: boolean
            default: false
        - name: exactQuote
          in: query
          required: false
          description: >-
            Override the per-chain quote policy for this request. `yes` forces
            the full graph walk (MegaQuoter); `no` returns the upstream
            pre-computed sum. Useful for benchmarking.
          schema:
            type: string
            enum:
              - 'yes'
              - 'no'
      responses:
        '200':
          description: Quote retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
              examples:
                basic:
                  summary: Basic quote (HYPE to UBTC)
                  value:
                    dstAmount: '205340622987446484992'
                withTokenInfo:
                  summary: Quote with token info
                  value:
                    dstAmount: '205340622987446484992'
                    srcToken:
                      address: '0x5555555555555555555555555555555555555555'
                      symbol: WHYPE
                      name: Wrapped HYPE
                      decimals: 18
                      logoUri: null
                    dstToken:
                      address: '0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb'
                      symbol: UBTC
                      name: Universal BTC
                      decimals: 18
                      logoUri: null
                    gas: '2419157'
        '400':
          description: Bad request — invalid parameters, no route found, or token not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 400
                message: No route found for the given token pair
                error: Bad Request
                timestamp: '2025-01-15T12:00:00.000Z'
                path: /swap/v1/999/quote
        '404':
          description: Chain or token not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    QuoteResponse:
      type: object
      required:
        - dstAmount
      properties:
        dstAmount:
          type: string
          description: Expected output amount in the smallest unit (wei)
          example: '205340622987446484992'
        srcToken:
          $ref: '#/components/schemas/TokenInfo'
          description: Source token information (when `includeTokensInfo=true`)
        dstToken:
          $ref: '#/components/schemas/TokenInfo'
          description: Destination token information (when `includeTokensInfo=true`)
        routes:
          type: array
          description: Swap routes (when `includeRoutes=true`)
          items:
            $ref: '#/components/schemas/Route'
        gas:
          type: string
          description: Estimated gas amount (when `includeGas=true`)
          example: '2419157'
        graph:
          type: array
          description: >-
            On-chain DAG step list (when `includeGraph=true`). One entry per
            pool hop.
          items:
            $ref: '#/components/schemas/GraphStep'
    ErrorResponse:
      type: object
      required:
        - statusCode
        - message
        - error
        - timestamp
        - path
      properties:
        statusCode:
          type: integer
          description: HTTP status code
          example: 400
        message:
          type: string
          description: Human-readable error description
          example: No route found for the given token pair
        error:
          type: string
          description: Error type
          example: Bad Request
        timestamp:
          type: string
          format: date-time
          description: When the error occurred
          example: '2025-01-15T12:00:00.000Z'
        path:
          type: string
          description: API endpoint path that produced the error
          example: /swap/v1/999/quote
    TokenInfo:
      type: object
      required:
        - address
        - symbol
        - name
        - decimals
      description: Token metadata included when `includeTokensInfo=true`
      properties:
        address:
          type: string
          description: Token contract address
          example: '0x5555555555555555555555555555555555555555'
        symbol:
          type: string
          description: Token ticker symbol
          example: WHYPE
        name:
          type: string
          description: Full token name
          example: Wrapped HYPE
        decimals:
          type: integer
          description: Number of decimal places
          example: 18
        logoUri:
          type: string
          nullable: true
          description: URL to the token logo image
          example: null
    Route:
      type: object
      required:
        - percent
        - pools
        - path
      properties:
        percent:
          type: number
          description: Percentage of the total swap routed through this path
          example: 70
        pools:
          type: array
          description: Pools used in this route segment
          items:
            $ref: '#/components/schemas/Pool'
        path:
          type: array
          description: Ordered list of tokens in this route
          items:
            $ref: '#/components/schemas/TokenInRoute'
    GraphStep:
      type: object
      required:
        - from
        - to
        - pool
        - exchange
        - poolType
        - percentage
      description: >-
        A single hop in the on-chain execution DAG. Steps with the same `from`
        token represent fan-out (split routing). Steps with the same `to` token
        represent fan-in (merged outputs).
      properties:
        from:
          type: string
          description: Source token address for this hop
          example: '0x5555555555555555555555555555555555555555'
        to:
          type: string
          description: Destination token address for this hop
          example: '0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb'
        pool:
          type: string
          description: Pool contract address executing this hop
          example: '0x1234567890abcdef1234567890abcdef12345678'
        exchange:
          type: string
          description: Exchange display name
          example: HyperSwap V3
        poolType:
          type: string
          description: Pool type identifier
          example: uni_v3
        percentage:
          type: integer
          description: >-
            Parts-per-million share of the source token allocated to this step.
            Sibling steps sharing the same `from` token sum to 1,000,000 (100%).
          example: 700000
    Pool:
      type: object
      required:
        - address
        - fee
        - exchange
        - poolType
      properties:
        address:
          type: string
          description: Pool contract address
          example: '0x1234567890abcdef1234567890abcdef12345678'
        fee:
          type: number
          description: Pool fee
          example: 3000
        exchange:
          type: string
          description: Exchange/DEX name
          example: HyperSwap
        poolType:
          type: string
          description: Pool type identifier
          example: uni_v3
    TokenInRoute:
      type: object
      required:
        - address
        - decimals
        - symbol
      properties:
        address:
          type: string
          description: Token contract address
          example: '0x5555555555555555555555555555555555555555'
        decimals:
          type: integer
          description: Token decimals
          example: 18
        symbol:
          type: string
          description: Token symbol
          example: WHYPE
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: API key for authentication. Contact AKKA on Telegram to obtain your key.

````