{"openapi":"3.1.0","info":{"title":"Loan & Mortgage API","version":"1.0.0","description":"Loan and mortgage amortization maths as an API, computed locally and deterministically. The payment endpoint computes the fixed monthly payment of a fully-amortizing loan, M = P·r·(1+r)ⁿ / ((1+r)ⁿ − 1), where r is the annual rate divided by twelve and n is the number of monthly payments, and returns the total paid over the life of the loan, the total interest and the share of every dollar that goes to interest. The schedule endpoint breaks any single payment into its interest and principal parts, shows the remaining balance after it, and the cumulative interest and principal paid so far — so you can see exactly how a mortgage shifts from interest to equity over time. The affordability endpoint inverts the formula to give the largest principal a chosen monthly budget can service at a given rate and term. The term is entered as years or months, and zero-interest loans are handled. Everything is computed locally and deterministically, so it is instant and private. Ideal for fintech, real-estate, banking and personal-finance app developers, mortgage and auto-loan calculators, and finance education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is loan amortization; for break-even and CVP analysis use a break-even API and for savings-goal projections use a savings API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/loan-api","description":"oanor gateway"}],"tags":[{"name":"Loan"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/affordability":{"get":{"operationId":"get_v1_affordability","tags":["Loan"],"summary":"Max principal","description":"","parameters":[{"name":"monthly_payment","in":"query","required":true,"description":"Monthly budget","schema":{"type":"string"},"example":"1199.10"},{"name":"annual_rate","in":"query","required":true,"description":"Annual interest rate (%)","schema":{"type":"string"},"example":"6"},{"name":"years","in":"query","required":false,"description":"Term in years","schema":{"type":"string"},"example":"30"},{"name":"months","in":"query","required":false,"description":"Or term in months","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Inverse amortization: P = M·((1+r)ⁿ − 1) / (r·(1+r)ⁿ). The most you can borrow for a given monthly budget.","inputs":{"payments":360,"annual_rate_pct":6,"monthly_payment":1199.1},"total_paid":431676,"max_principal":199999.82,"total_interest":231676.18,"number_of_payments":360},"meta":{"timestamp":"2026-06-04T18:38:08.837Z","request_id":"42a8428e-108d-4e17-93ab-cee434b5fd9a"},"status":"ok","message":"Affordability","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/payment":{"get":{"operationId":"get_v1_payment","tags":["Loan"],"summary":"Monthly payment","description":"","parameters":[{"name":"principal","in":"query","required":true,"description":"Loan principal","schema":{"type":"string"},"example":"200000"},{"name":"annual_rate","in":"query","required":true,"description":"Annual interest rate (%)","schema":{"type":"string"},"example":"6"},{"name":"years","in":"query","required":false,"description":"Term in years","schema":{"type":"string"},"example":"30"},{"name":"months","in":"query","required":false,"description":"Or term in months","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Fully-amortizing fixed-rate loan: M = P·r·(1+r)ⁿ / ((1+r)ⁿ − 1), r = annual rate / 12.","inputs":{"payments":360,"principal":200000,"annual_rate_pct":6},"total_paid":431676.38,"total_interest":231676.38,"monthly_payment":1199.1,"interest_fraction":0.53669,"number_of_payments":360},"meta":{"timestamp":"2026-06-04T18:38:08.944Z","request_id":"30dd0143-84aa-4cb1-b7a0-33f9a8a8699c"},"status":"ok","message":"Monthly payment","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/schedule":{"get":{"operationId":"get_v1_schedule","tags":["Loan"],"summary":"Amortization split","description":"","parameters":[{"name":"principal","in":"query","required":true,"description":"Loan principal","schema":{"type":"string"},"example":"200000"},{"name":"annual_rate","in":"query","required":true,"description":"Annual interest rate (%)","schema":{"type":"string"},"example":"6"},{"name":"years","in":"query","required":false,"description":"Term in years","schema":{"type":"string"},"example":"30"},{"name":"months","in":"query","required":false,"description":"Or term in months","schema":{"type":"string"}},{"name":"payment_number","in":"query","required":false,"description":"Which payment to break down","schema":{"type":"string"},"example":"1"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Each payment: interest = balance·r, principal = M − interest. Balance falls until it reaches zero on the final payment.","inputs":{"payments":360,"principal":200000,"payment_number":1,"annual_rate_pct":6},"monthly_payment":1199.1,"payment_interest":1000,"payment_principal":199.1,"remaining_balance":199800.9,"cumulative_interest":1000,"cumulative_principal":199.1},"meta":{"timestamp":"2026-06-04T18:38:09.080Z","request_id":"9987732b-f887-45f5-9ef5-54f25f6d4e1f"},"status":"ok","message":"Amortization split","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"Amounts in any single currency; annual_rate in percent; term as 'years' or 'months'. Fixed-rate, fully-amortizing loans (mortgages, auto and personal loans).","service":"loan-api","formulae":{"payment":"M = P·r·(1+r)ⁿ / ((1+r)ⁿ − 1)","principal":"P = M·((1+r)ⁿ − 1) / (r·(1+r)ⁿ)","monthly_rate":"r = annual_rate / 100 / 12","zero_interest":"M = P / n"},"endpoints":{"GET /v1/meta":"This document.","GET /v1/payment":"Monthly payment, total paid and total interest for a fixed-rate loan.","GET /v1/schedule":"Interest/principal split and remaining balance at a given payment number.","GET /v1/affordability":"Largest principal a given monthly payment can service."},"description":"Loan and mortgage amortization calculator: monthly payment and total interest, per-payment interest/principal split with running balance, and the maximum principal a monthly budget can afford."},"meta":{"timestamp":"2026-06-04T18:38:09.187Z","request_id":"0a7e8b6b-cd6d-4724-a853-d329ea35cab3"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":2000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1500,"monthly_call_quota":40000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3900,"monthly_call_quota":250000,"rps_limit":25,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":11900,"monthly_call_quota":1507000,"rps_limit":80,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/loan-api"}