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

# List holdings



## OpenAPI

````yaml /openapi.yaml get /api/v1/holdings
openapi: 3.0.3
info:
  title: Sure API
  version: v1
  description: OpenAPI documentation for the Sure API.
servers:
  - url: https://app.sure.am
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
paths:
  /api/v1/holdings:
    get:
      tags:
        - Holdings
      summary: List holdings
      parameters:
        - name: page
          in: query
          required: false
          description: 'Page number (default: 1)'
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: 'Items per page (default: 25, max: 100)'
          schema:
            type: integer
        - name: account_id
          in: query
          required: false
          description: Filter by account ID
          schema:
            type: string
            format: uuid
        - name: account_ids
          in: query
          required: false
          description: Filter by multiple account IDs
          schema:
            type: array
            items:
              type: string
        - name: date
          in: query
          required: false
          description: Filter by exact date
          schema:
            type: string
            format: date
        - name: start_date
          in: query
          required: false
          description: Filter holdings from this date
          schema:
            type: string
            format: date
        - name: end_date
          in: query
          required: false
          description: Filter holdings until this date
          schema:
            type: string
            format: date
        - name: security_id
          in: query
          required: false
          description: Filter by security ID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: holdings listed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HoldingCollection'
      security:
        - apiKeyAuth: []
components:
  schemas:
    HoldingCollection:
      type: object
      required:
        - holdings
        - pagination
      properties:
        holdings:
          type: array
          items:
            $ref: '#/components/schemas/Holding'
        pagination:
          $ref: '#/components/schemas/Pagination'
    Holding:
      type: object
      required:
        - id
        - date
        - qty
        - price
        - amount
        - currency
        - account
        - security
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        date:
          type: string
          format: date
        qty:
          type: number
          description: Number of shares or units held
        price:
          type: string
          description: Formatted price per unit
        amount:
          type: string
          description: Formatted total value
        currency:
          type: string
        cost_basis_source:
          type: string
          nullable: true
          description: Source of cost basis calculation
        account:
          $ref: '#/components/schemas/Account'
        security:
          $ref: '#/components/schemas/Security'
        avg_cost:
          type: string
          nullable: true
          description: Formatted average cost basis per unit, if available
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Pagination:
      type: object
      required:
        - page
        - per_page
        - total_count
        - total_pages
      properties:
        page:
          type: integer
          minimum: 1
        per_page:
          type: integer
          minimum: 1
        total_count:
          type: integer
          minimum: 0
        total_pages:
          type: integer
          minimum: 0
    Account:
      type: object
      required:
        - id
        - name
        - account_type
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        account_type:
          type: string
    Security:
      type: object
      required:
        - id
        - ticker
        - name
      properties:
        id:
          type: string
          format: uuid
        ticker:
          type: string
        name:
          type: string
          nullable: true
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: X-Api-Key
      in: header
      description: API key for authentication. Generate one from your account settings.

````