> ## 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.

# Quote a creator-token buy or sell

> Returns a block-pinned Uniswap v4 Quoter result. For `BUY`, `amount`
is native ETH Wei and output is raw creator-token units. For `SELL`,
`amount` is raw creator-token units and output is native ETH Wei.
`minimumOut` is 99% of the quoted output. This is not a transaction and
does not replace immediate wallet-side simulation or a deadline.




## OpenAPI

````yaml /api-reference/retardmarket_openapi.yml get /markets/{marketId}/quote
openapi: 3.0.3
info:
  title: retard.market API
  version: 12.27.0
  description: |
    Attested Robinhood Chain reads for the experimental memecoin launch,
    trading, and staking protocol behind `/retard`. Each market is built around
    a fixed-supply creator memecoin paired with native ETH in a Uniswap v4 pool.
    The API exposes runtime identity, markets, quotes, activity, wallet holdings
    and positions, and funded creator-tip proofs.

    This protocol is experimental. Contracts, economics, API responses, and
    availability may change, and funds may be lost. Verify the runtime contract
    graph and simulate every wallet transaction immediately before signing. Use
    is subject to the VibeChain Terms of Service at
    https://vibechain.com/terms.

    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/v1227
security:
  - ApiKeyAuth: []
tags:
  - name: Runtime
    description: Attested deployment identity and readiness
  - name: Markets
    description: Creator markets, quotes, schedules, and bounded activity
  - name: Wallets
    description: Wallet positions, holdings, and activity
  - name: Tips
    description: Safe-funded creator-tip root proofs
  - name: Airdrop
    description: Status of the deliberately parked airdrop feature
paths:
  /markets/{marketId}/quote:
    get:
      tags:
        - Markets
      summary: Quote a creator-token buy or sell
      description: |
        Returns a block-pinned Uniswap v4 Quoter result. For `BUY`, `amount`
        is native ETH Wei and output is raw creator-token units. For `SELL`,
        `amount` is raw creator-token units and output is native ETH Wei.
        `minimumOut` is 99% of the quoted output. This is not a transaction and
        does not replace immediate wallet-side simulation or a deadline.
      operationId: quoteRetardTrade
      parameters:
        - $ref: '#/components/parameters/MarketId'
        - in: query
          name: side
          required: true
          schema:
            $ref: '#/components/schemas/TradeSide'
        - in: query
          name: amount
          required: true
          description: Positive input amount as a decimal string
          schema:
            $ref: '#/components/schemas/PositiveAmount'
      responses:
        '200':
          description: Block-pinned trade quote
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradeQuote'
        '400':
          $ref: '#/components/responses/InvalidInput'
        '404':
          $ref: '#/components/responses/MarketNotFound'
        '429':
          $ref: '#/components/responses/ApiKeyOrRateLimit'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  parameters:
    MarketId:
      in: path
      name: marketId
      required: true
      description: Public numeric market ID
      schema:
        type: integer
        minimum: 0
  schemas:
    TradeSide:
      type: string
      enum:
        - BUY
        - SELL
    PositiveAmount:
      type: string
      pattern: ^[1-9][0-9]{0,38}$
      description: Positive unsigned integer below 2^128
    TradeQuote:
      type: object
      required:
        - marketId
        - coin
        - side
        - amountIn
        - amountOut
        - minimumOut
        - poolKey
        - projectedBlock
        - updatedAt
      properties:
        marketId:
          type: integer
          minimum: 0
        coin:
          $ref: '#/components/schemas/Address'
        side:
          $ref: '#/components/schemas/TradeSide'
        amountIn:
          $ref: '#/components/schemas/IntegerString'
        amountOut:
          $ref: '#/components/schemas/IntegerString'
        minimumOut:
          $ref: '#/components/schemas/IntegerString'
        poolKey:
          $ref: '#/components/schemas/PoolKey'
        projectedBlock:
          type: integer
          minimum: 0
        updatedAt:
          $ref: '#/components/schemas/DateTime'
    Address:
      type: string
      pattern: ^0x[0-9a-fA-F]{40}$
      example: '0x41B13C429675015d32377305D03222CbddB20cA0'
    IntegerString:
      type: string
      pattern: ^[0-9]+$
      description: Unsigned integer encoded as a decimal string
    PoolKey:
      type: object
      required:
        - currency0
        - currency1
        - fee
        - tickSpacing
        - hooks
      properties:
        currency0:
          $ref: '#/components/schemas/Address'
        currency1:
          $ref: '#/components/schemas/Address'
        fee:
          type: integer
          example: 20000
        tickSpacing:
          type: integer
          example: 200
        hooks:
          $ref: '#/components/schemas/Address'
    DateTime:
      type: string
      format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    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 wallet, market, cursor, limit, side, or amount
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    MarketNotFound:
      description: Market is absent, internal, or retired from public discovery
      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'
    InternalError:
      description: The pinned chain read or simulation could not be completed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: Configuration, reader, or proof registry is unavailable
      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`.

````