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

# 전세 vs 월세 vs 매수(저장 안 함)

> 권한 없이 어느 토큰으로나 부릅니다.



## OpenAPI

````yaml /openapi.json post /v1/simulate/rent-vs-buy
openapi: 3.1.0
info:
  title: OpenAPI definition
  version: v0
servers:
  - url: https://api.morrowly.app
security:
  - token: []
paths:
  /v1/simulate/rent-vs-buy:
    post:
      tags:
        - simulate
      summary: 전세 vs 월세 vs 매수(저장 안 함)
      description: 권한 없이 어느 토큰으로나 부릅니다.
      operationId: simulateRentVsBuy
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RentVsBuyRequest'
        required: true
      responses:
        '200':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiResponseRentVsBuy'
          description: OK
        '401':
          description: 토큰이 없거나 틀리거나 만료됨(본문 없음)
components:
  schemas:
    RentVsBuyRequest:
      properties:
        event:
          format: int32
          type: integer
        jeonse:
          format: int64
          type: integer
        jeonseLoan:
          format: int64
          type: integer
        monthlyRent:
          format: int64
          type: integer
        plan:
          $ref: '#/components/schemas/SimulateRequest'
        rentDeposit:
          format: int64
          type: integer
      required:
        - event
        - jeonse
        - jeonseLoan
        - monthlyRent
        - plan
        - rentDeposit
      type: object
    ApiResponseRentVsBuy:
      properties:
        data:
          oneOf:
            - $ref: '#/components/schemas/RentVsBuy'
            - type: 'null'
        error:
          oneOf:
            - $ref: '#/components/schemas/ErrorMessage'
            - type: 'null'
        result:
          $ref: '#/components/schemas/ResultType'
      required:
        - data
        - error
        - result
      type: object
    SimulateRequest:
      properties:
        assets:
          items:
            $ref: '#/components/schemas/Asset'
          type: array
        assumptions:
          $ref: '#/components/schemas/Assumptions'
        birthMonth:
          type: string
        cash:
          format: int64
          type: integer
        cashFlows:
          items:
            $ref: '#/components/schemas/CashFlow'
          type: array
        dependents:
          items:
            $ref: '#/components/schemas/Dependent'
          type: array
        events:
          items:
            $ref: '#/components/schemas/EventRequest'
          type: array
        liabilities:
          items:
            $ref: '#/components/schemas/Liability'
          type: array
        months:
          format: int32
          type: integer
        startMonth:
          type: string
      required:
        - assets
        - assumptions
        - birthMonth
        - cash
        - cashFlows
        - dependents
        - events
        - liabilities
        - months
        - startMonth
      type: object
    RentVsBuy:
      properties:
        buy:
          $ref: '#/components/schemas/Tenure'
        jeonse:
          $ref: '#/components/schemas/Tenure'
        rent:
          $ref: '#/components/schemas/Tenure'
      required:
        - buy
        - jeonse
        - rent
      type: object
    ErrorMessage:
      properties:
        code:
          type: string
        data: {}
        message:
          type: string
      required:
        - code
        - data
        - message
      type: object
    ResultType:
      enum:
        - SUCCESS
        - ERROR
      type: string
    Asset:
      properties:
        acquiredAt:
          type:
            - string
            - 'null'
        acquisitionPrice:
          format: int64
          type:
            - integer
            - 'null'
        annualRate:
          format: double
          type:
            - number
            - 'null'
        dividendYield:
          format: double
          type:
            - number
            - 'null'
        id:
          type: string
        investmentTax:
          $ref: '#/components/schemas/InvestmentTax'
        monthlyContribution:
          format: int64
          type:
            - integer
            - 'null'
        name:
          type: string
        owner:
          $ref: '#/components/schemas/Owner'
        payoutStartAge:
          format: int32
          type:
            - integer
            - 'null'
        payoutYears:
          format: int32
          type:
            - integer
            - 'null'
        region:
          type:
            - string
            - 'null'
        serviceYears:
          format: int32
          type:
            - integer
            - 'null'
        type:
          $ref: '#/components/schemas/AssetType'
        value:
          format: int64
          type: integer
      required:
        - acquiredAt
        - acquisitionPrice
        - annualRate
        - dividendYield
        - id
        - investmentTax
        - monthlyContribution
        - name
        - owner
        - payoutStartAge
        - payoutYears
        - region
        - serviceYears
        - type
        - value
      type: object
    Assumptions:
      properties:
        capLoans:
          type: boolean
        cashFloor:
          format: int64
          type: integer
        cashReturn:
          format: double
          type: number
        childDependent:
          type: boolean
        contributions:
          items:
            $ref: '#/components/schemas/Contribution'
          type: array
        dividendYield:
          format: double
          type: number
        harvestGains:
          type: boolean
        incomeGrowth:
          format: double
          type: number
        inflation:
          format: double
          type: number
        investmentReturn:
          format: double
          type: number
        prepayDebt:
          type: boolean
        realEstateGrowth:
          format: double
          type: number
        safeWithdrawalRate:
          format: double
          type: number
        surplusTargetAssetId:
          type:
            - string
            - 'null'
        withdrawalOrder:
          $ref: '#/components/schemas/WithdrawalOrder'
      required:
        - capLoans
        - cashFloor
        - cashReturn
        - childDependent
        - contributions
        - dividendYield
        - harvestGains
        - incomeGrowth
        - inflation
        - investmentReturn
        - prepayDebt
        - realEstateGrowth
        - safeWithdrawalRate
        - surplusTargetAssetId
        - withdrawalOrder
      type: object
    CashFlow:
      properties:
        annualGrowth:
          format: double
          type:
            - number
            - 'null'
        end:
          type:
            - string
            - 'null'
        expenseKind:
          oneOf:
            - $ref: '#/components/schemas/ExpenseKind'
            - type: 'null'
        expenseRate:
          format: double
          type:
            - number
            - 'null'
        id:
          type: string
        incomeKind:
          $ref: '#/components/schemas/IncomeKind'
        monthlyAmount:
          format: int64
          type: integer
        name:
          type: string
        owner:
          $ref: '#/components/schemas/Owner'
        start:
          type: string
        type:
          $ref: '#/components/schemas/FlowType'
      required:
        - annualGrowth
        - end
        - expenseKind
        - expenseRate
        - id
        - incomeKind
        - monthlyAmount
        - name
        - owner
        - start
        - type
      type: object
    Dependent:
      properties:
        birthMonth:
          type:
            - string
            - 'null'
        id:
          type: string
        kind:
          $ref: '#/components/schemas/DependentKind'
        name:
          type: string
      required:
        - birthMonth
        - id
        - kind
        - name
      type: object
    EventRequest:
      properties:
        amount:
          format: int64
          type:
            - integer
            - 'null'
        asset:
          oneOf:
            - $ref: '#/components/schemas/Asset'
            - type: 'null'
        assetId:
          type:
            - string
            - 'null'
        at:
          type: string
        cashFlowId:
          type:
            - string
            - 'null'
        cost:
          format: int64
          type:
            - integer
            - 'null'
        firstHome:
          type:
            - boolean
            - 'null'
        liabilityId:
          type:
            - string
            - 'null'
        loan:
          oneOf:
            - $ref: '#/components/schemas/Liability'
            - type: 'null'
        marriageOrBirth:
          type:
            - boolean
            - 'null'
        monthlyAmount:
          format: int64
          type:
            - integer
            - 'null'
        name:
          type:
            - string
            - 'null'
        payOffLiabilityId:
          type:
            - string
            - 'null'
        policyLoan:
          oneOf:
            - $ref: '#/components/schemas/PolicyLoan'
            - type: 'null'
        rate:
          format: double
          type:
            - number
            - 'null'
        recipient:
          type:
            - string
            - 'null'
        relation:
          oneOf:
            - $ref: '#/components/schemas/GiftRelation'
            - type: 'null'
        serviceYears:
          format: int32
          type:
            - integer
            - 'null'
        toAssetId:
          type:
            - string
            - 'null'
        type:
          type: string
        who:
          oneOf:
            - $ref: '#/components/schemas/Owner'
            - type: 'null'
      required:
        - amount
        - asset
        - assetId
        - at
        - cashFlowId
        - cost
        - firstHome
        - liabilityId
        - loan
        - marriageOrBirth
        - monthlyAmount
        - name
        - payOffLiabilityId
        - policyLoan
        - rate
        - recipient
        - relation
        - serviceYears
        - toAssetId
        - type
        - who
      type: object
    Liability:
      properties:
        annualRate:
          format: double
          type: number
        id:
          type: string
        interestDeduction:
          type: boolean
        name:
          type: string
        owner:
          $ref: '#/components/schemas/Owner'
        principal:
          format: int64
          type: integer
        remainingMonths:
          format: int32
          type: integer
        repayment:
          $ref: '#/components/schemas/Repayment'
      required:
        - annualRate
        - id
        - interestDeduction
        - name
        - owner
        - principal
        - remainingMonths
        - repayment
      type: object
    Tenure:
      properties:
        months:
          items:
            $ref: '#/components/schemas/TenureMonth'
          type: array
        summary:
          $ref: '#/components/schemas/Summary'
      required:
        - months
        - summary
      type: object
    InvestmentTax:
      enum:
        - DOMESTIC_STOCK
        - FOREIGN_STOCK
        - INTEREST
        - TAX_FREE
        - OTHER_ETF
        - HIGH_DIVIDEND
        - ISA
      type: string
    Owner:
      enum:
        - SELF
        - SPOUSE
        - JOINT
      type: string
    AssetType:
      enum:
        - INVESTMENT
        - REAL_ESTATE
        - VEHICLE
        - PENSION_ACCOUNT
        - DEPOSIT
        - RETIREMENT_PENSION
      type: string
    Contribution:
      properties:
        assetId:
          type: string
        monthlyAmount:
          format: int64
          type: integer
        until:
          type:
            - string
            - 'null'
        untilRetirement:
          type: boolean
      required:
        - assetId
        - monthlyAmount
        - until
        - untilRetirement
      type: object
    WithdrawalOrder:
      enum:
        - PROPORTIONAL
        - TAXABLE_FIRST
        - TAX_FREE_FIRST
      type: string
    ExpenseKind:
      enum:
        - RENT
        - DONATION
      type: string
    IncomeKind:
      enum:
        - NET
        - SALARY
        - PUBLIC_PENSION
        - BUSINESS
      type: string
    FlowType:
      enum:
        - INCOME
        - EXPENSE
      type: string
    DependentKind:
      enum:
        - SPOUSE
        - CHILD
        - PARENT
      type: string
    PolicyLoan:
      enum:
        - DIDIMDOL
        - NEWBORN
        - BOGEUMJARI
      type: string
    GiftRelation:
      enum:
        - SPOUSE
        - ADULT_CHILD
        - MINOR_CHILD
      type: string
    Repayment:
      enum:
        - ANNUITY
        - EQUAL_PRINCIPAL
        - BULLET
        - DEPOSIT
      type: string
    TenureMonth:
      properties:
        age:
          format: int32
          type: integer
        cash:
          format: int64
          type: integer
        month:
          type: string
        netWorth:
          format: int64
          type: integer
        shortfall:
          type: boolean
      required:
        - age
        - cash
        - month
        - netWorth
        - shortfall
      type: object
    Summary:
      properties:
        estate:
          $ref: '#/components/schemas/EstateScenario'
        fiAge:
          format: int32
          type:
            - integer
            - 'null'
        finalNetWorth:
          format: int64
          type: integer
        firstShortfallMonth:
          type:
            - string
            - 'null'
        liquidByAge:
          additionalProperties:
            format: int64
            type: integer
          type: object
        minCash:
          format: int64
          type: integer
        netWorthByAge:
          additionalProperties:
            format: int64
            type: integer
          type: object
        retirementNetWorth:
          format: int64
          type:
            - integer
            - 'null'
        spendingAfter:
          format: int64
          type:
            - integer
            - 'null'
        spendingBefore:
          format: int64
          type:
            - integer
            - 'null'
      required:
        - estate
        - fiAge
        - finalNetWorth
        - firstShortfallMonth
        - liquidByAge
        - minCash
        - netWorthByAge
        - retirementNetWorth
        - spendingAfter
        - spendingBefore
      type: object
    EstateScenario:
      properties:
        age:
          format: int32
          type: integer
        charity:
          format: int64
          type: integer
        charityShare:
          format: double
          type: number
        first:
          $ref: '#/components/schemas/EstateSummary'
        legalSpouseShare:
          format: double
          type: number
        month:
          type: string
        netWorth:
          format: int64
          type: integer
        ownership:
          format: double
          type: number
        second:
          oneOf:
            - $ref: '#/components/schemas/EstateSummary'
            - type: 'null'
        spouseShare:
          format: double
          type: number
        tax:
          format: int64
          type: integer
        toHeirs:
          format: int64
          type: integer
      required:
        - age
        - charity
        - charityShare
        - first
        - legalSpouseShare
        - month
        - netWorth
        - ownership
        - second
        - spouseShare
        - tax
        - toHeirs
      type: object
    EstateSummary:
      properties:
        charity:
          format: int64
          type: integer
        financial:
          format: int64
          type: integer
        financialDeduction:
          format: int64
          type: integer
        giftsAdded:
          format: int64
          type: integer
        gross:
          format: int64
          type: integer
        personalDeduction:
          format: int64
          type: integer
        spouseDeduction:
          format: int64
          type: integer
        tax:
          format: int64
          type: integer
        taxable:
          format: int64
          type: integer
      required:
        - charity
        - financial
        - financialDeduction
        - giftsAdded
        - gross
        - personalDeduction
        - spouseDeduction
        - tax
        - taxable
      type: object
  securitySchemes:
    token:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.