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

# Quote and swap in one request

> Get quote and build transaction in single request



## OpenAPI

````yaml /raptor/http/openapi.json post /quote-and-swap
openapi: 3.0.3
info:
  title: Raptor DEX Aggregator API
  description: High-performance Solana DEX aggregation API and Websocket
  version: 1.0.0
  contact:
    name: Raptor API Support
servers:
  - url: https://raptor-beta.solanatracker.io
    description: Beta server endpoint
security: []
paths:
  /quote-and-swap:
    post:
      summary: Quote and swap in one request
      description: Get quote and build transaction in single request
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteAndSwapRequest'
      responses:
        '200':
          description: Successful quote and transaction build
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteAndSwapResponse'
components:
  schemas:
    QuoteAndSwapRequest:
      type: object
      required:
        - userPublicKey
        - inputMint
        - outputMint
        - amount
      properties:
        userPublicKey:
          type: string
          description: User's wallet public key
        inputMint:
          type: string
          description: Input token mint
        outputMint:
          type: string
          description: Output token mint
        amount:
          type: integer
          description: Input amount in lamports
        slippageBps:
          type: string
          description: Slippage in basis points or 'dynamic'
        dexes:
          type: string
          description: Comma-separated DEX filter
        maxHops:
          type: integer
          description: Maximum routing hops
        wrapUnwrapSol:
          type: boolean
          description: Automatically wrap/unwrap SOL
          default: true
        txVersion:
          type: string
          enum:
            - legacy
            - v0
          description: Transaction version
          default: v0
        priorityFee:
          type: string
          description: Priority fee mode or microlamports
        feeAccount:
          type: string
          description: Platform fee recipient
        feeBps:
          type: integer
          description: Platform fee in basis points
        feeFromInput:
          type: boolean
          description: Take fee from input
          default: false
    QuoteAndSwapResponse:
      type: object
      required:
        - quote
        - swapTransaction
      properties:
        quote:
          $ref: '#/components/schemas/QuoteResponse'
        swapTransaction:
          type: string
          description: Base64-encoded transaction
        lastValidBlockHeight:
          type: integer
          description: Block height until transaction is valid
    QuoteResponse:
      type: object
      required:
        - inputMint
        - outputMint
        - amountIn
        - amountOut
        - minAmountOut
        - feeAmount
        - priceImpact
        - slippageBps
        - routePlan
        - contextSlot
        - timeTaken
      properties:
        inputMint:
          type: string
          description: Input token mint address
        outputMint:
          type: string
          description: Output token mint address
        amountIn:
          type: string
          description: Input amount in lamports
        amountOut:
          type: string
          description: Expected output amount in lamports
        minAmountOut:
          type: string
          description: Minimum output amount after slippage
        feeAmount:
          type: string
          description: Total fees paid in lamports
        priceImpact:
          type: number
          description: Price impact percentage
        slippageBps:
          type: integer
          description: Slippage used in basis points
        routePlan:
          type: array
          items:
            $ref: '#/components/schemas/RouteStep'
          description: Array of routing steps
        swapUsdValue:
          type: string
          description: USD value of the input amount
        priorityFee:
          $ref: '#/components/schemas/PriorityFeeInfo'
        platformFee:
          $ref: '#/components/schemas/PlatformFeeConfig'
        contextSlot:
          type: integer
          description: Solana slot when quote was generated
        timeTaken:
          type: number
          description: Time taken to generate quote in seconds
    RouteStep:
      type: object
      required:
        - programId
        - dex
        - pool
        - inputMint
        - outputMint
        - amountIn
        - amountOut
        - feeAmount
        - priceImpact
      properties:
        programId:
          type: string
          description: DEX program ID
        dex:
          type: string
          description: DEX name
        pool:
          type: string
          description: Pool address
        inputMint:
          type: string
          description: Step input mint
        outputMint:
          type: string
          description: Step output mint
        amountIn:
          type: string
          description: Step input amount
        amountOut:
          type: string
          description: Step output amount
        feeAmount:
          type: string
          description: Step fees
        priceImpact:
          type: number
          description: Step price impact
        percent:
          type: integer
          description: Percentage of total input
    PriorityFeeInfo:
      type: object
      required:
        - recommended
        - level
      properties:
        recommended:
          type: integer
          description: Recommended priority fee in microlamports
        level:
          type: string
          description: Priority level used
        levels:
          $ref: '#/components/schemas/PriorityFeeLevels'
    PlatformFeeConfig:
      type: object
      required:
        - feeBps
        - feeAccount
      properties:
        feeBps:
          type: integer
          description: Fee in basis points
        feeAccount:
          type: string
          description: Fee recipient address
    PriorityFeeLevels:
      type: object
      properties:
        min:
          type: integer
          description: Minimum priority fee
        low:
          type: integer
          description: Low priority fee
        medium:
          type: integer
          description: Medium priority fee
        high:
          type: integer
          description: High priority fee
        veryHigh:
          type: integer
          description: Very high priority fee
        unsafeMax:
          type: integer
          description: Maximum priority fee

````