Home/Developers

API reference

A free, public calculation API.

A free, rate-limited public API for LikeOptions' financial calculation engine. GET or POST numeric inputs, get a JSON result back.

Full API Documentation → Detailed endpoint reference, code examples, and more

Endpoint

GET or POST /api/v1/calculate/:kind

Every calculator behind LikeOptions' calculator pages is also available as a JSON endpoint. Pass numeric inputs as query parameters (GET) or a JSON body (POST); get back the same { primary, secondary } shape the browser UI computes from.

GET /api/v1/calculate/mortgage?homePrice=400000&downPayment=80000&annualRate=6&years=30

Returns { kind, result: { primary, secondary } }.

Example

curl example

curl "https://likeoptions.com/api/v1/calculate/emi?amount=1000000&annualRate=9&months=60"

Returns the same EMI result the /emi-calculator/ page computes.

Limits

Rate limiting and scope

This is a free v1 API, not a billed product. It is rate-limited to 120 requests per hour per client IP; requests beyond that return 429. There is no authentication and no API key — do not send personal data in requests.

All calculations run purely on numeric inputs with no persistence beyond the rate-limit counter. Option-strategy endpoints that take multi-leg position objects (the options builder, scenario lab) are out of scope for v1 and are not exposed here.

This is a calculation utility, not financial advice. Results are illustrative and depend entirely on the values you send.

Reference

Available kind values

kindParameters (name=default)Calculator
mortgagehomePrice, downPayment, annualRate, years, annualTax=0Mortgage payment
loanamount, annualRate, monthsLoan payment
savingstarget, current, annualRate, yearsSavings goal
inflationamount, annualRate, yearsInflation-adjusted value
percentageoriginal, newValuePercentage change
currencyamount, exchangeRateCurrency conversion
affordabilityannualIncome, monthlyDebts, downPayment, annualRate, years, housingRatio=28, debtRatio=36Mortgage affordability
amortizationamount, annualRate, years, extraMonthly=0Amortization schedule summary
refinancingbalance, currentRate, currentMonths, newRate, newYears, closingCosts=0Refinancing comparison
emiamount, annualRate, monthsEMI
apramount, fees, nominalRate, monthsAPR estimate
cagrstartValue, endValue, yearsCAGR
sipmonthlyContribution, annualRate, yearsSIP future value
retirementcurrentSavings, monthlyContribution, annualRate, yearsRetirement balance
taxgrossIncome, deductions, taxRate, credits=0Income tax estimate (jurisdiction-neutral)
debtbalance, annualRate, monthlyPaymentDebt payoff
emergencymonthlyEssentials, months, currentSavingsEmergency fund gap
fireannualExpenses, withdrawalRate, currentSavings, annualContributionFIRE number
rentbuymonthlyRent, homePrice, downPayment, annualRate, yearsRent vs buy
commoditycurrentHoldingsValue, monthlyContribution, annualRate, yearsCommodity value projection
homeequityhomeValue, mortgageBalance, maxLTV=80Home equity available
vestingsharesGranted, currentSharePrice, vestingYears, yearsElapsed, cliffYears=1Stock grant vesting
marginequity, initialMarginPercent=50, maintenanceMarginPercent=25, existingLoanBalance=0Margin buying power
avgcostexistingShares, existingAvgCost, newShares, newPriceAverage cost basis
stockprofitshares, buyPrice, sellPrice, fees=0Stock profit/loss
hypinvestinvestmentAmount, startPrice, endPrice, dividendYieldPercent=0, years=0Hypothetical investment growth
wheelputStrike, putPremium, callStrike, callPremium, contracts, cyclesPerYearWheel strategy income
optionpricespot, strike, years, riskFreeRatePercent, volatilityPercentBlack-Scholes option price
financialhealthemergencyFundMonths, monthlyDebtPayments, monthlyIncome, monthlySavings, assetAllocationScoreFinancial health score
ppfannualContribution, annualRate, yearsPPF maturity value
fdprincipal, annualRate, years, compoundingsPerYear=4Fixed deposit maturity
rdmonthlyDeposit, annualRate, monthsRecurring deposit maturity
indiataxannualIncome, standardDeduction=75000India income tax estimate (new regime)
gstbaseAmount, gstRateGST amount and total

Frequently asked

API questions

Does this API store the numbers I send?

No. Inputs are used only to compute the response for that request. The only thing persisted is a hashed IP address plus an hourly request count, used solely for rate limiting, and it is not linked to the calculation inputs.

Is there an API key or paid tier?

Not currently. v1 is free and unauthenticated, limited to 120 requests per hour per client IP. A metered or paid tier may be considered later, but is not part of this release.

Can I call this from a browser?

Yes. The endpoint sends permissive CORS headers so it can be called directly from client-side JavaScript on any origin.