> ## Documentation Index
> Fetch the complete documentation index at: https://sure-917046f5-docs-cloudflare-tunnel-self-hosting.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List trades



## OpenAPI

````yaml /openapi.yaml get /api/v1/trades
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/trades:
    get:
      tags:
        - Trades
      summary: List trades
      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: start_date
          in: query
          required: false
          description: Filter trades from this date
          schema:
            type: string
            format: date
        - name: end_date
          in: query
          required: false
          description: Filter trades until this date
          schema:
            type: string
            format: date
      responses:
        '200':
          description: trades listed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradeCollection'
      security:
        - apiKeyAuth: []
components:
  schemas:
    TradeCollection:
      type: object
      required:
        - trades
        - pagination
      properties:
        trades:
          type: array
          items:
            $ref: '#/components/schemas/Trade'
        pagination:
          $ref: '#/components/schemas/Pagination'
    Trade:
      type: object
      required:
        - id
        - date
        - amount
        - currency
        - name
        - qty
        - price
        - account
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        date:
          type: string
          format: date
        amount:
          type: string
          description: Formatted monetary amount (e.g. "$1,234.56")
        currency:
          type: string
        name:
          type: string
        notes:
          type: string
          nullable: true
        qty:
          type: number
          description: Quantity of shares or units traded. Negative for sells.
        price:
          type: string
          description: Formatted price per unit
        investment_activity_label:
          type: string
          nullable: true
          description: Activity label such as Buy, Sell, Dividend, etc.
        account:
          $ref: '#/components/schemas/Account'
        security:
          $ref: '#/components/schemas/Security'
          nullable: true
        category:
          type: object
          nullable: true
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
        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.

````