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

# Batch personalized quotes

> Personalized quote for many markets in one call. `yesAmounts`/`noAmounts` are comma-separated 6-dec micro-units aligned 1:1 with `conditionIds` (omit either for all-zero on that side). Each `quotes` entry is an INDEPENDENT quote (identical to GET /markets/{conditionId}/quote): its `points` coverage assumes only that market is the new stake. Unknown conditionIds are listed in `notFound`.




## OpenAPI

````yaml /openapi/v1.yaml get /quote
openapi: 3.1.0
info:
  title: Robin Markets Integration API
  version: 1.0.0
  description: >
    Public API for surfacing Robin staking inside a third-party frontend. You
    already have the Polymarket market data; this returns **what Robin computes
    on top**: a market's live staking APY, a personalized projected APY for a
    stake a user is about to make, and the state of a wallet's existing
    positions (shares, value, accrued-yield breakdown, live APY).


    Data endpoints are **read-only**. Two `POST` helpers cover actions a read
    can't: `POST /markets` indexes a market from Polymarket, and `POST /twap`
    returns a signed oracle update you must submit on-chain before depositing or
    withdrawing.


    ### Conventions

    - **Token / USD amounts** are 6-decimal integer strings (`"1500000"` = 1.5).
    Both outcome tokens
      and USDC use 6 decimals. Divide by `1e6` to display.

    - **APY values** are plain numbers in **percent** (`6.0` means 6.00% APY).

    - **`conditionId`** is the Polymarket condition id (bytes32 hex).

    - **`wallet`** is the user's resolved Robin staking wallet (a Polymarket
    DepositWallet or Gnosis
      Safe proxy), **not** the user's EOA.

    - Outcome / side values are `"yes"` / `"no"` (and `"both"` for a
    fully-resolved market).


    ### Auth, CORS & rate limiting

    No authentication. CORS is wide-open (`Access-Control-Allow-Origin: *`), so
    endpoints can be called directly from the browser; each path also answers
    `OPTIONS` preflight. Requests are rate-limited per IP (shared global budget)
    — back off on `429`.


    ### The APY formula

    Every APY is built from three layers: `total = max(nativeApy ×
    matchedFraction, guaranteeFloor) + matchingBonus + pointsBoost`. Base =
    socialized native yield, floored at the guarantee; matching = +1% for the
    pool-balancing (minority) side, scaled by the matchable portion; points = a
    personalized Robin Points boost (never handled directly — it appears as the
    `points` line and is folded into totals).
  license:
    name: See repository
servers:
  - url: https://app.robin.markets/api/v1
    description: Production
security: []
tags:
  - name: Markets
    description: Market-level staking APY and per-wallet quotes/positions.
  - name: Positions
    description: A wallet's existing Robin positions.
  - name: TWAP
    description: Signed oracle price updates required before depositing or withdrawing.
  - name: Capacity
    description: >-
      Two-tier vault deposit capacity (internal guard + external ERC-4626
      headroom).
  - name: Meta
    description: Static integration metadata.
