{"openapi":"3.1.0","info":{"title":"CAGR & Returns API","version":"1.0.0","description":"Investment growth and return maths as an API, computed locally and deterministically. The cagr endpoint computes the compound annual growth rate, CAGR = (end/begin)^(1/years) − 1 — the single smoothed annual rate that compounds a starting value into an ending value — together with the total return and the growth multiple, so €1,000 growing to €2,000 over five years works out to about 14.87 %/yr. The future-value endpoint compounds a single lump sum, FV = PV·(1+r)^n, and the present-value endpoint discounts a future lump sum back to today, PV = FV/(1+r)^n. The annualize endpoint converts a total holding-period return over a span of years into an equivalent annual rate, and back the other way. The doubling-time endpoint gives the exact time for money to double, ln2/ln(1+r), alongside the Rule-of-72, Rule-of-70 and Rule-of-69.3 quick estimates — at 8 % money doubles in about nine years. Rates are decimals (0.07 = 7 %) except the doubling endpoint which takes a percentage. Everything is computed locally and deterministically, so it is instant and private. Ideal for fintech, investing, portfolio, robo-advisor, personal-finance and finance-education app developers, return-and-growth calculators, and dashboards. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 5 endpoints. These are single-sum growth and return metrics; for level-payment loans use a loan API and for regular-deposit savings a savings API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/cagr-api","description":"oanor gateway"}],"tags":[{"name":"Returns"},{"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/annualize":{"get":{"operationId":"get_v1_annualize","tags":["Returns"],"summary":"Annualize a total return","description":"","parameters":[{"name":"total_return","in":"query","required":false,"description":"Total return (e.g. 0.5 = +50%)","schema":{"type":"string"},"example":"0.5"},{"name":"annual_return","in":"query","required":false,"description":"Or annual return to compound","schema":{"type":"string"}},{"name":"years","in":"query","required":true,"description":"Number of years","schema":{"type":"string"},"example":"3"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Annualized = (1 + total_return)^(1/years) − 1.","inputs":{"years":3,"total_return":0.5},"annualized_return":0.14471424,"annualized_percent":14.471424},"meta":{"timestamp":"2026-06-05T19:50:25.411Z","request_id":"f5bf8db5-674d-4565-9f1a-26f4344616ba"},"status":"ok","message":"Annualize a return","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/cagr":{"get":{"operationId":"get_v1_cagr","tags":["Returns"],"summary":"Compound annual growth rate","description":"","parameters":[{"name":"begin_value","in":"query","required":true,"description":"Beginning value","schema":{"type":"string"},"example":"1000"},{"name":"end_value","in":"query","required":true,"description":"Ending value","schema":{"type":"string"},"example":"2000"},{"name":"years","in":"query","required":true,"description":"Number of years","schema":{"type":"string"},"example":"5"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"cagr":0.14869835,"note":"CAGR = (end/begin)^(1/years) − 1 — the smooth annual rate that compounds the start value to the end value. €1,000 → €2,000 over 5 years is ≈14.87 %/yr.","inputs":{"years":5,"end_value":2000,"begin_value":1000},"multiple":2,"cagr_percent":14.869835,"total_return":1,"total_return_percent":100},"meta":{"timestamp":"2026-06-05T19:50:25.539Z","request_id":"e095da69-bd5b-4a80-9d82-0b607afe2900"},"status":"ok","message":"Compound annual growth rate","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/doubling-time":{"get":{"operationId":"get_v1_doubling_time","tags":["Returns"],"summary":"Doubling time / Rule of 72","description":"","parameters":[{"name":"rate_percent","in":"query","required":true,"description":"Rate in percent (e.g. 8)","schema":{"type":"string"},"example":"8"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Doubling time: exact = ln2/ln(1+r). The Rule of 72 (72/rate%) is a handy estimate — at 8 % money doubles in about 9 years.","inputs":{"rate_percent":8},"rule_of_70":8.75,"rule_of_72":9,"exact_years":9.006468,"rule_of_69_3":8.6625},"meta":{"timestamp":"2026-06-05T19:50:25.654Z","request_id":"937563f2-9d53-465e-bb80-c78ec00d3ab5"},"status":"ok","message":"Doubling time","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/future-value":{"get":{"operationId":"get_v1_future_value","tags":["Returns"],"summary":"Lump-sum future value","description":"","parameters":[{"name":"present_value","in":"query","required":true,"description":"Present value","schema":{"type":"string"},"example":"1000"},{"name":"rate","in":"query","required":true,"description":"Rate per period (e.g. 0.07)","schema":{"type":"string"},"example":"0.07"},{"name":"periods","in":"query","required":true,"description":"Number of periods","schema":{"type":"string"},"example":"10"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Lump-sum compound growth FV = PV·(1+r)^n. €1,000 at 7 % for 10 periods grows to ≈€1,967.15.","growth":967.151357,"inputs":{"rate":0.07,"periods":10,"present_value":1000},"future_value":1967.151357},"meta":{"timestamp":"2026-06-05T19:50:25.757Z","request_id":"26cac6c9-1405-41b1-946d-d8ed2609af16"},"status":"ok","message":"Future value","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/present-value":{"get":{"operationId":"get_v1_present_value","tags":["Returns"],"summary":"Lump-sum present value","description":"","parameters":[{"name":"future_value","in":"query","required":true,"description":"Future value","schema":{"type":"string"},"example":"1967.15"},{"name":"rate","in":"query","required":true,"description":"Rate per period","schema":{"type":"string"},"example":"0.07"},{"name":"periods","in":"query","required":true,"description":"Number of periods","schema":{"type":"string"},"example":"10"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Lump-sum discounting PV = FV/(1+r)^n — what a future amount is worth today.","inputs":{"rate":0.07,"periods":10,"future_value":1967.15},"discount":967.15069,"present_value":999.99931},"meta":{"timestamp":"2026-06-05T19:50:25.841Z","request_id":"5239d4f8-846d-4dc4-8609-8a00e6c482b6"},"status":"ok","message":"Present value","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":"Rates as decimals (0.07 = 7 %) except doubling-time which takes rate_percent. Single-sum growth and return metrics; for level-payment loans use a loan API and for regular-deposit savings a savings API.","service":"cagr-api","endpoints":{"GET /v1/cagr":"Compound annual growth rate from begin/end value and years.","GET /v1/meta":"This document.","GET /v1/annualize":"Convert a total return over a span into an annual rate (or back).","GET /v1/future-value":"Lump-sum compound growth FV = PV·(1+r)^n.","GET /v1/doubling-time":"Exact doubling time and Rule-of-72/70/69.3 estimates.","GET /v1/present-value":"Discount a future lump sum PV = FV/(1+r)^n."},"description":"Investment growth and return: CAGR, lump-sum future/present value, annualizing a total return, and doubling time (Rule of 72)."},"meta":{"timestamp":"2026-06-05T19:50:25.902Z","request_id":"9d854386-f02f-4c5d-ab21-784bc0032ef8"},"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":6000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":580,"monthly_call_quota":60000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1650,"monthly_call_quota":270000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":4900,"monthly_call_quota":1500000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/cagr-api"}