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

# Create Swap Quote

> Returns a stateless swap price preview. No funds move and nothing is persisted.



## OpenAPI

````yaml /openapi/api-v1-native.yml post /swaps/quote
openapi: 3.1.0
info:
  title: Whop API
  description: >-
    Hand-written V1 endpoints. Merged into the GraphqlRestProxy-generated schema
    at build time.
  version: v1
servers:
  - url: https://{defaultHost}
    variables:
      defaultHost:
        default: api.whop.com/api/v1
security: []
paths:
  /swaps/quote:
    post:
      tags:
        - Swaps
      summary: Create Swap Quote
      description: >-
        Returns a stateless swap price preview. No funds move and nothing is
        persisted.
      operationId: createSwapQuote
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: string
                  description: Source token amount.
                from_token:
                  type: string
                  description: >-
                    Source token contract address or ticker symbol, such as
                    "USDT".
                to_token:
                  type: string
                  description: >-
                    Destination token contract address or ticker symbol, such as
                    "XAUT".
                from_chain:
                  oneOf:
                    - type: string
                    - type: integer
                    - type: 'null'
                  description: >-
                    Source chain name or chain ID. Defaults to the source
                    token's chain when omitted.
                to_chain:
                  oneOf:
                    - type: string
                    - type: integer
                    - type: 'null'
                  description: >-
                    Destination chain name or chain ID. Defaults to the
                    destination token's chain when omitted.
                from_address:
                  type:
                    - string
                    - 'null'
                  description: Source wallet address used for the quote.
                to_address:
                  type:
                    - string
                    - 'null'
                  description: Destination wallet address used for the quote.
                slippage_bps:
                  type:
                    - integer
                    - 'null'
                  description: Maximum slippage tolerance in basis points.
                metadata:
                  type: object
                  additionalProperties: true
                  description: Metadata to include with the quote response.
              required:
                - amount
                - from_token
                - to_token
        required: true
      responses:
        '200':
          description: swap quote created
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                      - swap_quote
                  amount_in:
                    type: string
                    description: Source token amount used for the quote.
                  amount_out:
                    type: string
                    description: Estimated destination token amount.
                  amount_out_min:
                    type: string
                    description: Minimum destination amount after slippage.
                  rate:
                    type: string
                    description: Quoted exchange rate.
                  fee_bps:
                    type: integer
                    description: Whop fee in basis points.
                  bridge_fee:
                    type:
                      - string
                      - 'null'
                    description: Estimated bridge fee for cross-chain swaps.
                  estimated_duration_seconds:
                    type:
                      - integer
                      - 'null'
                    description: Estimated time for the swap to complete.
                  requires_token_approval:
                    type:
                      - boolean
                      - 'null'
                    description: Whether the source token needs approval before swapping.
                  from_address:
                    type:
                      - string
                      - 'null'
                    description: Source wallet address used for the quote.
                  to_address:
                    type:
                      - string
                      - 'null'
                    description: Destination wallet address used for the quote.
                  from_token:
                    type: object
                    additionalProperties: true
                    description: Resolved source token details.
                  to_token:
                    type: object
                    additionalProperties: true
                    description: Resolved destination token details.
                  metadata:
                    type: object
                    additionalProperties: true
                    description: Metadata from the request.
                required:
                  - object
                  - amount_in
                  - amount_out
                  - rate
                  - fee_bps
                  - from_token
                  - to_token
                  - metadata
        '400':
          $ref: '#/components/responses/InvalidParameters'
          description: request is invalid
      security: []
components:
  responses:
    InvalidParameters:
      description: Invalid Parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/V1ErrorResponse'
  schemas:
    V1ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: Machine-readable error code.
            message:
              type: string
              description: Human-readable error message.
          required:
            - type
            - message
      required:
        - error

````