paths:
  /quote:
    get:
      tags:
        - Markets
      summary: Batch personalized quotes
      description: >
        Personalized quote for many markets in one call.
        `yesAmounts`/`noAmounts` are comma-separated 6-dec micro-units aligned
        1:1 with `conditionIds` (omit either for all-zero on that side). Each
        `quotes` entry is an INDEPENDENT quote (identical to GET
        /markets/{conditionId}/quote): its `points` coverage assumes only that
        market is the new stake. Unknown conditionIds are listed in `notFound`.
      operationId: getQuotes
      parameters:
        - $ref: '#/components/parameters/WalletQueryRequired'
        - name: conditionIds
          in: query
          required: true
          description: >-
            Comma-separated condition ids (max 25; must be unique, aligned 1:1
            with yesAmounts/noAmounts).
          schema:
            type: string
        - name: yesAmounts
          in: query
          required: false
          description: >-
            Comma-separated YES amounts (6-dec micro-units), aligned 1:1 with
            conditionIds.
          schema:
            type: string
        - name: noAmounts
          in: query
          required: false
          description: >-
            Comma-separated NO amounts (6-dec micro-units), aligned 1:1 with
            conditionIds.
          schema:
            type: string
      responses:
        '200':
          description: Per-market quotes + the notFound list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchQuotes'
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    WalletQueryRequired:
      name: wallet
      in: query
      required: true
      description: >-
        The user's resolved Robin staking wallet (DepositWallet or Safe proxy),
        not the EOA.
      schema:
        $ref: '#/components/schemas/Address'
  schemas:
    BatchQuotes:
      type: object
      required:
        - wallet
        - quotes
        - notFound
      properties:
        wallet:
          $ref: '#/components/schemas/Address'
        quotes:
          type: array
          description: >-
            One INDEPENDENT quote per found market (points coverage assumes only
            that market is new).
          items:
            $ref: '#/components/schemas/Quote'
        notFound:
          type: array
          description: >-
            Requested conditionIds not indexed on Robin — POST /markets to index
            them first.
          items:
            $ref: '#/components/schemas/ConditionId'
    Address:
      type: string
      description: 20-byte EVM address, lowercase hex.
      pattern: ^0x[a-fA-F0-9]{40}$
      example: '0xcb7444981296d08da7161b75378e3773dbf5d806'
    Quote:
      type: object
      description: >-
        A single market's personalized quote — also the per-entry shape of the
        batch quote.
      required:
        - conditionId
        - amounts
        - stakeUsd
        - projectedApy
        - points
      properties:
        conditionId:
          $ref: '#/components/schemas/ConditionId'
        amounts:
          type: object
          required:
            - 'yes'
            - 'no'
          properties:
            'yes':
              $ref: '#/components/schemas/Amount6'
            'no':
              $ref: '#/components/schemas/Amount6'
        stakeUsd:
          allOf:
            - $ref: '#/components/schemas/Amount6'
          description: USD value (6-dec) of the quoted deposit.
        projectedApy:
          type: object
          required:
            - total
            - base
            - matching
            - points
          properties:
            total:
              $ref: '#/components/schemas/Apy'
            base:
              $ref: '#/components/schemas/Apy'
            matching:
              allOf:
                - $ref: '#/components/schemas/Apy'
              description: USD-weighted across both sides, scaled by matchable portion.
            points:
              allOf:
                - $ref: '#/components/schemas/Apy'
              description: This wallet's points boost over (existing stake + this deposit).
        points:
          type: object
          required:
            - balance
            - boostDays
            - portfolioStakeUsd
          properties:
            balance:
              type: string
              description: Robin Points balance (integer count, as a string).
              pattern: ^[0-9]+$
              example: '2500'
            boostDays:
              type: integer
              description: How many days the boost lasts at the current burn rate.
              example: 217
            portfolioStakeUsd:
              allOf:
                - $ref: '#/components/schemas/Amount6'
              description: The wallet's existing total Robin stake (USD 6-dec).
      example:
        conditionId: '0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a'
        amounts:
          'yes': '0'
          'no': '10000000'
        stakeUsd: '9700000'
        projectedApy:
          total: 7.93
          base: 6
          matching: 1
          points: 0.93
        points:
          balance: '2500'
          boostDays: 217
          portfolioStakeUsd: '2100000'
    ConditionId:
      type: string
      description: 32-byte Polymarket condition id, hex.
      pattern: ^0x[a-fA-F0-9]{64}$
      example: '0xce9a5fa30fe74e323b4a8f15afbb0b7a41a537aa880779ddf7dee22223b2f34a'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - bad_request
                - not_found
                - rate_limited
                - internal
                - twap_unavailable
                - twap_timeout
                - capacity_unavailable
            message:
              type: string
    Amount6:
      type: string
      description: >-
        A non-negative integer in 6-decimal fixed-point micro-units (e.g.
        "1500000" = 1.5).
      pattern: ^[0-9]+$
      example: '1500000'
    Apy:
      type: number
      format: double
      description: APY in percent (6.0 = 6.00%).
      example: 6.4
  responses:
    BadRequest:
      description: Invalid parameters (e.g. missing `wallet`, or a non-integer amount).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: bad_request
              message: wallet is required
    TooManyRequests:
      description: Rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: rate_limited
              message: Too many requests

````