{"openapi":"3.1.0","info":{"title":"Finance Calculator","version":"0.1.0","description":"Financial math — loan amortization, simple/compound interest, future & present value, NPV and IRR.","x-guidance":"Financial math — loan amortization, simple/compound interest, future & present value, NPV and IRR. Each operation is an HTTP POST to its /v1/<operation> path with a JSON request body (see each operation's requestBody schema) and returns a JSON response. Endpoints are paid per successful call via x402 or MPP (USDC on Base); an unpaid request returns 402 with payment metadata in the WWW-Authenticate header.","contact":{"email":"hello@openverbs.com"}},"x-discovery":{"ownershipProofs":["0xb1401a71756f51464a9962db12f1eb3e9522490cd20010b06d00cf7b7770acfd5f79721f9dfdf2643f8cecd29af3bde9ec133941a386042b32d9886053a70de61b","0xc1c1f11793e18a00fcb7072421f26e89fb75b6aa517fa84370564991f4b10efa024f6f57e4e67eefd20cf46cc01fc5a62d793fa8fbcda04f26c946a3433d73f91b","0x676b474af0ef9ed4809b5d12d2e789b36e52d56215b21f601d71f76620e36ec630347116a7b2b349a3c3681e5db0fbfa76c4169a676b6d6f27864d0e5017284a1c","0xc2ab96522515ed9e9bc4f1a241b774bd48df42e951ddbf7f6aa8fc76f5a96a20421703e1ec402ce7eb1e4eabea3b6e4e4129cf39d56ea91cf4fcf38561fc94fc1c"]},"servers":[{"url":"https://finance.openverbs.com"}],"paths":{"/health":{"get":{"summary":"Health check","security":[],"responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"service":{"type":"string"},"version":{"type":"string"}}}}}}}}},"/v1/loan":{"post":{"summary":"Loan amortization","description":"Compute the level monthly payment, total paid and total interest of a fully-amortizing loan. Handles a 0% rate. Set schedule=true to also return the full month-by-month amortization table. Paid endpoint (x402 + MPP). Price: $0.004000 USDC per successful payment.","tags":["loan amortization","mortgage payment calculator","monthly loan payment","amortization schedule","total loan interest","loan calculator api"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"principal":{"type":"number","exclusiveMinimum":0,"maximum":1000000000000000,"description":"Loan principal (amount borrowed)."},"annualRatePercent":{"type":"number","minimum":0,"maximum":1000,"description":"Annual interest rate as a percentage, e.g. 5 for 5%."},"termMonths":{"type":"integer","minimum":1,"maximum":1200,"description":"Loan term in months."},"schedule":{"type":"boolean","description":"Include the full amortization schedule. Default false."}},"required":["principal","annualRatePercent","termMonths"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ monthlyPayment, totalPaid, totalInterest, schedule? }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ monthlyPayment, totalPaid, totalInterest, schedule? }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Compute the level monthly payment, total paid and total interest of a fully-amortizing loan. Handles a 0% rate. Set schedule=true to also return the full month-by-month amortization table.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.004000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"4000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Compute the level monthly payment, total paid and total interest of a fully-amortizing loan. Handles a 0% rate. Set schedule=true to also return the full month-by-month amortization table.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Compute the level monthly payment, total paid and total interest of a fully-amortizing loan. Handles a 0% rate. Set schedule=true to also return the full month-by-month amortization table.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/interest":{"post":{"summary":"Simple / compound interest","description":"Grow a principal by simple or compound interest over a number of years. Compound interest uses compoundsPerYear compounding periods (default 12, monthly). Paid endpoint (x402 + MPP). Price: $0.004000 USDC per successful payment.","tags":["compound interest calculator","simple interest calculator","grow principal","interest over time","monthly compounding api","calculate interest"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"principal":{"type":"number","minimum":0,"maximum":1000000000000000,"description":"Starting principal."},"annualRatePercent":{"type":"number","minimum":0,"maximum":1000,"description":"Annual interest rate as a percentage."},"years":{"type":"number","minimum":0,"maximum":1000,"description":"Number of years."},"method":{"type":"string","enum":["simple","compound"],"description":"Interest method. Default compound."},"compoundsPerYear":{"type":"integer","minimum":1,"maximum":365,"description":"Compounding periods per year (compound only). Default 12."}},"required":["principal","annualRatePercent","years"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ method, amount, interest }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ method, amount, interest }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Grow a principal by simple or compound interest over a number of years. Compound interest uses compoundsPerYear compounding periods (default 12, monthly).","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.004000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"4000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Grow a principal by simple or compound interest over a number of years. Compound interest uses compoundsPerYear compounding periods (default 12, monthly).","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Grow a principal by simple or compound interest over a number of years. Compound interest uses compoundsPerYear compounding periods (default 12, monthly).","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/future-value":{"post":{"summary":"Future value","description":"Future value of a present sum and/or a level annuity, given a per-period rate and number of periods. Set dueAtBeginning=true for an annuity-due (payments at the start of each period). Paid endpoint (x402 + MPP). Price: $0.004000 USDC per successful payment.","tags":["future value calculator","annuity future value","fv financial formula","investment growth projection","payments to future value","future value api"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ratePercent":{"type":"number","minimum":-99,"maximum":1000,"description":"Interest rate per period, as a percentage."},"periods":{"type":"integer","minimum":0,"maximum":100000,"description":"Number of periods."},"payment":{"type":"number","description":"Level payment per period (annuity). Default 0."},"presentValue":{"type":"number","description":"Present lump sum. Default 0."},"dueAtBeginning":{"type":"boolean","description":"Annuity-due (payments at period start). Default false."}},"required":["ratePercent","periods"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ futureValue }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ futureValue }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Future value of a present sum and/or a level annuity, given a per-period rate and number of periods. Set dueAtBeginning=true for an annuity-due (payments at the start of each period).","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.004000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"4000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Future value of a present sum and/or a level annuity, given a per-period rate and number of periods. Set dueAtBeginning=true for an annuity-due (payments at the start of each period).","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Future value of a present sum and/or a level annuity, given a per-period rate and number of periods. Set dueAtBeginning=true for an annuity-due (payments at the start of each period).","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/present-value":{"post":{"summary":"Present value","description":"Present value of a future sum and/or a level annuity, given a per-period rate and number of periods. Set dueAtBeginning=true for an annuity-due. Paid endpoint (x402 + MPP). Price: $0.004000 USDC per successful payment.","tags":["present value calculator","annuity present value","pv financial formula","discount future cashflow","payments to present value","present value api"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ratePercent":{"type":"number","minimum":-99,"maximum":1000,"description":"Discount rate per period, as a percentage."},"periods":{"type":"integer","minimum":0,"maximum":100000,"description":"Number of periods."},"payment":{"type":"number","description":"Level payment per period (annuity). Default 0."},"futureValue":{"type":"number","description":"Future lump sum. Default 0."},"dueAtBeginning":{"type":"boolean","description":"Annuity-due (payments at period start). Default false."}},"required":["ratePercent","periods"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ presentValue }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ presentValue }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Present value of a future sum and/or a level annuity, given a per-period rate and number of periods. Set dueAtBeginning=true for an annuity-due.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.004000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"4000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Present value of a future sum and/or a level annuity, given a per-period rate and number of periods. Set dueAtBeginning=true for an annuity-due.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Present value of a future sum and/or a level annuity, given a per-period rate and number of periods. Set dueAtBeginning=true for an annuity-due.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/npv":{"post":{"summary":"Net present value","description":"Net present value of a series of cash flows discounted at a per-period rate. cashflows[0] is the time-0 flow (typically the initial outlay, negative). Paid endpoint (x402 + MPP). Price: $0.004000 USDC per successful payment.","tags":["net present value","npv calculator","discount cash flows","investment npv api","cashflow valuation","present value of cashflows"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ratePercent":{"type":"number","minimum":-99,"maximum":1000,"description":"Discount rate per period, as a percentage."},"cashflows":{"type":"array","items":{"type":"number"},"minItems":1,"maxItems":10000,"description":"Cash flows by period; index 0 is time 0."}},"required":["ratePercent","cashflows"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ npv }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ npv }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Net present value of a series of cash flows discounted at a per-period rate. cashflows[0] is the time-0 flow (typically the initial outlay, negative).","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.004000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"4000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Net present value of a series of cash flows discounted at a per-period rate. cashflows[0] is the time-0 flow (typically the initial outlay, negative).","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Net present value of a series of cash flows discounted at a per-period rate. cashflows[0] is the time-0 flow (typically the initial outlay, negative).","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/irr":{"post":{"summary":"Internal rate of return","description":"Internal rate of return (per period) of a series of cash flows, solved with a bounded bisection. Requires at least one positive and one negative flow; flows with no sign change or no bracketable root are rejected as a clean 400. Paid endpoint (x402 + MPP). Price: $0.004000 USDC per successful payment.","tags":["internal rate of return","irr calculator","cashflow return rate","investment irr api","solve discount rate","project return percentage"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cashflows":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":10000,"description":"Cash flows by period; index 0 is time 0. Needs mixed signs."}},"required":["cashflows"],"additionalProperties":false},"example":{"cashflows":[-1000,1100]}}}},"responses":{"200":{"description":"`{ ratePercent }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ ratePercent }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Internal rate of return (per period) of a series of cash flows, solved with a bounded bisection. Requires at least one positive and one negative flow; flows with no sign change or no bracketable root are rejected as a clean 400.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.004000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"4000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Internal rate of return (per period) of a series of cash flows, solved with a bounded bisection. Requires at least one positive and one negative flow; flows with no sign change or no bracketable root are rejected as a clean 400.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Internal rate of return (per period) of a series of cash flows, solved with a bounded bisection. Requires at least one positive and one negative flow; flows with no sign change or no bracketable root are rejected as a clean 400.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}}},"x-service-info":{"categories":["compute"],"docs":{"homepage":"https://finance.openverbs.com","apiReference":"https://finance.openverbs.com/openapi.json"}}}