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

# Preview a wrapper buy

> Returns a block-pinned, principal-only conservative preview. The quote
is not a transaction and does not replace wallet-side simulation,
slippage bounds, or a deadline.




## OpenAPI

````yaml /api-reference/retardmarket_openapi.yml get /markets/{market}/quote
openapi: 3.0.3
info:
  title: retard.market V9 API
  version: 0.9.0
  description: >
    Projection-backed Robinhood Chain market data, conservative quotes, wallet
    portfolios,

    points, media uploads, and realtime invalidation for retard.market.


    Every endpoint requires a caller-specific VibeChain API key in the

    `API-KEY` header. Create one at

    https://docs.vibechain.com/api-reference/retardmarket-intro.
servers:
  - url: https://build.vibechain.com/api/retard/v9
security:
  - ApiKeyAuth: []
tags:
  - name: Runtime
  - name: Markets
  - name: Portfolio
  - name: Points
  - name: Media
  - name: Realtime
paths:
  /markets/{market}/quote:
    get:
      tags:
        - Markets
      summary: Preview a wrapper buy
      description: |
        Returns a block-pinned, principal-only conservative preview. The quote
        is not a transaction and does not replace wallet-side simulation,
        slippage bounds, or a deadline.
      operationId: quoteRetardV9Buy
      parameters:
        - $ref: '#/components/parameters/MarketAddress'
        - in: query
          name: side
          required: true
          schema:
            $ref: '#/components/schemas/SideKey'
        - in: query
          name: amount
          required: true
          description: Positive WETH input in Wei
          schema:
            $ref: '#/components/schemas/Wei'
      responses:
        '200':
          description: Conservative buy preview
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradeQuote'
        '400':
          $ref: '#/components/responses/InvalidInput'
        '404':
          $ref: '#/components/responses/MarketNotFound'
        '409':
          description: The market is not open for quoting
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/ApiKeyOrRateLimit'
        '503':
          $ref: '#/components/responses/ProjectionUnavailable'
components:
  parameters:
    MarketAddress:
      in: path
      name: market
      required: true
      description: V9 market contract address
      schema:
        $ref: '#/components/schemas/Address'
  schemas:
    SideKey:
      type: string
      enum:
        - 'YES'
        - 'NO'
    Wei:
      type: string
      pattern: ^[0-9]+$
      description: Unsigned integer amount in Wei
      example: '50000000000000000'
    TradeQuote:
      type: object
      required:
        - market
        - side
        - amountInWeth
        - appFeeWeth
        - poolFeeWeth
        - tokensOut
        - currentProbabilityBps
        - estimatedProbabilityAfterBps
        - estimatedWinnerPotAfterWeth
        - estimatedSideClaimSupplyAfter
        - estimatedPayoutIfWinnerWeth
        - estimatedProfitIfWinnerWeth
        - officialActiveLiquidityShareBps
        - estimateKind
        - projectedBlock
        - updatedAt
      properties:
        market:
          $ref: '#/components/schemas/Address'
        side:
          $ref: '#/components/schemas/SideKey'
        amountInWeth:
          $ref: '#/components/schemas/Wei'
        appFeeWeth:
          $ref: '#/components/schemas/Wei'
        poolFeeWeth:
          $ref: '#/components/schemas/Wei'
        tokensOut:
          $ref: '#/components/schemas/IntegerString'
        currentProbabilityBps:
          type: integer
        estimatedProbabilityAfterBps:
          type: integer
        estimatedWinnerPotAfterWeth:
          $ref: '#/components/schemas/Wei'
        estimatedSideClaimSupplyAfter:
          $ref: '#/components/schemas/IntegerString'
        estimatedPayoutIfWinnerWeth:
          $ref: '#/components/schemas/Wei'
        estimatedProfitIfWinnerWeth:
          $ref: '#/components/schemas/Wei'
        officialActiveLiquidityShareBps:
          type: integer
          minimum: 0
          maximum: 10000
        estimateKind:
          type: string
          enum:
            - PRINCIPAL_ONLY_IF_ROLLED_NOW
        projectedBlock:
          type: integer
        updatedAt:
          $ref: '#/components/schemas/DateTime'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    Address:
      type: string
      pattern: ^0x[0-9a-fA-F]{40}$
      example: '0x0000000000000000000000000000000000000001'
    IntegerString:
      type: string
      pattern: ^[0-9]+$
    DateTime:
      type: string
      format: date-time
    ApiKeyError:
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          required:
            - docs
          properties:
            error:
              type: string
              enum:
                - API_KEY_REQUIRED_OR_RATE_LIMITED
            docs:
              type: string
              format: uri
  responses:
    InvalidInput:
      description: Invalid request input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    MarketNotFound:
      description: Market is not present in the official V9 projection
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ApiKeyOrRateLimit:
      description: API key missing/invalid or the caller allowance is exhausted
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds until the current rate window resets
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiKeyError'
    ProjectionUnavailable:
      description: Finalized projection is stale, unavailable, or still catching up
      headers:
        Retry-After:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: API-KEY
      description: Caller-specific VibeChain API key created through `/apikey/create`.

````