Canadian mortgage calculators: renewal offers, extra payments, break-or-stay, debt consolidation.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Use this when a user is partway through a Canadian mortgage term and asks whether to break the mortgage early (to refinance the same debt, switch lender or take a lower rate) or stay until the term ends. Compares keeping it with a user-supplied replacement offer, counting the lender-quoted penalty, such as an interest rate differential (IRD) or three months' interest. Shows cashflow payback separately from borrowing-cost crossover. Do not use to calculate or estimate a penalty: the lender must quote it, and an unknown penalty prevents an unconditional ranking. No cash-out or rate search.
The penalty amount the lender quoted, in CAD. Never estimate it; use {state:"unknown"} if there is no quote.
cash if paid out of pocket; financed if added to the new mortgage.
Mortgage balance now, in CAD, as digits only: no $ sign, no commas, no spaces, for example "412000" or "412000.50". Before any costs are added.
Months left in the current term, as a count of months: 2 years left is 24.
Comparison horizon in months, 1 to 600. If omitted: the shorter of the remaining current term and the replacement term.
Payout date the lender's penalty quote is for, YYYY-MM-DD.
Use this when a user is partway through a Canadian mortgage term and asks whether to break the mortgage early (to refinance the same debt, switch lender or take a lower rate) or stay until the term ends. Compares keeping it with a user-supplied replacement offer, counting the lender-quoted penalty, such as an interest rate differential (IRD) or three months' interest. Shows cashflow payback separately from borrowing-cost crossover. Do not use to calculate or estimate a penalty: the lender must quote it, and an unknown penalty prevents an unconditional ranking. No cash-out or rate search.
| Argument | Type | Description |
|---|---|---|
| penalty* | any | The penalty amount the lender quoted, in CAD. Never estimate it; use {state:"unknown"} if there is no quote. |
| horizonMonths | integer | Comparison horizon in months, 1 to 600. If omitted: the shorter of the remaining current term and the replacement term. |
| penaltyFunding* | string | cash if paid out of pocket; financed if added to the new mortgage. |
| scheduleWindow | object | |
| currentMortgage* | object | |
| penaltyQuotedAt | string | Payout date the lender's penalty quote is for, YYYY-MM-DD. |
| startingBalance* | string | Mortgage balance now, in CAD, as digits only: no $ sign, no commas, no spaces, for example "412000" or "412000.50". Before any costs are added. |
| replacementOffer* | object | |
| penaltySensitivity | object | |
| remainingTermMonths* | integer | Months left in the current term, as a count of months: 2 years left is 24. |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"startingBalance",
"currentMortgage",
"replacementOffer",
"remainingTermMonths",
"penalty",
"penaltyFunding"
],
"properties": {
"penalty": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "The penalty amount the lender quoted, in CAD. Never estimate it; use {state:\"unknown\"} if there is no quote."
},
"horizonMonths": {
"type": "integer",
"maximum": 600,
"minimum": 1,
"description": "Comparison horizon in months, 1 to 600. If omitted: the shorter of the remaining current term and the replacement term."
},
"penaltyFunding": {
"enum": [
"cash",
"financed"
],
"type": "string",
"description": "cash if paid out of pocket; financed if added to the new mortgage."
},
"scheduleWindow": {
"type": "object",
"required": [
"startPeriod",
"count"
],
"properties": {
"count": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"startPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"currentMortgage": {
"type": "object",
"required": [
"label",
"annualRatePercent",
"convention",
"termMonths",
"amortizationMonths",
"frequency",
"paymentMode",
"costs",
"credits"
],
"properties": {
"costs": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"amount",
"funding",
"atPeriod"
],
"properties": {
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"amount": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"funding": {
"enum": [
"cash",
"financed",
"lender_paid"
],
"type": "string",
"description": "cash: paid out of pocket. financed: added to the mortgage balance, at the start only (atPeriod 0). lender_paid: paid by the lender and not counted."
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
}
},
"additionalProperties": false
},
"maxItems": 30,
"description": "Fees for this offer (legal, discharge, appraisal). A cost the user cannot confirm must be listed with amount {state:\"unknown\"}; leaving it out means there is no such cost."
},
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"credits": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"amount",
"atPeriod",
"destination",
"clawback"
],
"properties": {
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"amount": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
},
"clawback": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "object",
"required": [
"amount",
"atPeriod"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "object",
"required": [
"amount",
"atPeriod"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Cashback repayment condition from the lender's agreement. amount: how much of the cashback must be repaid if the mortgage ends early. atPeriod: the payment number that condition refers to (with monthly payments, the month). A known clawback is reported as a warning and is not counted as a cost: the figures assume the mortgage is kept. {state:\"unknown\"} adds a warning to ask the lender and changes no figure. No clawback: {state:\"known\",value:{amount:\"0\",atPeriod:0},origin:\"user\"}."
},
"destination": {
"enum": [
"cash",
"principal"
],
"type": "string",
"description": "cash: paid to the borrower. principal: applied to reduce the balance."
}
},
"additionalProperties": false
},
"maxItems": 20,
"description": "Cashback or other credits, with any clawback."
},
"ratePath": {
"type": "array",
"items": {
"type": "object",
"required": [
"atPeriod",
"annualRatePercent"
],
"properties": {
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
},
"annualRatePercent": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$",
"description": "Annual interest rate as a percent number in a string, without the % sign: 19.99% is \"19.99\", never \"0.1999\"."
}
},
"additionalProperties": false
},
"maxItems": 20,
"description": "Rate changes during the term. Each entry: after payment number atPeriod, the annual rate becomes annualRatePercent (a percent number in a string, for example \"5.25\")."
},
"frequency": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"monthly",
"semi_monthly",
"biweekly",
"weekly",
"accelerated_biweekly",
"accelerated_weekly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"monthly",
"semi_monthly",
"biweekly",
"weekly",
"accelerated_biweekly",
"accelerated_weekly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Payment frequency. biweekly is 26 payments a year sized to the stated amortization. accelerated_biweekly is the monthly payment divided by 2, paid 26 times a year, so more is paid each year. weekly and accelerated_weekly are the same idea with 52 payments and division by 4. \"Every two weeks\" alone does not say which: mark unknown or ask."
},
"convention": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Compounding convention of the quoted rate: nominal_semiannual or nominal_monthly. The mortgage documents state it. Mark unknown if the user has not said; do not guess."
},
"termMonths": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Term length in months, never years: a 5-year term is 60."
},
"paymentMode": {
"enum": [
"recalculate_payment",
"fixed_payment"
],
"type": "string",
"description": "How the payment is set. recalculate_payment: the payment is calculated from the rate and amortization; use it for an ordinary mortgage, including a fixed-rate mortgage. fixed_payment: hold the dollar payment given in fixedPayment; it does not mean a fixed interest rate."
},
"fixedPayment": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Dollar payment per payment period in CAD. Needed only when paymentMode is fixed_payment."
},
"annualRatePercent": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual interest rate as a percent number in a string, without the % sign: 4.89% is \"4.89\", never \"0.0489\". Wrapped as a fact."
},
"amortizationMonths": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Remaining amortization in months, never years: 25 years is 300. Never inferred from the payment."
},
"continuationSegments": {
"type": "array",
"items": {
"type": "object",
"required": [
"durationMonths",
"annualRatePercent",
"convention",
"amortizationMonthsAtStart",
"paymentMode",
"assumptionAcknowledged"
],
"properties": {
"convention": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"paymentMode": {
"enum": [
"recalculate_payment",
"fixed_payment"
],
"type": "string",
"description": "How the payment is set. recalculate_payment: the payment is calculated from the rate and amortization; use it for an ordinary mortgage, including a fixed-rate mortgage. fixed_payment: hold the dollar payment given in fixedPayment; it does not mean a fixed interest rate."
},
"fixedPayment": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Dollar payment per payment period in CAD. Needed only when paymentMode is fixed_payment."
},
"durationMonths": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"annualRatePercent": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual interest rate as a percent number in a string, without the % sign: 19.99% is \"19.99\", never \"0.1999\"."
},
"assumptionAcknowledged": {
"type": "boolean",
"const": true
},
"amortizationMonthsAtStart": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
}
},
"additionalProperties": false
},
"maxItems": 20
}
},
"additionalProperties": false
},
"penaltyQuotedAt": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Payout date the lender's penalty quote is for, YYYY-MM-DD."
},
"startingBalance": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$",
"description": "Mortgage balance now, in CAD, as digits only: no $ sign, no commas, no spaces, for example \"412000\" or \"412000.50\". Before any costs are added."
},
"replacementOffer": {
"type": "object",
"required": [
"label",
"annualRatePercent",
"convention",
"termMonths",
"amortizationMonths",
"frequency",
"paymentMode",
"costs",
"credits"
],
"properties": {
"costs": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"amount",
"funding",
"atPeriod"
],
"properties": {
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"amount": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"funding": {
"enum": [
"cash",
"financed",
"lender_paid"
],
"type": "string",
"description": "cash: paid out of pocket. financed: added to the mortgage balance, at the start only (atPeriod 0). lender_paid: paid by the lender and not counted."
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
}
},
"additionalProperties": false
},
"maxItems": 30,
"description": "Fees for this offer (legal, discharge, appraisal). A cost the user cannot confirm must be listed with amount {state:\"unknown\"}; leaving it out means there is no such cost."
},
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"credits": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"amount",
"atPeriod",
"destination",
"clawback"
],
"properties": {
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"amount": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
},
"clawback": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "object",
"required": [
"amount",
"atPeriod"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "object",
"required": [
"amount",
"atPeriod"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Cashback repayment condition from the lender's agreement. amount: how much of the cashback must be repaid if the mortgage ends early. atPeriod: the payment number that condition refers to (with monthly payments, the month). A known clawback is reported as a warning and is not counted as a cost: the figures assume the mortgage is kept. {state:\"unknown\"} adds a warning to ask the lender and changes no figure. No clawback: {state:\"known\",value:{amount:\"0\",atPeriod:0},origin:\"user\"}."
},
"destination": {
"enum": [
"cash",
"principal"
],
"type": "string",
"description": "cash: paid to the borrower. principal: applied to reduce the balance."
}
},
"additionalProperties": false
},
"maxItems": 20,
"description": "Cashback or other credits, with any clawback."
},
"ratePath": {
"type": "array",
"items": {
"type": "object",
"required": [
"atPeriod",
"annualRatePercent"
],
"properties": {
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
},
"annualRatePercent": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$",
"description": "Annual interest rate as a percent number in a string, without the % sign: 19.99% is \"19.99\", never \"0.1999\"."
}
},
"additionalProperties": false
},
"maxItems": 20,
"description": "Rate changes during the term. Each entry: after payment number atPeriod, the annual rate becomes annualRatePercent (a percent number in a string, for example \"5.25\")."
},
"frequency": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"monthly",
"semi_monthly",
"biweekly",
"weekly",
"accelerated_biweekly",
"accelerated_weekly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"monthly",
"semi_monthly",
"biweekly",
"weekly",
"accelerated_biweekly",
"accelerated_weekly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Payment frequency. biweekly is 26 payments a year sized to the stated amortization. accelerated_biweekly is the monthly payment divided by 2, paid 26 times a year, so more is paid each year. weekly and accelerated_weekly are the same idea with 52 payments and division by 4. \"Every two weeks\" alone does not say which: mark unknown or ask."
},
"convention": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Compounding convention of the quoted rate: nominal_semiannual or nominal_monthly. The mortgage documents state it. Mark unknown if the user has not said; do not guess."
},
"termMonths": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Term length in months, never years: a 5-year term is 60."
},
"paymentMode": {
"enum": [
"recalculate_payment",
"fixed_payment"
],
"type": "string",
"description": "How the payment is set. recalculate_payment: the payment is calculated from the rate and amortization; use it for an ordinary mortgage, including a fixed-rate mortgage. fixed_payment: hold the dollar payment given in fixedPayment; it does not mean a fixed interest rate."
},
"fixedPayment": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Dollar payment per payment period in CAD. Needed only when paymentMode is fixed_payment."
},
"annualRatePercent": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual interest rate as a percent number in a string, without the % sign: 4.89% is \"4.89\", never \"0.0489\". Wrapped as a fact."
},
"amortizationMonths": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Remaining amortization in months, never years: 25 years is 300. Never inferred from the payment."
},
"continuationSegments": {
"type": "array",
"items": {
"type": "object",
"required": [
"durationMonths",
"annualRatePercent",
"convention",
"amortizationMonthsAtStart",
"paymentMode",
"assumptionAcknowledged"
],
"properties": {
"convention": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"paymentMode": {
"enum": [
"recalculate_payment",
"fixed_payment"
],
"type": "string",
"description": "How the payment is set. recalculate_payment: the payment is calculated from the rate and amortization; use it for an ordinary mortgage, including a fixed-rate mortgage. fixed_payment: hold the dollar payment given in fixedPayment; it does not mean a fixed interest rate."
},
"fixedPayment": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Dollar payment per payment period in CAD. Needed only when paymentMode is fixed_payment."
},
"durationMonths": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"annualRatePercent": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual interest rate as a percent number in a string, without the % sign: 19.99% is \"19.99\", never \"0.1999\"."
},
"assumptionAcknowledged": {
"type": "boolean",
"const": true
},
"amortizationMonthsAtStart": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
}
},
"additionalProperties": false
},
"maxItems": 20
}
},
"additionalProperties": false
},
"penaltySensitivity": {
"type": "object",
"required": [
"low",
"high",
"acknowledged"
],
"properties": {
"low": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"high": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
"remainingTermMonths": {
"type": "integer",
"maximum": 120,
"minimum": 1,
"description": "Months left in the current term, as a count of months: 2 years left is 24."
}
},
"additionalProperties": false
}Use this when a user asks about rolling other debts into a Canadian mortgage (debt consolidation), for example credit-card, car-loan or existing line-of-credit or HELOC balances, each entered with a fixed monthly payment or as interest-only. Compares three scenarios over a common horizon: keep the mortgage and debts, consolidate at the new minimum payment, and consolidate while keeping the same monthly repayment budget. Shows interest, debt left, fees and limits. Monthly mortgage payments only; 1 to 10 debts. Do not use for a new HELOC, additional cash-out or qualification: none is modeled.
| Argument | Type | Description |
|---|---|---|
| debts* | array | |
| penalty* | any | The penalty amount the lender quoted, in CAD. Never estimate it; use {state:"unknown"} if there is no quote. |
| mortgage* | object | |
| contractCaps | object | |
| horizonMonths | integer | Comparison horizon in months. Defaults to the shortest supplied term, at most 120. |
| monthlyBudget | any | Total monthly amount the user wants to keep paying after consolidating. Defaults to the current mortgage payment plus the debt payments due in month one. |
Use this when a user has two or three Canadian mortgage offers for the same balance, such as a renewal letter from the current lender and a quote to switch lender at renewal, and wants them compared. Compares the user-supplied rates, terms, amortizations, cashback and switching costs over a common horizon. Returns payments, interest, debt left, modeled borrowing cost and missing facts. Do not use for leaving a mortgage before the term ends (use compare_break_or_stay). Does not search or predict rates, confirm qualification or recommend a lender. An unknown cost is never treated as zero.
| Argument | Type | Description |
|---|---|---|
| offers* | array | |
| horizonMonths | integer | Comparison horizon in months. Defaults to the shortest supplied term, at most 120. |
| currentPayment | any | A fact is {state:"known",value,origin:"user"} when the user stated it; {state:"assumed",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:"unknown"} otherwise. Unknown is never treated as zero. |
| scheduleWindow | object | |
| startingBalance* | string | Mortgage balance now, in CAD, as digits only: no $ sign, no commas, no spaces, for example "412000" or "412000.50". Before any costs are added. |
Use this first when a user wants a Canadian mortgage renewal, extra-payment, break-or-stay or debt-consolidation comparison but has not yet given the key figures. From the facts already supplied, returns the missing ones in priority order and up to three questions to ask (balance, rate, remaining amortization, term, switching costs, lender-quoted penalty). Flags a request to borrow additional cash (cash-out refinance) as unsupported. Do not use when the figures are already supplied: call the matching calculator. Does not calculate, rank, check qualification or search rates.
| Argument | Type | Description |
|---|---|---|
| task* | string | Which comparison the user wants. |
| facts* | object |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"task",
"facts"
],
"properties": {
"task": {
"enum": [
"renewal",
"prepayments",
"break_or_stay",
"debt_consolidation"
],
"type": "string",
"description": "Which comparison the user wants."
},
"facts": {
"type": "object",
"properties": {
"penalty": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"termMonths": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Term length in months, never years: a 5-year term is 60."
},
"switchingCosts": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"startingBalance": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"cashOutRequested": {
"type": "boolean",
"description": "True when the user wants to borrow additional cash. This is not modeled and returns unsupported."
},
"annualRatePercent": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual interest rate as a percent number in a string, without the % sign: 19.99% is \"19.99\", never \"0.1999\"."
},
"amortizationMonths": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Remaining amortization in months, never years: 25 years is 300. Never inferred from the payment."
},
"amortizationExtended": {
"type": "boolean",
"description": "True when the new mortgage would run over a longer amortization than the current one has left, for example stretching back to 30 years. Adds a warning that a lower payment from a longer amortization is not a lower cost."
},
"financedCostsPresent": {
"type": "boolean",
"description": "True when fees or a penalty would be added to the mortgage balance."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}Use this when a user asks how to prepare for or understand a supported Canadian mortgage topic and is not asking for a calculation: renewal, switching costs, unequal terms, payment versus cost, renewal checklist, prepayments, break or stay, debt consolidation, or the calculation method. Returns one short, dated preparation guide written for Ontario and reviewed by an Ontario mortgage agent, with its public source, review status and follow-up questions. Do not use for general financial, legal or tax advice, current rates, arbitrary URLs or live web search.
| Argument | Type | Description |
|---|---|---|
| topic* | string | One of the nine guide topics. |
| detail* | string | brief returns the first two sentences; full returns the whole guide. |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"topic",
"detail"
],
"properties": {
"topic": {
"enum": [
"renewal",
"switching_costs",
"unequal_terms",
"payment_vs_cost",
"renewal_checklist",
"prepayments",
"break_or_stay",
"debt_consolidation",
"methodology"
],
"type": "string",
"description": "One of the nine guide topics."
},
"detail": {
"enum": [
"brief",
"full"
],
"type": "string",
"description": "brief returns the first two sentences; full returns the whole guide."
}
},
"additionalProperties": false
}Use this when a user asks what paying extra on one Canadian mortgage would do: a higher regular payment, recurring extra payments, or up to 50 lump sums. Compares the supplied mortgage with and without the extras: interest, debt left and modeled payoff period. Checks the extras against prepayment-privilege limits only when the user supplies them; otherwise reports the limits as not checked. Do not use to find a prepayment penalty or the cost of breaking a mortgage: no tool calculates a penalty, the lender quotes it. Results beyond the term need explicit monthly continuation assumptions.
| Argument | Type | Description |
|---|---|---|
| events* | array | Lump-sum extra payments by due period. Use datedEvents for calendar dates. |
| mortgage* | object | |
| startDate | string | |
| datedEvents | array | Lump-sum extra payments by calendar date. Needs startDate; each is modeled on the next due date and must carry mappingAcknowledged:true. |
| contractCaps | object | |
| horizonMonths | integer | Horizon in months. Defaults to the mortgage term. |
| recurringExtra | object |
| propertyValue |
| string |
| penaltyFunding* | string | cash if paid out of pocket; financed if added to the new mortgage. |
| scheduleWindow | object |
| startingBalance* | string | Mortgage balance now, in CAD, as digits only: no $ sign, no commas, no spaces, for example "412000" or "412000.50". Before any costs are added. |
| replacementOffer* | object |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"startingBalance",
"mortgage",
"debts",
"replacementOffer",
"penalty",
"penaltyFunding"
],
"properties": {
"debts": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"balance",
"annualRatePercent",
"monthlyPayment",
"type",
"convention"
],
"properties": {
"type": {
"enum": [
"fixed_monthly",
"interest_only"
],
"type": "string",
"description": "fixed_monthly for a debt with a set monthly payment; interest_only for a balance such as a line of credit that pays interest only."
},
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"balance": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$",
"description": "Balance owing on this debt now, in CAD, digits only, for example \"8500\"."
},
"convention": {
"type": "string",
"const": "nominal_monthly"
},
"monthlyPayment": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Set monthly payment of a fixed_monthly debt, in CAD. For an interest_only debt use {state:\"unknown\"}: the payment modeled is each month's interest."
},
"annualRatePercent": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual interest rate as a percent number in a string, without the % sign: 19.99% is \"19.99\", never \"0.1999\"."
}
},
"additionalProperties": false
},
"maxItems": 10,
"minItems": 1
},
"penalty": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "The penalty amount the lender quoted, in CAD. Never estimate it; use {state:\"unknown\"} if there is no quote."
},
"mortgage": {
"type": "object",
"required": [
"label",
"annualRatePercent",
"convention",
"termMonths",
"amortizationMonths",
"frequency",
"paymentMode",
"costs",
"credits"
],
"properties": {
"costs": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"amount",
"funding",
"atPeriod"
],
"properties": {
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"amount": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"funding": {
"enum": [
"cash",
"financed",
"lender_paid"
],
"type": "string",
"description": "cash: paid out of pocket. financed: added to the mortgage balance, at the start only (atPeriod 0). lender_paid: paid by the lender and not counted."
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
}
},
"additionalProperties": false
},
"maxItems": 30,
"description": "Fees for this offer (legal, discharge, appraisal). A cost the user cannot confirm must be listed with amount {state:\"unknown\"}; leaving it out means there is no such cost."
},
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"credits": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"amount",
"atPeriod",
"destination",
"clawback"
],
"properties": {
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"amount": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
},
"clawback": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "object",
"required": [
"amount",
"atPeriod"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "object",
"required": [
"amount",
"atPeriod"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Cashback repayment condition from the lender's agreement. amount: how much of the cashback must be repaid if the mortgage ends early. atPeriod: the payment number that condition refers to (with monthly payments, the month). A known clawback is reported as a warning and is not counted as a cost: the figures assume the mortgage is kept. {state:\"unknown\"} adds a warning to ask the lender and changes no figure. No clawback: {state:\"known\",value:{amount:\"0\",atPeriod:0},origin:\"user\"}."
},
"destination": {
"enum": [
"cash",
"principal"
],
"type": "string",
"description": "cash: paid to the borrower. principal: applied to reduce the balance."
}
},
"additionalProperties": false
},
"maxItems": 20,
"description": "Cashback or other credits, with any clawback."
},
"ratePath": {
"type": "array",
"items": {
"type": "object",
"required": [
"atPeriod",
"annualRatePercent"
],
"properties": {
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
},
"annualRatePercent": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$",
"description": "Annual interest rate as a percent number in a string, without the % sign: 19.99% is \"19.99\", never \"0.1999\"."
}
},
"additionalProperties": false
},
"maxItems": 20,
"description": "Rate changes during the term. Each entry: after payment number atPeriod, the annual rate becomes annualRatePercent (a percent number in a string, for example \"5.25\")."
},
"frequency": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"monthly",
"semi_monthly",
"biweekly",
"weekly",
"accelerated_biweekly",
"accelerated_weekly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"monthly",
"semi_monthly",
"biweekly",
"weekly",
"accelerated_biweekly",
"accelerated_weekly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Payment frequency. biweekly is 26 payments a year sized to the stated amortization. accelerated_biweekly is the monthly payment divided by 2, paid 26 times a year, so more is paid each year. weekly and accelerated_weekly are the same idea with 52 payments and division by 4. \"Every two weeks\" alone does not say which: mark unknown or ask."
},
"convention": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Compounding convention of the quoted rate: nominal_semiannual or nominal_monthly. The mortgage documents state it. Mark unknown if the user has not said; do not guess."
},
"termMonths": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Term length in months, never years: a 5-year term is 60."
},
"paymentMode": {
"enum": [
"recalculate_payment",
"fixed_payment"
],
"type": "string",
"description": "How the payment is set. recalculate_payment: the payment is calculated from the rate and amortization; use it for an ordinary mortgage, including a fixed-rate mortgage. fixed_payment: hold the dollar payment given in fixedPayment; it does not mean a fixed interest rate."
},
"fixedPayment": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Dollar payment per payment period in CAD. Needed only when paymentMode is fixed_payment."
},
"annualRatePercent": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual interest rate as a percent number in a string, without the % sign: 4.89% is \"4.89\", never \"0.0489\". Wrapped as a fact."
},
"amortizationMonths": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Remaining amortization in months, never years: 25 years is 300. Never inferred from the payment."
},
"continuationSegments": {
"type": "array",
"items": {
"type": "object",
"required": [
"durationMonths",
"annualRatePercent",
"convention",
"amortizationMonthsAtStart",
"paymentMode",
"assumptionAcknowledged"
],
"properties": {
"convention": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"paymentMode": {
"enum": [
"recalculate_payment",
"fixed_payment"
],
"type": "string",
"description": "How the payment is set. recalculate_payment: the payment is calculated from the rate and amortization; use it for an ordinary mortgage, including a fixed-rate mortgage. fixed_payment: hold the dollar payment given in fixedPayment; it does not mean a fixed interest rate."
},
"fixedPayment": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Dollar payment per payment period in CAD. Needed only when paymentMode is fixed_payment."
},
"durationMonths": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"annualRatePercent": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual interest rate as a percent number in a string, without the % sign: 19.99% is \"19.99\", never \"0.1999\"."
},
"assumptionAcknowledged": {
"type": "boolean",
"const": true
},
"amortizationMonthsAtStart": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
}
},
"additionalProperties": false
},
"maxItems": 20
}
},
"additionalProperties": false
},
"contractCaps": {
"type": "object",
"required": [
"basis"
],
"properties": {
"basis": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"absolute",
"original_principal",
"current_balance"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"absolute",
"original_principal",
"current_balance"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Basis of the annual limit: absolute uses annualCap; original_principal and current_balance use percentage."
},
"annualCap": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual prepayment limit in CAD. Omitted means the contract has no dollar annual limit; {state:\"unknown\"} means a limit may exist, so limits are not checked. With a percentage basis, a supplied amount is also checked and the stricter applies; an absolute basis requires this amount."
},
"startDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Date of period 0; due dates follow the illustrative calendar."
},
"percentage": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$",
"description": "Annual prepayment limit as a percent number in a string: 15% is \"15\". Used with basis original_principal or current_balance."
},
"resetMonth": {
"type": "integer",
"maximum": 12,
"minimum": 1,
"description": "Month whose first day starts each prepayment year."
},
"perEventCap": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Per-payment prepayment limit in CAD. Omitted means the contract has no per-payment limit; {state:\"unknown\"} means a limit may exist, so limits are not checked."
}
},
"additionalProperties": false
},
"horizonMonths": {
"type": "integer",
"maximum": 120,
"minimum": 1,
"description": "Comparison horizon in months. Defaults to the shortest supplied term, at most 120."
},
"monthlyBudget": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Total monthly amount the user wants to keep paying after consolidating. Defaults to the current mortgage payment plus the debt payments due in month one."
},
"propertyValue": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"penaltyFunding": {
"enum": [
"cash",
"financed"
],
"type": "string",
"description": "cash if paid out of pocket; financed if added to the new mortgage."
},
"scheduleWindow": {
"type": "object",
"required": [
"startPeriod",
"count"
],
"properties": {
"count": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"startPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"startingBalance": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$",
"description": "Mortgage balance now, in CAD, as digits only: no $ sign, no commas, no spaces, for example \"412000\" or \"412000.50\". Before any costs are added."
},
"replacementOffer": {
"type": "object",
"required": [
"label",
"annualRatePercent",
"convention",
"termMonths",
"amortizationMonths",
"frequency",
"paymentMode",
"costs",
"credits"
],
"properties": {
"costs": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"amount",
"funding",
"atPeriod"
],
"properties": {
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"amount": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"funding": {
"enum": [
"cash",
"financed",
"lender_paid"
],
"type": "string",
"description": "cash: paid out of pocket. financed: added to the mortgage balance, at the start only (atPeriod 0). lender_paid: paid by the lender and not counted."
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
}
},
"additionalProperties": false
},
"maxItems": 30,
"description": "Fees for this offer (legal, discharge, appraisal). A cost the user cannot confirm must be listed with amount {state:\"unknown\"}; leaving it out means there is no such cost."
},
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"credits": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"amount",
"atPeriod",
"destination",
"clawback"
],
"properties": {
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"amount": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
},
"clawback": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "object",
"required": [
"amount",
"atPeriod"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "object",
"required": [
"amount",
"atPeriod"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Cashback repayment condition from the lender's agreement. amount: how much of the cashback must be repaid if the mortgage ends early. atPeriod: the payment number that condition refers to (with monthly payments, the month). A known clawback is reported as a warning and is not counted as a cost: the figures assume the mortgage is kept. {state:\"unknown\"} adds a warning to ask the lender and changes no figure. No clawback: {state:\"known\",value:{amount:\"0\",atPeriod:0},origin:\"user\"}."
},
"destination": {
"enum": [
"cash",
"principal"
],
"type": "string",
"description": "cash: paid to the borrower. principal: applied to reduce the balance."
}
},
"additionalProperties": false
},
"maxItems": 20,
"description": "Cashback or other credits, with any clawback."
},
"ratePath": {
"type": "array",
"items": {
"type": "object",
"required": [
"atPeriod",
"annualRatePercent"
],
"properties": {
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
},
"annualRatePercent": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$",
"description": "Annual interest rate as a percent number in a string, without the % sign: 19.99% is \"19.99\", never \"0.1999\"."
}
},
"additionalProperties": false
},
"maxItems": 20,
"description": "Rate changes during the term. Each entry: after payment number atPeriod, the annual rate becomes annualRatePercent (a percent number in a string, for example \"5.25\")."
},
"frequency": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"monthly",
"semi_monthly",
"biweekly",
"weekly",
"accelerated_biweekly",
"accelerated_weekly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"monthly",
"semi_monthly",
"biweekly",
"weekly",
"accelerated_biweekly",
"accelerated_weekly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Payment frequency. biweekly is 26 payments a year sized to the stated amortization. accelerated_biweekly is the monthly payment divided by 2, paid 26 times a year, so more is paid each year. weekly and accelerated_weekly are the same idea with 52 payments and division by 4. \"Every two weeks\" alone does not say which: mark unknown or ask."
},
"convention": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Compounding convention of the quoted rate: nominal_semiannual or nominal_monthly. The mortgage documents state it. Mark unknown if the user has not said; do not guess."
},
"termMonths": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Term length in months, never years: a 5-year term is 60."
},
"paymentMode": {
"enum": [
"recalculate_payment",
"fixed_payment"
],
"type": "string",
"description": "How the payment is set. recalculate_payment: the payment is calculated from the rate and amortization; use it for an ordinary mortgage, including a fixed-rate mortgage. fixed_payment: hold the dollar payment given in fixedPayment; it does not mean a fixed interest rate."
},
"fixedPayment": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Dollar payment per payment period in CAD. Needed only when paymentMode is fixed_payment."
},
"annualRatePercent": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual interest rate as a percent number in a string, without the % sign: 4.89% is \"4.89\", never \"0.0489\". Wrapped as a fact."
},
"amortizationMonths": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Remaining amortization in months, never years: 25 years is 300. Never inferred from the payment."
},
"continuationSegments": {
"type": "array",
"items": {
"type": "object",
"required": [
"durationMonths",
"annualRatePercent",
"convention",
"amortizationMonthsAtStart",
"paymentMode",
"assumptionAcknowledged"
],
"properties": {
"convention": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"paymentMode": {
"enum": [
"recalculate_payment",
"fixed_payment"
],
"type": "string",
"description": "How the payment is set. recalculate_payment: the payment is calculated from the rate and amortization; use it for an ordinary mortgage, including a fixed-rate mortgage. fixed_payment: hold the dollar payment given in fixedPayment; it does not mean a fixed interest rate."
},
"fixedPayment": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Dollar payment per payment period in CAD. Needed only when paymentMode is fixed_payment."
},
"durationMonths": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"annualRatePercent": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual interest rate as a percent number in a string, without the % sign: 19.99% is \"19.99\", never \"0.1999\"."
},
"assumptionAcknowledged": {
"type": "boolean",
"const": true
},
"amortizationMonthsAtStart": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
}
},
"additionalProperties": false
},
"maxItems": 20
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"startingBalance",
"offers"
],
"properties": {
"offers": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"annualRatePercent",
"convention",
"termMonths",
"amortizationMonths",
"frequency",
"paymentMode",
"costs",
"credits"
],
"properties": {
"costs": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"amount",
"funding",
"atPeriod"
],
"properties": {
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"amount": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"funding": {
"enum": [
"cash",
"financed",
"lender_paid"
],
"type": "string",
"description": "cash: paid out of pocket. financed: added to the mortgage balance, at the start only (atPeriod 0). lender_paid: paid by the lender and not counted."
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
}
},
"additionalProperties": false
},
"maxItems": 30,
"description": "Fees for this offer (legal, discharge, appraisal). A cost the user cannot confirm must be listed with amount {state:\"unknown\"}; leaving it out means there is no such cost."
},
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"credits": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"amount",
"atPeriod",
"destination",
"clawback"
],
"properties": {
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"amount": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
},
"clawback": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "object",
"required": [
"amount",
"atPeriod"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "object",
"required": [
"amount",
"atPeriod"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Cashback repayment condition from the lender's agreement. amount: how much of the cashback must be repaid if the mortgage ends early. atPeriod: the payment number that condition refers to (with monthly payments, the month). A known clawback is reported as a warning and is not counted as a cost: the figures assume the mortgage is kept. {state:\"unknown\"} adds a warning to ask the lender and changes no figure. No clawback: {state:\"known\",value:{amount:\"0\",atPeriod:0},origin:\"user\"}."
},
"destination": {
"enum": [
"cash",
"principal"
],
"type": "string",
"description": "cash: paid to the borrower. principal: applied to reduce the balance."
}
},
"additionalProperties": false
},
"maxItems": 20,
"description": "Cashback or other credits, with any clawback."
},
"ratePath": {
"type": "array",
"items": {
"type": "object",
"required": [
"atPeriod",
"annualRatePercent"
],
"properties": {
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
},
"annualRatePercent": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$",
"description": "Annual interest rate as a percent number in a string, without the % sign: 19.99% is \"19.99\", never \"0.1999\"."
}
},
"additionalProperties": false
},
"maxItems": 20,
"description": "Rate changes during the term. Each entry: after payment number atPeriod, the annual rate becomes annualRatePercent (a percent number in a string, for example \"5.25\")."
},
"frequency": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"monthly",
"semi_monthly",
"biweekly",
"weekly",
"accelerated_biweekly",
"accelerated_weekly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"monthly",
"semi_monthly",
"biweekly",
"weekly",
"accelerated_biweekly",
"accelerated_weekly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Payment frequency. biweekly is 26 payments a year sized to the stated amortization. accelerated_biweekly is the monthly payment divided by 2, paid 26 times a year, so more is paid each year. weekly and accelerated_weekly are the same idea with 52 payments and division by 4. \"Every two weeks\" alone does not say which: mark unknown or ask."
},
"convention": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Compounding convention of the quoted rate: nominal_semiannual or nominal_monthly. The mortgage documents state it. Mark unknown if the user has not said; do not guess."
},
"termMonths": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Term length in months, never years: a 5-year term is 60."
},
"paymentMode": {
"enum": [
"recalculate_payment",
"fixed_payment"
],
"type": "string",
"description": "How the payment is set. recalculate_payment: the payment is calculated from the rate and amortization; use it for an ordinary mortgage, including a fixed-rate mortgage. fixed_payment: hold the dollar payment given in fixedPayment; it does not mean a fixed interest rate."
},
"fixedPayment": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Dollar payment per payment period in CAD. Needed only when paymentMode is fixed_payment."
},
"annualRatePercent": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual interest rate as a percent number in a string, without the % sign: 4.89% is \"4.89\", never \"0.0489\". Wrapped as a fact."
},
"amortizationMonths": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Remaining amortization in months, never years: 25 years is 300. Never inferred from the payment."
},
"continuationSegments": {
"type": "array",
"items": {
"type": "object",
"required": [
"durationMonths",
"annualRatePercent",
"convention",
"amortizationMonthsAtStart",
"paymentMode",
"assumptionAcknowledged"
],
"properties": {
"convention": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"paymentMode": {
"enum": [
"recalculate_payment",
"fixed_payment"
],
"type": "string",
"description": "How the payment is set. recalculate_payment: the payment is calculated from the rate and amortization; use it for an ordinary mortgage, including a fixed-rate mortgage. fixed_payment: hold the dollar payment given in fixedPayment; it does not mean a fixed interest rate."
},
"fixedPayment": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Dollar payment per payment period in CAD. Needed only when paymentMode is fixed_payment."
},
"durationMonths": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"annualRatePercent": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual interest rate as a percent number in a string, without the % sign: 19.99% is \"19.99\", never \"0.1999\"."
},
"assumptionAcknowledged": {
"type": "boolean",
"const": true
},
"amortizationMonthsAtStart": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
}
},
"additionalProperties": false
},
"maxItems": 20
}
},
"additionalProperties": false
},
"maxItems": 3,
"minItems": 2
},
"horizonMonths": {
"type": "integer",
"maximum": 120,
"minimum": 1,
"description": "Comparison horizon in months. Defaults to the shortest supplied term, at most 120."
},
"currentPayment": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"scheduleWindow": {
"type": "object",
"required": [
"startPeriod",
"count"
],
"properties": {
"count": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"startPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"startingBalance": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$",
"description": "Mortgage balance now, in CAD, as digits only: no $ sign, no commas, no spaces, for example \"412000\" or \"412000.50\". Before any costs are added."
}
},
"additionalProperties": false
}| Extra amount added to every payment from the given period (1 or later). |
| scheduleWindow | object |
| startingBalance* | string | Mortgage balance now, in CAD, as digits only: no $ sign, no commas, no spaces, for example "412000" or "412000.50". Before any costs are added. |
| semiMonthlyAnchors | array |
| pastPaymentsIncludedInBalance | boolean |
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"startingBalance",
"mortgage",
"events"
],
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"required": [
"amount",
"atPeriod"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
}
},
"additionalProperties": false
},
"maxItems": 50,
"description": "Lump-sum extra payments by due period. Use datedEvents for calendar dates."
},
"mortgage": {
"type": "object",
"required": [
"label",
"annualRatePercent",
"convention",
"termMonths",
"amortizationMonths",
"frequency",
"paymentMode",
"costs",
"credits"
],
"properties": {
"costs": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"amount",
"funding",
"atPeriod"
],
"properties": {
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"amount": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"funding": {
"enum": [
"cash",
"financed",
"lender_paid"
],
"type": "string",
"description": "cash: paid out of pocket. financed: added to the mortgage balance, at the start only (atPeriod 0). lender_paid: paid by the lender and not counted."
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
}
},
"additionalProperties": false
},
"maxItems": 30,
"description": "Fees for this offer (legal, discharge, appraisal). A cost the user cannot confirm must be listed with amount {state:\"unknown\"}; leaving it out means there is no such cost."
},
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"credits": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"amount",
"atPeriod",
"destination",
"clawback"
],
"properties": {
"label": {
"type": "string",
"maxLength": 100,
"minLength": 1
},
"amount": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
},
"clawback": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "object",
"required": [
"amount",
"atPeriod"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "object",
"required": [
"amount",
"atPeriod"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Cashback repayment condition from the lender's agreement. amount: how much of the cashback must be repaid if the mortgage ends early. atPeriod: the payment number that condition refers to (with monthly payments, the month). A known clawback is reported as a warning and is not counted as a cost: the figures assume the mortgage is kept. {state:\"unknown\"} adds a warning to ask the lender and changes no figure. No clawback: {state:\"known\",value:{amount:\"0\",atPeriod:0},origin:\"user\"}."
},
"destination": {
"enum": [
"cash",
"principal"
],
"type": "string",
"description": "cash: paid to the borrower. principal: applied to reduce the balance."
}
},
"additionalProperties": false
},
"maxItems": 20,
"description": "Cashback or other credits, with any clawback."
},
"ratePath": {
"type": "array",
"items": {
"type": "object",
"required": [
"atPeriod",
"annualRatePercent"
],
"properties": {
"atPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0,
"description": "Payment number, not a month: 0 is the start. With biweekly payments, payment 26 is about month 12."
},
"annualRatePercent": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$",
"description": "Annual interest rate as a percent number in a string, without the % sign: 19.99% is \"19.99\", never \"0.1999\"."
}
},
"additionalProperties": false
},
"maxItems": 20,
"description": "Rate changes during the term. Each entry: after payment number atPeriod, the annual rate becomes annualRatePercent (a percent number in a string, for example \"5.25\")."
},
"frequency": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"monthly",
"semi_monthly",
"biweekly",
"weekly",
"accelerated_biweekly",
"accelerated_weekly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"monthly",
"semi_monthly",
"biweekly",
"weekly",
"accelerated_biweekly",
"accelerated_weekly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Payment frequency. biweekly is 26 payments a year sized to the stated amortization. accelerated_biweekly is the monthly payment divided by 2, paid 26 times a year, so more is paid each year. weekly and accelerated_weekly are the same idea with 52 payments and division by 4. \"Every two weeks\" alone does not say which: mark unknown or ask."
},
"convention": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Compounding convention of the quoted rate: nominal_semiannual or nominal_monthly. The mortgage documents state it. Mark unknown if the user has not said; do not guess."
},
"termMonths": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Term length in months, never years: a 5-year term is 60."
},
"paymentMode": {
"enum": [
"recalculate_payment",
"fixed_payment"
],
"type": "string",
"description": "How the payment is set. recalculate_payment: the payment is calculated from the rate and amortization; use it for an ordinary mortgage, including a fixed-rate mortgage. fixed_payment: hold the dollar payment given in fixedPayment; it does not mean a fixed interest rate."
},
"fixedPayment": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Dollar payment per payment period in CAD. Needed only when paymentMode is fixed_payment."
},
"annualRatePercent": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual interest rate as a percent number in a string, without the % sign: 4.89% is \"4.89\", never \"0.0489\". Wrapped as a fact."
},
"amortizationMonths": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Remaining amortization in months, never years: 25 years is 300. Never inferred from the payment."
},
"continuationSegments": {
"type": "array",
"items": {
"type": "object",
"required": [
"durationMonths",
"annualRatePercent",
"convention",
"amortizationMonthsAtStart",
"paymentMode",
"assumptionAcknowledged"
],
"properties": {
"convention": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"nominal_semiannual",
"nominal_monthly"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
},
"paymentMode": {
"enum": [
"recalculate_payment",
"fixed_payment"
],
"type": "string",
"description": "How the payment is set. recalculate_payment: the payment is calculated from the rate and amortization; use it for an ordinary mortgage, including a fixed-rate mortgage. fixed_payment: hold the dollar payment given in fixedPayment; it does not mean a fixed interest rate."
},
"fixedPayment": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Dollar payment per payment period in CAD. Needed only when paymentMode is fixed_payment."
},
"durationMonths": {
"type": "integer",
"maximum": 120,
"minimum": 1
},
"annualRatePercent": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual interest rate as a percent number in a string, without the % sign: 19.99% is \"19.99\", never \"0.1999\"."
},
"assumptionAcknowledged": {
"type": "boolean",
"const": true
},
"amortizationMonthsAtStart": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "A fact is {state:\"known\",value,origin:\"user\"} when the user stated it; {state:\"assumed\",value,acknowledged:true,reason} only after the user has agreed to the assumption; {state:\"unknown\"} otherwise. Unknown is never treated as zero."
}
},
"additionalProperties": false
},
"maxItems": 20
}
},
"additionalProperties": false
},
"startDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"datedEvents": {
"type": "array",
"items": {
"type": "object",
"required": [
"date",
"amount",
"mappingAcknowledged"
],
"properties": {
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"mappingAcknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
"maxItems": 50,
"description": "Lump-sum extra payments by calendar date. Needs startDate; each is modeled on the next due date and must carry mappingAcknowledged:true."
},
"contractCaps": {
"type": "object",
"required": [
"basis"
],
"properties": {
"basis": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"enum": [
"absolute",
"original_principal",
"current_balance"
],
"type": "string"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"enum": [
"absolute",
"original_principal",
"current_balance"
],
"type": "string"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Basis of the annual limit: absolute uses annualCap; original_principal and current_balance use percentage."
},
"annualCap": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Annual prepayment limit in CAD. Omitted means the contract has no dollar annual limit; {state:\"unknown\"} means a limit may exist, so limits are not checked. With a percentage basis, a supplied amount is also checked and the stricter applies; an absolute basis requires this amount."
},
"startDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Date of period 0; due dates follow the illustrative calendar."
},
"percentage": {
"type": "string",
"pattern": "^(0|[1-9]\\d?)(\\.\\d{1,8})?$|^100(\\.0{1,8})?$",
"description": "Annual prepayment limit as a percent number in a string: 15% is \"15\". Used with basis original_principal or current_balance."
},
"resetMonth": {
"type": "integer",
"maximum": 12,
"minimum": 1,
"description": "Month whose first day starts each prepayment year."
},
"perEventCap": {
"oneOf": [
{
"type": "object",
"required": [
"state",
"value",
"origin"
],
"properties": {
"state": {
"type": "string",
"const": "known"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"origin": {
"enum": [
"user",
"approved_reference"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state",
"value",
"acknowledged",
"reason"
],
"properties": {
"state": {
"type": "string",
"const": "assumed"
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"reason": {
"type": "string",
"maxLength": 240,
"minLength": 1
},
"acknowledged": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"type": "string",
"const": "unknown"
}
},
"additionalProperties": false
}
],
"description": "Per-payment prepayment limit in CAD. Omitted means the contract has no per-payment limit; {state:\"unknown\"} means a limit may exist, so limits are not checked."
}
},
"additionalProperties": false
},
"horizonMonths": {
"type": "integer",
"maximum": 600,
"minimum": 1,
"description": "Horizon in months. Defaults to the mortgage term."
},
"recurringExtra": {
"type": "object",
"required": [
"amount",
"fromPeriod"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$"
},
"fromPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"description": "Extra amount added to every payment from the given period (1 or later).",
"additionalProperties": false
},
"scheduleWindow": {
"type": "object",
"required": [
"startPeriod",
"count"
],
"properties": {
"count": {
"type": "integer",
"maximum": 600,
"minimum": 1
},
"startPeriod": {
"type": "integer",
"maximum": 3000,
"minimum": 0
}
},
"additionalProperties": false
},
"startingBalance": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,7})(\\.\\d{1,2})?$",
"description": "Mortgage balance now, in CAD, as digits only: no $ sign, no commas, no spaces, for example \"412000\" or \"412000.50\". Before any costs are added."
},
"semiMonthlyAnchors": {
"type": "array",
"items": {
"type": "integer",
"maximum": 31,
"minimum": 1
},
"maxItems": 2,
"minItems": 2
},
"pastPaymentsIncludedInBalance": {
"type": "boolean",
"const": true
}
},
"additionalProperties": false
}