Mortgage Calculator

Calculate monthly mortgage payments and generate a full amortization schedule for any fixed-rate loan. Returns the monthly payment, total cost, total interest, and a month-by-month breakdown.

Get API Key

Descripción general

Casos de uso

  • Mortgage calculators for real estate platforms
  • Loan comparison tools
  • Personal finance dashboards
  • Amortization schedule exports for borrowers
  • Financial planning and budgeting apps

Funcionalidades

Standard fixed-rate amortization formula
Full month-by-month schedule (principal, interest, balance per payment)
Summary fields — monthly payment, total payment, total interest
Supports loan terms from 1 to 50 years
Any principal and annual interest rate

Puntos finales de la API

Calculate Mortgage

Returns the monthly payment, total cost, and full amortization schedule for a fixed-rate mortgage.

GET
https://requiems.xyz/v1/finance/mortgage

Parámetros

Nombre Tipo Obligatorio Descripción
principal number Obligatorio Loan amount in your chosen currency (e.g. 300000 for $300,000)
rate number Obligatorio Annual interest rate as a percentage (e.g. 6.5 for 6.5%). Must be greater than 0.
years integer Obligatorio Loan term in years (1–50)

Pruébalo

Demostración en vivo
Solicitud

Loan amount in your chosen currency (e.g. 300000 for $300,000)

Annual interest rate as a percentage (e.g. 6.5 for 6.5%). Must be greater than 0.

Loan term in years (1–50)

Campos de respuesta

Campo Tipo Descripción
principal number The original loan amount passed in the request
rate number The annual interest rate passed in the request
years integer The loan term in years passed in the request
monthly_payment number Fixed monthly payment amount (rounded to 2 decimal places)
total_payment number Total amount paid over the life of the loan
total_interest number Total interest paid (total_payment minus principal)
schedule array<object> Full amortization schedule — one entry per month (years × 12 entries)
schedule[].month integer Month number (1 to years × 12)
schedule[].payment number Total payment for this month
schedule[].principal number Portion of this month's payment applied to principal
schedule[].interest number Portion of this month's payment applied to interest
schedule[].balance number Remaining loan balance after this payment

Ejemplos de código

curl "https://requiems.xyz/v1/finance/mortgage?principal=300000&rate=6.5&years=30" \
  -H "requiems-api-key: YOUR_API_KEY"

Respuestas de error

bad_request

A required parameter is missing, not a valid number, or out of range (e.g. years > 50 or rate <= 0).

internal_error

Unexpected server error.

Batch Calculate Mortgages

Calculate up to 50 mortgages in a single request. Results are returned in the same order as the input.

POST
https://requiems.xyz/v1/finance/mortgage/batch

Parámetros

Nombre Tipo Obligatorio Descripción
mortgages array<object> Obligatorio Array of mortgages to calculate (min: 1, max: 50).

Pruébalo

Demostración en vivo
Solicitud

Array of mortgages to calculate (min: 1, max: 50).

Campos de respuesta

Campo Tipo Descripción
results array<object> Mortgage calculation result for each mortgage request in the same order as the input. Each item has the same fields as the single mortgage endpoint.
total integer Number of results returned. Matches the length of the input array.

Ejemplos de código

curl -X POST "https://requiems.xyz/v1/finance/mortgage/batch" \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mortgages":[{"principal": 150000,"rate": 6.5,"years": 10},{"principal": 250000,"rate": 5.2,"years": 30}]}'

Respuestas de error

validation_failed

The mortgages array is missing, empty, or contains more than 50 items.

Preguntas frecuentes