You need a finance API. You do not need to build the math yourself.
Mortgage formulas, amortization schedules, compound interest, loan payoff projections: these are solved problems. Implementing them from scratch means debugging floating point edge cases, handling negative amortization, and maintaining tax bracket tables. A good API handles this and returns numbers you can trust.
Here is what to look for, and how ToolKnife's finance API compares.
What a finance API should give you
At minimum:
- Mortgage calculator with amortization schedule
- Loan calculator with monthly payments and total interest
- Compound interest with configurable compounding periods
- ROI and CAGR for investment analysis
- Currency conversion with live exchange rates
- Tax calculations for multiple jurisdictions
Most free finance APIs give you one of these. ToolKnife gives you all of them through a single endpoint.
Quick start
Every finance tool on ToolKnife is available through the same REST API pattern:
curl -X POST https://toolknife.com/api/v1/tools/mortgage-calculator_calculate-mortgage \
-H "Content-Type: application/json" \
-d '{"principal": 400000, "annualRate": 6.5, "years": 30, "downPayment": 80000}'
{
"monthlyPayment": 2023.65,
"totalPayment": 728515.57,
"totalInterest": 408515.57,
"loanAmount": 320000
}
The API is free at 200 calls/day. No API key needed for basic usage.
Python example
import requests
def calculate_mortgage(principal, rate, years, down_payment=0):
resp = requests.post(
"https://toolknife.com/api/v1/tools/mortgage-calculator_calculate-mortgage",
json={
"principal": principal,
"annualRate": rate,
"years": years,
"downPayment": down_payment,
},
)
return resp.json()
result = calculate_mortgage(500000, 6.5, 30, 100000)
print(f"Monthly payment: ${result['monthlyPayment']:,.2f}")
JavaScript example
const response = await fetch(
"https://toolknife.com/api/v1/tools/compound-interest-calculator_calculate-compound-interest",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
principal: 10000,
rate: 7,
years: 20,
compoundingFrequency: 12,
monthlyContribution: 500,
}),
}
);
const data = await response.json();
console.log(`Future value: $${data.futureValue.toLocaleString()}`);
Available finance endpoints
| Tool | Endpoint slug | What it returns |
|---|---|---|
| Mortgage | mortgage-calculator_calculate-mortgage |
Monthly payment, total interest, amortization |
| Loan | loan-calculator_calculate-loan |
Payment schedule, total cost |
| Compound interest | compound-interest-calculator_calculate-compound-interest |
Future value, total contributions, total interest |
| Simple interest | simple-interest-calculator_calculate |
Interest earned, total amount |
| ROI | roi-calculator_calculate-roi |
ROI percentage, net profit |
| CAGR | cagr-calculator_calculate-cagr |
Compound annual growth rate |
| NPV | npv-calculator_calculate-npv |
Net present value |
| IRR | irr-calculator_calculate-irr |
Internal rate of return |
| Amortization | amortization-calculator_calculate-amortization |
Full amortization schedule |
| Currency | currency-converter_convert |
Converted amount with live ECB rates |
Full list at toolknife.com/docs.
For AI agents: MCP
If you are building with Claude, GPT, or other LLM agents, ToolKnife also works as an MCP server. The agent calls finance functions directly:
{
"mcpServers": {
"toolknife": {
"type": "streamable-http",
"url": "https://toolknife.com/api/mcp"
}
}
}
No wrapper code needed. The agent discovers available tools and calls them with structured parameters.
Pricing
| Tier | Rate limit | Price |
|---|---|---|
| Free | 200 calls/day | $0 |
| Pro | 5,000 calls/day | $19/mo |
| Business | 50,000 calls/day | $79/mo |
The free tier is enough for prototyping, side projects, and low-traffic apps. Pro covers most production apps.
Browse the full API documentation or try the finance tools in the browser first.