{"openapi":"3.1.0","info":{"title":"Investment Return API","version":"1.0.0","description":"Investment return analysis as an API, computed locally and deterministically. The cagr endpoint computes the compound annual growth rate, (end/begin)^(1/years) − 1 — the single constant yearly rate that turns a starting value into an ending value — along with the total return and growth multiple, or runs the other way to project an ending value from a CAGR. The doubling endpoint gives how long an investment takes to double at a given rate, both the exact figure ln(2)/ln(1+r) and the quick Rule-of-72, -70 and -69.3 estimates, or inverts it to the rate needed to double within a target time. The real-return endpoint applies the Fisher equation, real = (1+nominal)/(1+inflation) − 1, to strip inflation out of a headline return — or works backwards to the nominal return needed for a target real return — showing how the rough nominal-minus-inflation shortcut drifts at higher rates. Everything is computed locally and deterministically, so it is instant and private. Ideal for fintech, robo-advisor, portfolio and personal-finance app developers, return and retirement calculators, and finance education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This analyses a lump-sum return; for regular-deposit savings projections use a savings API and for loan amortization a loan API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/investment-api","description":"oanor gateway"}],"tags":[{"name":"Investment"},{"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/cagr":{"get":{"operationId":"get_v1_cagr","tags":["Investment"],"summary":"Compound annual growth rate","description":"","parameters":[{"name":"begin_value","in":"query","required":true,"description":"Beginning value","schema":{"type":"string"},"example":"10000"},{"name":"years","in":"query","required":true,"description":"Number of years","schema":{"type":"string"},"example":"7"},{"name":"end_value","in":"query","required":false,"description":"Ending value (for the CAGR)","schema":{"type":"string"},"example":"20000"},{"name":"cagr","in":"query","required":false,"description":"Or a CAGR % to project the end value","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"CAGR = (end/begin)^(1/years) − 1: the constant annual rate that turns the begin value into the end value.","inputs":{"years":7,"end_value":20000,"begin_value":10000},"cagr_pct":10.408951,"total_return_pct":100,"total_growth_multiple":2},"meta":{"timestamp":"2026-06-04T18:38:08.453Z","request_id":"0ba57741-d64c-4ff5-bbb5-090085a4bc33"},"status":"ok","message":"CAGR","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":{"get":{"operationId":"get_v1_doubling","tags":["Investment"],"summary":"Doubling time","description":"","parameters":[{"name":"rate","in":"query","required":false,"description":"Annual rate (%) for doubling time","schema":{"type":"string"},"example":"8"},{"name":"years","in":"query","required":false,"description":"Or target years for the rate to double","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Exact doubling time = ln(2)/ln(1+r). The Rule of 72 (72/rate%) is a quick mental estimate.","inputs":{"rate_pct":8},"rule_of_70_years":8.75,"rule_of_72_years":9,"rule_of_69_3_years":8.6625,"exact_doubling_years":9.006468},"meta":{"timestamp":"2026-06-04T18:38:08.556Z","request_id":"5e3dac9e-ce7a-4ddc-90bb-b36a0c7d4095"},"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/real-return":{"get":{"operationId":"get_v1_real_return","tags":["Investment"],"summary":"Inflation-adjusted return","description":"","parameters":[{"name":"inflation","in":"query","required":true,"description":"Inflation rate (%)","schema":{"type":"string"},"example":"3"},{"name":"nominal","in":"query","required":false,"description":"Nominal return (%)","schema":{"type":"string"},"example":"7"},{"name":"real","in":"query","required":false,"description":"Or a target real return (%)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Fisher equation: real = (1 + nominal)/(1 + inflation) − 1. The rough subtraction (nominal − inflation) drifts at higher rates.","inputs":{"nominal_pct":7,"inflation_pct":3},"real_return_pct":3.883495,"approx_real_return_pct":4},"meta":{"timestamp":"2026-06-04T18:38:08.626Z","request_id":"529513e9-ac89-4667-abbb-d0f67105bce0"},"status":"ok","message":"Real 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/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 and returns in percent; values in any single currency. Analyses a lump-sum return — for regular-deposit projections use a savings API and for loan amortization a loan API.","service":"investment-api","formulae":{"cagr":"(end/begin)^(1/years) − 1","rule_of_72":"72 / rate%","fisher_real":"(1+nominal)/(1+inflation) − 1","doubling_exact":"ln(2)/ln(1+r)"},"endpoints":{"GET /v1/cagr":"CAGR from a begin/end value, or project an ending value from a CAGR.","GET /v1/meta":"This document.","GET /v1/doubling":"Doubling time from a rate, or the rate needed to double in a given time.","GET /v1/real-return":"Inflation-adjusted real return (or the nominal return for a target real return)."},"description":"Investment return analysis: compound annual growth rate (CAGR), doubling time (Rule of 72 and the exact figure), and inflation-adjusted real return via the Fisher equation."},"meta":{"timestamp":"2026-06-04T18:38:08.699Z","request_id":"0880db31-2c67-4535-86f8-832c60d99675"},"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":2000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1500,"monthly_call_quota":40000,"rps_limit":5,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3900,"monthly_call_quota":250000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":11900,"monthly_call_quota":1537000,"rps_limit":60,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/investment-api"}