{"openapi":"3.1.0","info":{"title":"Savings Goal API","version":"1.0.0","description":"Personal-savings planning maths as an API, computed locally and deterministically. The future endpoint computes the future value of regular saving — FV = initial·(1+r)^n + deposit·((1+r)^n − 1)/r with the rate compounded monthly — and breaks it into the total you put in and the interest earned. The goal endpoint works backwards: the monthly deposit needed to reach a target by a date, (target − initial·(1+r)^n)·r / ((1+r)^n − 1), and tells you when an initial sum already grows to the target by itself. The emergency endpoint sizes an emergency fund as a number of months of expenses (3–6 is the usual advice), reports the shortfall against current savings and, with a monthly saving amount, how many months it takes to get there. Everything is computed locally and deterministically, so it is instant and private. Ideal for personal-finance, budgeting and fintech app developers, savings-goal and money-coaching tools, and banking dashboards. Pure local computation — no key, no third-party service, instant. Live, nothing stored. Estimates, not financial advice. 3 endpoints. This is savings planning; for loans and mortgages use a loan API and for NPV/IRR use a finance-calc API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/savings-api","description":"oanor gateway"}],"tags":[{"name":"Savings"},{"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/emergency":{"get":{"operationId":"get_v1_emergency","tags":["Savings"],"summary":"Emergency fund","description":"","parameters":[{"name":"monthly_expenses","in":"query","required":true,"description":"Monthly expenses","schema":{"type":"string"},"example":"2000"},{"name":"months","in":"query","required":false,"description":"Months of cover (default 6)","schema":{"type":"string"},"example":"6"},{"name":"current_savings","in":"query","required":false,"description":"Current savings (default 0)","schema":{"type":"string"},"example":"3000"},{"name":"monthly_saving","in":"query","required":false,"description":"Monthly saving for time-to-reach","schema":{"type":"string"},"example":"500"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Target = months of expenses; most advice is 3–6 months. Months to reach = ceil(shortfall / monthly saving).","inputs":{"months":6,"current_savings":3000,"monthly_expenses":2000},"shortfall":9000,"target_fund":12000,"funded_percent":25,"months_to_reach":18},"meta":{"timestamp":"2026-06-04T18:38:15.728Z","request_id":"9df43df9-54a8-41b4-be00-df9c406fc5ae"},"status":"ok","message":"Emergency fund","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":{"get":{"operationId":"get_v1_future","tags":["Savings"],"summary":"Future value of savings","description":"","parameters":[{"name":"monthly_deposit","in":"query","required":false,"description":"Monthly deposit (default 0)","schema":{"type":"string"},"example":"200"},{"name":"initial","in":"query","required":false,"description":"Initial amount (default 0)","schema":{"type":"string"},"example":"1000"},{"name":"annual_rate","in":"query","required":false,"description":"Annual interest rate (%, default 0)","schema":{"type":"string"},"example":"5"},{"name":"years","in":"query","required":true,"description":"Years","schema":{"type":"string"},"example":"10"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"FV = initial·(1+r)^n + deposit·((1+r)^n − 1)/r, with r the monthly rate and n the number of months.","inputs":{"years":10,"initial":1000,"annual_rate":5,"monthly_deposit":200},"months":120,"future_value":32703.47,"interest_earned":7703.47,"total_contributions":25000},"meta":{"timestamp":"2026-06-04T18:38:15.846Z","request_id":"4d233409-e267-4c78-afd6-ba607e96de34"},"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/goal":{"get":{"operationId":"get_v1_goal","tags":["Savings"],"summary":"Deposit to reach a goal","description":"","parameters":[{"name":"target","in":"query","required":true,"description":"Savings target","schema":{"type":"string"},"example":"50000"},{"name":"initial","in":"query","required":false,"description":"Initial amount (default 0)","schema":{"type":"string"},"example":"1000"},{"name":"annual_rate","in":"query","required":false,"description":"Annual interest rate (%, default 0)","schema":{"type":"string"},"example":"5"},{"name":"years","in":"query","required":true,"description":"Years to reach it","schema":{"type":"string"},"example":"10"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Required deposit = (target − initial·(1+r)^n)·r / ((1+r)^n − 1).","inputs":{"years":10,"target":50000,"initial":1000,"annual_rate":5},"monthly_deposit":311.39,"projected_interest":11633.48,"total_contributions":38366.52},"meta":{"timestamp":"2026-06-04T18:38:15.960Z","request_id":"70a335d3-9530-473e-96ff-8795c8af1a64"},"status":"ok","message":"Goal deposit","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":"Money in any currency, annual_rate as a percentage, compounded monthly. Deposits assumed at period end (ordinary annuity). Estimates — not financial advice.","service":"savings-api","formulae":{"goal":"PMT = (target − P·(1+r)^n)·r / ((1+r)^n − 1)","emergency":"target = months × monthly_expenses","future_value":"FV = P·(1+r)^n + PMT·((1+r)^n − 1)/r"},"endpoints":{"GET /v1/goal":"Monthly deposit needed to reach a savings target by a date.","GET /v1/meta":"This document.","GET /v1/future":"Future value of an initial sum plus monthly deposits at an interest rate.","GET /v1/emergency":"Emergency-fund target and the time to reach it."},"description":"Personal-savings goal calculator: future value of regular savings, the monthly deposit to reach a target, and emergency-fund planning."},"meta":{"timestamp":"2026-06-04T18:38:16.066Z","request_id":"1b66ba42-8d43-4fd9-bf0e-0e5bcb4acb73"},"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":3000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1300,"monthly_call_quota":40000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3400,"monthly_call_quota":250000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":10900,"monthly_call_quota":2000000,"rps_limit":60,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/savings-api"}