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

# Get Calendar Returns



## OpenAPI

````yaml /api-reference/openapi.json get /v1/funds/{code}/calendar-returns
openapi: 3.1.0
info:
  title: Fruit Stand Fund Returns API
  description: Trailing and calendar-year total returns for US mutual funds and ETFs.
  version: 1.0.0
servers:
  - url: https://api.fruitstand.dev
    description: Production
security:
  - apiKey: []
tags:
  - name: Meta
    description: Service liveness and data-freshness checks. No API key required.
  - name: Funds
    description: >-
      Search the universe of ~32,000 US mutual funds and ETFs and fetch fund
      metadata by ticker.
  - name: Returns
    description: >-
      Trailing total returns (1d through 20y, plus YTD and since-inception) and
      calendar-year returns — for a single fund or batched across many in one
      call.
paths:
  /v1/funds/{code}/calendar-returns:
    get:
      tags:
        - Returns
      summary: Get Calendar Returns
      operationId: getCalendarReturns
      parameters:
        - name: code
          in: path
          required: true
          schema:
            type: string
            title: Code
        - name: market
          in: query
          required: false
          schema:
            type: string
            default: US
            title: Market
          description: >-
            Market/exchange code for the fund. Defaults to US — all funds are
            currently US-listed and `code` is a bare ticker (e.g. SPY), so this
            is informational and does not affect lookups. Reserved for future
            multi-market support.
        - name: year
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Year
          description: Specific calendar year. Omit for latest.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalendarYearReturns'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CalendarYearReturns:
      properties:
        code:
          type: string
          title: Code
          description: Bare ticker, e.g. SPY.
        market:
          type: string
          title: Market
          description: Market/exchange code. Always US for now.
          default: US
        calendar_year:
          type: integer
          title: Calendar Year
        base_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Base Date
        end_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: End Date
        calendar_year_return:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Calendar Year Return
      type: object
      required:
        - code
        - calendar_year
      title: CalendarYearReturns
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Your Fruit Stand API key from app.fruitstand.dev.

````