API Endpoint
Refinancing Comparison
Compare current loan with refinance option, including closing costs and break-even point.
Endpoint
Also supports GET with query parameters.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
balance | number | — | Current loan balance ($) |
currentRate | number | — | Current interest rate (%) |
currentMonths | number | — | Months remaining on current loan |
newRate | number | — | New loan interest rate (%) |
newYears | number | — | New loan term (years) |
closingCosts | number | 0 | Refinancing closing costs ($) |
Request Examples
POST (JSON body)
curl -X POST https://likeoptions.com/api/v1/calculate/refinancing \
-H "Content-Type: application/json" \
-d '{"balance": 100000, "currentRate": 50000, "currentMonths": 6}'GET (query parameters)
curl "https://likeoptions.com/api/v1/calculate/refinancing?balance=100000¤tRate=50000¤tMonths=6"Response
{
"kind": "refinancing",
"result": {
"primary": 1234.56,
"secondary": [
{ "label": "Example metric", "value": 100, "format": "money" },
{ "label": "Example percent", "value": 5.5, "format": "percent" }
]
}
}When to Use
- Decide whether to refinance
- Calculate break-even point
- Compare rate scenarios
Error Handling
- 400 Bad Request — Invalid input parameters or missing required fields
- 404 Not Found — Unknown calculator kind
- 429 Too Many Requests — Rate limit exceeded (120 req/hour per IP)
- 413 Payload Too Large — Request body exceeds 16 KB
Related Endpoints
View request examples in JavaScript, Python, cURL, and more →