openapi: 3.0.3
info:
  title: SSCMFI Calculation API - General Purpose Calculations
  description: Core financial calculation API for single security fixed income analytics and public trial endpoints.
  version: 1.4.2
  contact:
    name: API Support
servers:
  - url: https://api.sscmfi.com
    description: Production Server

security:
  - ApiKeyAuth: []
paths:
  /api/sscmfiPublicAPI:
    post:
      summary: Public Fixed Income Calculation API
      description: |
        Public endpoint for bond calculations. No API key required. Rate limited.
        This is a general purpose API that works with all payment and security types.
      operationId: calculatePublic
      tags:
        - Public - No API Key Needed - All Payment Types
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CalculationRequest'
            example:
              metadata:
                calculationID: ABC987
              securityDefinition:
                securityID: Testsec77
                paymentType: Periodic
                securityType: CD
                maturityDate: 3/31/2031
                couponRate: 3.75
                redemptionValue: 100
                dayCountBasis: SSCM30/360
                eomRule: Adjust
                periodsPerYear: Monthly
              tradeDefinition:
                settlementDate: 7/23/2020
                givenType: yield
                givenValue: 3.55
              calculationSelection:
                calcsToReturn:
                  calcPY: 'Yes'
                  calcCouponPeriod: 'Yes'
                calculationsFor: Maturity only
              settings:
                dateScheme:
                  dateTwoOrFourYear: FOUR
                  dateFormat: MDY
                  dateCutoffYear: 75
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          description: Bad Request - Missing required parameters or invalid JSON
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable Entity - Calculation or validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too Many Requests - Public endpoint rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemErrorResponse'
        '500':
          description: Internal Server Error - Calculation engine fault
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/sscmfiAPICalculate:
    post:
      summary: Calculate fixed income analytics
      description: General purpose calculation endpoint supporting all payment and security types.
      operationId: calculateBondAnalytics
      tags:
        - Calculations - All Payment Types
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CalculationRequest'
            example:
              metadata:
                calculationID: ABC987
              securityDefinition:
                securityID: TestsecGeneral
                paymentType: Periodic
                securityType: Corporate
                maturityDate: 3/31/2031
                couponRate: 3.75
                redemptionValue: 100
                dayCountBasis: SSCM30/360
                eomRule: Adjust
                periodsPerYear: Semiannual
              tradeDefinition:
                settlementDate: 11/2/2024
                givenType: Price
                givenValue: 101.5
              calculationSelection:
                calcsToReturn:
                  calcPY: 'Yes'
                  calcPYAnalytics: 'Yes'
                calculationsFor: worst and maturity
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API key for authentication
  schemas:
    CalculationRequest:
      title: CalculationRequest
      type: object
      description: Core calculation request payload for fixed income security calculations.
      required:
        - securityDefinition
        - tradeDefinition
      properties:
        metadata:
          type: object
          properties:
            calculationID:
              type: string
        securityDefinition:
          type: object
          description: General security definition parameters supporting all payment types and security structures.
          required:
            - securityType
            - maturityDate
            - redemptionValue
            - dayCountBasis
          properties:
            securityID:
              type: string
              description: Internal identifier or name
            securityType:
              type: string
              enum:
                - Treasury
                - Agency
                - Corporate
                - Municipal
                - CD
                - Treasury-Primary
              description: The asset class or issuer type
            issueDate:
              type: string
              description: |
                Original date of issue. Date the bond starts accruing interest.  Sometimes know as the Dated Date  
                Note: If issueDate is provided `firstCouponDate` must also be provided
            firstCouponDate:
              type: string
              description: |
                The first date on which interest is paid to investors  
                Notes:
                - If firstCouponRate is provided `issueDate` must also be provided.
                - firstCouponDate, if provided, must be on the same coupon cycle as the `maturityDate` or `lastCouponDate` is required
            lastCouponDate:
              type: string
              description: |
                The final coupon date before maturity.  Also known as the penultimate coupon date.  
                Note: If the `firstCouponDate` id provided and it is not on the same coupon cycle as the `maturityDate` then the lastCouponDate is required.
            maturityDate:
              type: string
              description: The date upon which the redemptionValue is returned to the security holder. The date the security matures.
            couponRate:
              type: number
              minimum: 0
              description: Annual interest rate as a percent
            redemptionValue:
              type: number
              minimum: 0
              description: Redemption price at maturity (usually 100)
            dayCountBasis:
              type: string
              enum:
                - Actual/Actual
                - Actual/360
                - Actual/365
                - SSCM30/360
                - MSRB30/360
                - NASD30/360
                - FINRA30/360
              description: |
                The method used to count days in a period, days accrued, days remaining, etc. The dayCountBasis are as follows:
                - Actual/Actual - U.S. Actual days for counting and in period/year
                - Actual/360 - Actual days in coupon period / 360 days per year
                - Actual/365 - Actual days in coupon period / 365 days per year
                - SSCM30/360 - 30/360 rules from Standard Securities Calculation Methods book. This is the 30/360 commonly used in the U.S.
                - MSRB30/360 - Strict implementation of MSRB Rule G33. No adjustments for February 28 or 29.
                - NASD30/360 - Strict implementation of NASD rule. No adjustments for February 28 or 29. Superseded by FINRA30/360
                - FINRA30/360 - Strict implementation of FINRA rule. No adjustments for February 28 or 29.
                Note: When securityType is CD, Actual/Actual is NOT supported. Supported dayCountBasis for CD are Actual/360 and Actual/365.
            eomRule:
              type: string
              enum:
                - Adjust
                - Do not adjust
                - Always 28
                - Always 29
                - Always 30
              description: End-of-Month adjustment rule
            periodsPerYear:
              type: string
              enum:
                - Annual
                - Semiannual
                - Quarterly
                - Monthly
              description: Frequency of interest payments
            callRedemptions:
              type: object
              description: Provisions for early redemption or call scenarios prior to maturity
              properties:
                redemptionScheduleType:
                  type: string
                  enum:
                    - Discrete no notification
                    - Discrete with notification
                    - Continuous with notification
                  description: Specify the call schedule structure (e.g., specific dates vs. a continuously callable)
                redemptionList:
                  type: array
                  description: A sorted list of specific dates and prices at which the security can be called
                  items:
                    type: object
                    properties:
                      date:
                        type: string
                        description: The specific call date
                      value:
                        type: number
                        minimum: 0
                        description: The redemption price per $100 on this date
                notifyStart:
                  type: string
                  enum:
                    - Trade date
                    - Trade date plus one
                    - Settlement date
                    - Settlement date plus one
                  description: The starting point for calculating the notification window
                notifyCalendarBusiness:
                  type: string
                  enum:
                    - Calendar days
                    - Calendar days adjusted
                    - Business days
                  description: The calendar logic used to count notification days
                notifyMinDays:
                  type: integer
                  minimum: 0
                  description: Minimum required notice period in days
                notifyMaxDays:
                  type: integer
                  minimum: 0
                  description: Maximum allowed notice period in days
            stepDate:
              type: string
              description: The date on which the coupon rate changes from initial to step rate
            initialCouponRate:
              type: number
              minimum: 0
              description: Annual interest rate as a percent prior to the step date
            stepCouponRate:
              type: number
              minimum: 0
              description: Annual interest rate as a percent after the step date
            couponRateList:
              type: array
              description: |
                Schedule of coupon rates and dates for Multistep securities  
                Note: The date in the couponRateList is the date the bond starts accruing interest at the new rate. It is not the date of the first coupon payment at the new rate.
              items:
                type: object
                properties:
                  date:
                    type: string
                    description: The date on which the new rate takes effect
                  value:
                    type: number
                    description: The new coupon rate as a percent
            PIKCouponRate:
              type: number
              minimum: 0
              description: Annual PIK interest rate as a percent
            PIKCashCouponRate:
              type: number
              minimum: 0
              description: Annual cash-pay interest rate as a percent
            paymentType:
              type: string
              enum:
                - Discount
                - IAM
                - Periodic
                - Stepped
                - Multistep
                - PIK
                - Part-PIK
                - Inflation
              description: Payment structure type of the security
            useRefCPIOrCPIMIssue:
              type: string
              default: RefCPI
              enum:
                - RefCPI
                - CPIM
              description: Indicates whether direct reference CPI (RefCPI) or monthly CPI values (CPIM) are used for the issue date.
            CPI2MonthsBeforeIssue:
              type: number
              description: The Consumer Price Index (CPI) value 2 months prior to the issue date.
            CPI3MonthsBeforeIssue:
              type: number
              description: The Consumer Price Index (CPI) value 3 months prior to the issue date.
            refCPIIssue:
              type: number
              description: The reference Consumer Price Index (CPI) value directly specified for the issue date.
        tradeDefinition:
          type: object
          description: Trade definition parameters detailing trade date, settlement date, and given value/type.
          required:
            - settlementDate
            - givenType
            - givenValue
          properties:
            tradeDate:
              type: string
              description: |
                The date on which the trade was executed  
                Note: This date is required if a Call Schedule is provided with notication based on tradeDate.
            settlementDate:
              type: string
              description: Settlement date. The date to which calculations are performed
            givenType:
              type: string
              enum:
                - Price
                - Yield
                - Discount rate
              description: Specify whether givenValue represents clean Price, Yield, or discountRate
            givenValue:
              type: number
              description: The value for `givenType` (e.g., Price of 98.75 or Yield of 4.25)
            discountRate:
              type: number
              minimum: 0
              description: Annual discount rate for short-term discount securities as a percent
            useRefCPIOrCPIMSettlement:
              type: string
              default: CPIM
              enum:
                - RefCPI
                - CPIM
              description: Indicates whether direct reference CPI (RefCPI) or monthly CPI values (CPIM) are used for the settlement date.
            CPI2MonthsBeforeSettlement:
              type: number
              description: The Consumer Price Index (CPI) value 2 months prior to the settlement date.
            CPI3MonthsBeforeSettlement:
              type: number
              description: The Consumer Price Index (CPI) value 3 months prior to the settlement date.
            refCPISettlement:
              type: number
              description: The reference Consumer Price Index (CPI) value directly specified for the settlement date.
        calculationSelection:
          type: object
          description: Specify which financial metrics and redemption scenarios to calculate.
          properties:
            calculationsFor:
              type: string
              enum:
                - Maturity only
                - Worst only
                - Worst and maturity
                - All redemptions
              default: Worst and maturity
              description: Select which redemption scenarios to include in the output
            calcsToReturn:
              type: object
              description: Flags to enable specific groups of calculation results.
              properties:
                calcPY:
                  type: string
                  enum:
                    - 'Yes'
                    - 'No'
                  default: 'No'
                  description: |
                    If Yes return the following values as applicable to the given paymentType and securityType:
                    - Price (full precision)
                    - Yield
                    - Accrued Interest
                    - Discount Rate
                    - Trading Price (rounded or truncated based on inductry conventions)
                calcPYAnalytics:
                  type: string
                  enum:
                    - 'Yes'
                    - 'No'
                  default: 'No'
                  description: |
                    If Yes return the following values as applicable to the given paymentType and securityType:
                    - Approximate Duration
                    - Approximate Modified Duration
                    - Approximate Convexity
                    - Price Value of one basis point (PV1B)
                    - Yield Value of one thirtysecond (YV32)
                calcCFS:
                  type: string
                  enum:
                    - 'Yes'
                    - 'No'
                  description: |
                    If Yes return detailed cash flow schedule lists:
                    - Cash Flow dates
                    - Cash flows
                    - Interest Flows
                    - Principal Flows
                calcCFSAnalytics:
                  type: string
                  enum:
                    - 'Yes'
                    - 'No'
                  default: 'No'
                  description: |
                    If Yes return the following values calculated from cash flows:
                    - Periodic Yield (yield based on given periodsPerYear)
                    - Yield (semi-annual compounding)
                    - Yield (annual compounding)
                    - Macaulay Duration (in periods)
                    - Macaulay Duration (in years)
                    - Modified Duration
                    - Convexxity (in periods)
                    - Convexity (in years)
                    - Average Life (in periods)
                    - Average Life (in years)
                    - After Tax Yield
                    - Taxale Equivalent Yield
                    - Price Value of a Basis Point Change
                    - Total Interest Flows
                    - Total Principal Flows
                    - Total Interest Flows + Interest on Interest
                    - Total Principal Flows + Interest on Principal
                    - Total Interest on Interest
                    - Total Interest on Principal
                    - Total Future amount
                    - Total Returns
                    - Capital Gain or loss
                    - Total Dollar Return
                calcCouponPeriod:
                  type: string
                  enum:
                    - 'Yes'
                    - 'No'
                  default: 'No'
                  description: If Yes return previous and next coupon dates relative to settlement
        settings:
          type: object
          description: Global environment and calculation settings.
          properties:
            reinvestment:
              type: object
              description: Configuration for the reinvestment of periodic cash flows
              properties:
                type:
                  type: string
                  enum:
                    - Periodic yield
                    - Given rate
                  default: Periodic yield
                  description: Method for determining the reinvestment rate
                rate:
                  type: number
                  description: Explicit reinvestment rate as a percent (required if type is 'Given rate')
            holidayList:
              type: array
              description: Optional list of dates to be treated as holidays for business day calculations
              items:
                type: object
                properties:
                  date:
                    type: string
                    description: The holiday date
            dateScheme:
              type: object
              description: Rules for parsing and formatting date strings
              properties:
                dateFormat:
                  type: string
                  enum:
                    - YMD
                    - MDY
                    - DMY
                    - ymd
                    - mdy
                    - dmy
                  default: MDY
                  description: The sequence of year, month, and day components
                dateSeparator:
                  type: string
                  enum:
                    - /
                    - '-'
                  default: /
                  description: The character used to separate date components
                dateTwoOrFourYear:
                  type: string
                  enum:
                    - Two
                    - Four
                  default: Four
                  description: |
                    Specify if years are provided as two or four digits  
                    Note: All provided dates must be in the specified format.  All returned dates will be in this format.
                dateCutoffYear:
                  type: integer
                  default: 75
                  description: |
                    The threshold year for 2-digit year interpretation (e.g., 75 maps to 1975-2074)  
                    Note: Ths is only used when dateTwoOrFour is set to Two
            MSRBG33StrictFormula:
              type: string
              enum:
                - 'Yes'
                - 'No'
              default: 'Yes'
              description: Determines if the price/yield calculation for a Periodic Municipal security is performed with a strict implementation of the rule for price/yield calculation detailed in MSRB G33.
            MSRBG33StrictDayCount:
              type: string
              enum:
                - 'Yes'
                - 'No'
              default: 'No'
              description: Determines if the price/yield and accrued interest calculation for a Periodic Municipal security is performed with a strict implementation of the day counting rules detailed in MSRB G33. If this is set to Yes the provided dayCountBasis will be overridden with MSRB30/360.
    SuccessResponse:
      type: object
      required:
        - success
        - metadata
        - data
      properties:
        success:
          type: boolean
        metadata:
          type: object
          properties:
            calculationDate:
              type: string
            securityID:
              type: string
              description: Internal identifier or name of the security
        data:
          type: object
          properties:
            summary:
              type: object
              properties:
                calculationsToCount:
                  type: integer
            calculationTo:
              type: array
              description: List of calculation scenarios per redemption date
              items:
                type: object
                properties:
                  redemptionInfo:
                    type: object
                    description: Information about the redemption date for these calculations
                    properties:
                      redemptionType:
                        type: string
                        enum:
                          - Maturity
                          - Call
                        description: Type of redemption
                      redemptionDate:
                        type: string
                        description: The date of the redemption
                      redemptionValue:
                        type: number
                        description: The value of the redemption per 0
                      worstIndicator:
                        type: string
                        enum:
                          - Worst
                          - ''
                        description: Indicates if this redemption date is the worst case scenario
                  PY:
                    type: object
                    description: Price/Yield/Discount Rate results
                    properties:
                      price:
                        type: number
                        description: Clean price (without accrued interest)
                      yield:
                        type: number
                        description: Yield as a percent (e.g., 5.125 represents 5.125%)
                      discountRate:
                        type: number
                        description: Discount rate as a percent (only for discount securities)
                      ai:
                        type: number
                        description: Accrued interest per 0
                      tradingPrice:
                        type: number
                        description: Total price rounded or truncated per industry standard conventions
                      adjustedPrice:
                        type: number
                        description: Clean price adjusted by the inflation index ratio (price * indexRatio)
                      adjustedAi:
                        type: number
                        description: Accrued interest adjusted by the inflation index ratio (ai * indexRatio)
                      indexRatio:
                        type: number
                        description: Inflation index ratio calculated for the settlement date (refCPISettlement / refCPIIssue)
                  PYAnalytics:
                    type: object
                    description: Price/Yield analytics calculated by shifting the Price up and down
                    properties:
                      approxDuration:
                        type: number
                        description: Approximate duration
                      approxModDuration:
                        type: number
                        description: Approximate modified duration
                      approxConvexity:
                        type: number
                        description: Approximate convexity
                      pv1b:
                        type: number
                        description: Price value of one basis point
                      yv32:
                        type: number
                        description: Yield value of 1/32
                  cashFlows:
                    type: object
                    description: Scheduled cash flows for the security
                    properties:
                      cashFlowCount:
                        type: integer
                        description: Number of entries in the cash flow lists
                      cashFlowDates:
                        type: array
                        items:
                          type: string
                        description: List of dates corresponding to the cash flows
                      cashFlows:
                        type: array
                        items:
                          type: number
                        description: List of total cash flows per 0
                      interestFlows:
                        type: array
                        items:
                          type: number
                        description: List of interest flows per 0
                      principalFlows:
                        type: array
                        items:
                          type: number
                        description: List of principal flows per 0
                  couponPeriod:
                    type: object
                    description: Returns information about the coupon period in which the settlement date falls.
                    properties:
                      previousCouponDate:
                        type: string
                        description: Previous coupon date from the settlement date
                      nextCouponDate:
                        type: string
                        description: Next coupon date from the settlement date
                  cashFlowAnalytics:
                    type: object
                    description: Calculated values using cash flows and price
                    properties:
                      yieldPeriodic:
                        type: number
                        description: Yield based on the securities coupon periods per year
                      yieldSemiAnnual:
                        type: number
                        description: Yield based on semi-annual compounding
                      yieldAnnual:
                        type: number
                        description: Yield based on annual compounding
                      macDuration:
                        type: number
                        description: Macaulay duration based on the securities coupon periods per year
                      durationYears:
                        type: number
                        description: Duration based on annual compounding
                      modDuration:
                        type: number
                        description: Modified duration
                      convexityInPeriods:
                        type: number
                        description: Convexity based on the securities coupon periods per year
                      convexityInYears:
                        type: number
                        description: Convexity based on annual compounding
                      averageLifeInPeriods:
                        type: number
                        description: Average life based on the securities coupon periods per year
                      averageLifeInYears:
                        type: number
                        description: Average life based on one coupon period per year
                      afterTaxYield:
                        type: number
                        description: After tax yield (tax rates default to 37% for income tax, 20% for capital gains tax)
                      taxableEquivalentYield:
                        type: number
                        description: Taxable equivalent yield (tax rates default to 37% for income tax, 20% for capital gains tax)
                      pvBPC:
                        type: number
                        description: Price value of a basis point change
                      totalInterestFlows:
                        type: number
                        description: Total of the interest flows
                      totalPrincipalFlows:
                        type: number
                        description: Total of the principal flows
                      totalIFPlusIOI:
                        type: number
                        description: Total interest on interest flows (reinvestment at yield)
                      totalPFPlusIOP:
                        type: number
                        description: Total interest on principal flows (reinvestment at yield)
                      totalIOI:
                        type: number
                        description: Total interest on interest
                      totalIOP:
                        type: number
                        description: Total interest on principal
                      totalFutureAmount:
                        type: number
                        description: Total future amount
                      totalReturn:
                        type: number
                        description: Total return as a percent
                      capitalGainLoss:
                        type: number
                        description: Capital gain or loss
                      totalDollarReturn:
                        type: number
                        description: Total dollar return
    ErrorResponse:
      type: object
      required:
        - success
        - errorInfo
        - metadata
      properties:
        success:
          type: boolean
          example: false
        errorInfo:
          type: object
          description: |
            Error information object returned when calculation or validation errors occur. This error structure applies to ALL API endpoints.

            **Error Parameter Mappings (errorParm1/2/3):**

            The meaning of errorParm1/2/3 depends on the error code category:

            *For DATE errors (3000-5016):* errorParm values map to date field types:
            - `1` - Settlement Date
            - `2` - Maturity Date
            - `3` - Issue Date
            - `4` - First Coupon Date
            - `5` - Last Coupon Date
            - `6` - Trade Date
            - `7` - Redemption Date (for call schedules)
            - `8` - Holiday Date (for holiday lists)
            - `9` - Coupon Rate Start Date (for coupon rate lists)
            - `10` - Step Date

            *For PARAMETER errors (6001-6008):* errorParm values map to parameter field names:
            - `1` - securityType
            - `2` - paymentType
            - `3` - givenType
            - `4` - givenValue
            - `5` - couponRate
            - `6` - redemptionValue
            - `7` - periodsPerYear
            - `8` - dayCountBasis
            - `9` - eomRule
            - `10` - notifyCalendarBusiness
            - `11` - notifyStart
            - `12` - notifyMinDays
            - `13` - notifyMaxDays
            - `14` - redemptionScheduleType
            - `15` - calculationsFor
            - `16` - earlyRedemptions
            - `17` - couponRateList
            - `18` - PIKCashCouponRate
            - `19` - PIKCouponRate
            - `20` - initialCouponRate
            - `21` - stepCouponRate
            - `22` - dateFormat
            - `23` - dateSeparator
            - `24` - dateTwoOrFourYear
            - `25` - dateCutoffYear
            - `26` - calcsToReturn
            - `27` - useRefCPIOrCPIMIssue
            - `28` - useRefCPIOrCPIMSettlement
            - `29` - CPI2MonthsBeforeIssue
            - `30` - CPI3MonthsBeforeIssue
            - `31` - refCPIIssue
            - `32` - CPI2MonthsBeforeSettlement
            - `33` - CPI3MonthsBeforeSettlement
            - `34` - refCPISettlement

            **Error Position (errorPos1/2/3):** Contains the 1-based position in array/list where error occurred (e.g., 3rd item in redemptionList)

            **Error Code Categories:**

            *Date Comparison Errors (3000-3006):*
            - `3000` - errorParm1 date is greater than errorParm2 date
            - `3001` - errorParm1 date is less than errorParm2 date
            - `3002` - errorParm1 date is equal to errorParm2 date
            - `3003` - errorParm1 date is greater than or equal to errorParm2 date (must be less than)
            - `3004` - errorParm1 date is less than or equal to errorParm2 date
            - `3005` - At least one errorParm1 date must be less than or equal to errorParm2 date
            - `3006` - errorParm1 date cannot be before January 1st, 1953 unless errorParm2 date is provided
            - `3007` - errorParm1 is effectively on the redemption date with the selected dayCountBasis

            *Date Cycle Errors (4000-4002):*
            - `4000` - errorParm1 date must be on the same periodic cycle as errorParm2 date unless errorParm3 date is provided
            - `4001` - errorParm1 date must be on the same periodic cycle as errorParm2 when they are provided
            - `4002` - errorParm1 date must be on the same periodic cycle as errorParm2 date or errorParm3 date when provided

            *Date Validation Errors (5000-5016):*
            - `5000` - Missing required date (errorParm1 represents the specific date)
            - `5001` - Invalid date month (errorParm1 represents the specific date)
            - `5002` - Invalid date day (errorParm1 represents the specific date)
            - `5003` - Invalid date year - must be 1900 to 2200 (errorParm1 represents the specific date)
            - `5004` - errorParm1 date is required when errorParm2 date is provided
            - `5010` - Date string malformed
            - `5011` - Date string separator invalid (must be / or -)
            - `5012` - Invalid dateFormat specified (must be YMD, MDY, DMY, ymd, mdy, or dmy)
            - `5013` - Invalid twoOrFourYear specified (must be 4 digit year or 2 digit year provided)
            - `5014` - twoOrFourYear invalid (4 digit year specified, 2 digit year provided)
            - `5015` - Invalid yearCutOff specified (must be less than 100 and greater than or equal to 0)
            - `5016` - twoOrFourYear invalid (2 digit year specified, 4 digit year provided)

            *Holiday List Errors (5400-5403):*
            - `5400` - holidayCount exceeds max (cannot be more than 3000 holidays in the list)
            - `5401` - Invalid holiday (must be between January 1, 1800 and December 1, 2300)
            - `5402` - Invalid holidayList (must be in ascending order)
            - `5403` - Invalid holiday (holidays can only be weekdays)

            *Redemption List Errors (5500-5550):*
            - `5500` - Redemptions determined for calculations exceed maximum number allowed (must be less than 100)
            - `5501` - Invalid redemption date
            - `5502` - Invalid redemption date (must be before maturity)
            - `5503` - Invalid redemptionList (must be in date ascending order if notification is provided)
            - `5550` - Invalid redemptionList value (must be greater than 0)
            - `5551` - Missing redemptionList value

            *Coupon Rate List Errors (5600-5603):*
            - `5600` - Invalid couponRateList value (must be greater than or equal to 0)
            - `5601` - Missing required couponRateList value
            - `5603` - Invalid couponRateList (must be in date ascending order)

            *Parameter Errors (6001-6009):*
            - `6001` - Required value for x was not provided
            - `6002` - Provided value for x is invalid
            - `6003` - Provided value for x is invalid for the provided paymentType and securityType
            - `6004` - Provided value for x must be numeric
            - `6005` - Provided value for x must be numeric and greater than zero
            - `6006` - Provided value for x must be numeric and greater than or equal to zero
            - `6007` - Provided value for x is not supported for the provided paymentType and securityType
            - `6008` - At least one of x must be selected
            - `6009` - Provided value for x must be numeric and greater than 0.000001
            - `6010` - Provided value for x is invalid with the specified coupon dates

            *Calculated Value Errors (8900-8903):*
            - `8900` - The calculated value for price is less than or equal to zero. Cash flow analytics cannot be calculated
            - `8901` - The calculated value for price is less than or equal to zero. Risk measures cannot be calculated
            - `8902` - Cannot calculate tax equivalent yield with the data provided, The given or calculated price is out of range.
            - `8903` - Cannot calculate after tax yield with the data provided, The given or calculated price is out of range.

            *System Errors (9990-10015):*
            - `9990` - Internal formula selection error (logged)
            - `9996` - The calculated dirty price used in analytics is less than or equal to zero (logged)
            - `9997` - Cannot calculate equivalent yield with the data provided (logged)
            - `9998` - Cannot calculate yield with the data provided (logged)
            - `9999` - Unexpected error (logged)
            - `10001` - Method not allowed - use POST
            - `10002` - Internal server error (logged)
            - `10005` - System under maintenance
            - `10010` - Unauthorized - Invalid or Missing API Key
            - `10011` - Forbidden - Missing Required Permission/Scope
            - `10012` - Too Many Requests - Global Rate Limit Exceeded
            - `10013` - Too Many Requests - Status Endpoint Specific Limit
            - `10014` - Bad Request - Invalid JSON Payload
            - `10015` - Bad Request - Batch Size Exceeded
          required:
            - error
            - errorNumber
            - errorMessage
          properties:
            error:
              type: boolean
              example: true
            errorNumber:
              type: integer
              example: 6002
            errorMessage:
              type: string
              example: Provided value for paymentType is invalid
            errorParm1:
              type: integer
              description: Numeric code mapping to the field name or date field type associated with the error
            errorParm2:
              type: integer
              description: Numeric code mapping to the second field name or date field type associated with the error
            errorParm3:
              type: integer
              description: Numeric code mapping to the third field name or date field type associated with the error
            errorPos1:
              type: integer
              description: 1-based position in array/list where error occurred
            errorPos2:
              type: integer
              description: 1-based secondary position in array/list where error occurred
            errorPos3:
              type: integer
              description: 1-based tertiary position in array/list where error occurred
        metadata:
          type: object
          required:
            - calculationDate
            - version
          description: Returned meta-information for the requested calculation
          properties:
            calculationDate:
              type: string
              format: date-time
              description: The date and time the calculation was performed
              example: '2026-01-26 22:13:31'
            version:
              type: object
              required:
                - calculationEngine
                - dataInputFormat
                - resultsFormat
              description: Version information of the system and schemas used for the calculation results
              properties:
                calculationEngine:
                  type: string
                  description: The version of the calculation engine that processed the request
                  example: 1.3.1
                dataInputFormat:
                  type: string
                  description: The version of the input JSON schema used
                  example: 1.3.1
                resultsFormat:
                  type: string
                  description: The version of the output JSON schema returned
                  example: 1.3.1
            securityID:
              type: string
              description: Security identifier returned if provided in the request
              example: Testsec117
            calculationID:
              type: string
              description: User-defined calculation identifier returned if provided in the request
              example: ABC123
    SystemErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          description: Return value which indicates if the request completed successfully.
          type: boolean
          example: false
        error:
          type: string
          description: |
            Return value which indicates why the request did not complete. Common system error messages:
            - `Bad Request - Invalid JSON Payload` (HTTP 400)
            - `Unauthorized - Invalid or Missing API Key` (HTTP 401)
            - `Forbidden - Missing Required Permission/Scope` (HTTP 403)
            - `Too Many Requests - Rate Limit Exceeded` (HTTP 429)
            - `Internal Server Error` (HTTP 500)
            - `Service Unavailable - Maintenance Mode` (HTTP 503)
          example: Too Many Requests - Global Rate Limit Exceeded