{"openapi":"3.1.0","info":{"title":"Dollar-Cost Averaging API","version":"1.0.0","description":"Live dollar-cost-averaging analytics that investors run to see how periodic buying plays out — computed on demand from the price series you pass in, no key, nothing cached. Get the outcome of investing a fixed amount each period (total invested, units accumulated, average cost, current value, profit and ROI) with a lump-sum comparison; the per-period breakdown; and a ranking of dollar-cost averaging against lump-sum, best-case and worst-case timing. Works for any market — stocks, crypto, ETFs or forex. A dollar-cost-averaging engine, distinct from compound-interest and return-analysis tools: it turns a price path and a contribution into the cost basis and outcome of buying over time.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/dca-api","description":"oanor gateway"}],"tags":[{"name":"DCA"}],"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/calculate":{"get":{"operationId":"get_v1_calculate","tags":["DCA"],"summary":"DCA outcome + lump-sum comparison","description":"","parameters":[{"name":"prices","in":"query","required":true,"description":"Asset price at each buy, comma-separated oldest first","schema":{"type":"string"},"example":"100,95,110,90,105,120,115,100,130,125,140,135"},{"name":"contribution","in":"query","required":true,"description":"Cash invested each period","schema":{"type":"string"},"example":"100"},{"name":"fee_pct","in":"query","required":false,"description":"Fee percent per buy (default 0)","schema":{"type":"string"},"example":"0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"profit":251.57,"source":"DCA","winner":"lump_sum","fee_pct":0,"periods":12,"roi_pct":20.9642,"lump_sum":{"units":12,"value":1620,"profit":420,"roi_pct":35,"buy_price":100},"total_units":10.75237033,"average_cost":111.60329895,"current_price":135,"current_value":1451.57,"total_invested":1200,"dca_vs_lump_sum":-168.43,"contribution_per_period":100},"meta":{"timestamp":"2026-06-11T07:49:30.189Z","request_id":"4a67d026-c245-4cd0-abe8-9ab90139bcb5"},"status":"ok","message":"DCA calculated","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/compare":{"get":{"operationId":"get_v1_compare","tags":["DCA"],"summary":"DCA vs lump-sum vs best/worst-case timing","description":"","parameters":[{"name":"prices","in":"query","required":true,"description":"Asset price at each buy, comma-separated","schema":{"type":"string"},"example":"100,95,110,90,105,120,115,100,130,125,140,135"},{"name":"contribution","in":"query","required":true,"description":"Cash invested each period","schema":{"type":"string"},"example":"100"},{"name":"fee_pct","in":"query","required":false,"description":"Fee percent per buy (default 0)","schema":{"type":"string"},"example":"0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"best_case / worst_case = investing the whole sum at the lowest / highest price in the series (timing bounds).","source":"DCA","fee_pct":0,"periods":12,"ranking":["best_case","lump_sum","dca","worst_case"],"strategies":{"dca":{"units":10.75237033,"value":1451.57,"profit":251.57,"roi_pct":20.9642,"avg_cost":111.60329895},"lump_sum":{"units":12,"value":1620,"profit":420,"roi_pct":35,"buy_price":100},"best_case":{"units":13.33333333,"value":1800,"profit":600,"roi_pct":50,"buy_price":90},"worst_case":{"units":8.57142857,"value":1157.14,"profit":-42.86,"roi_pct":-3.5714,"buy_price":140}},"current_price":135,"total_invested":1200},"meta":{"timestamp":"2026-06-11T07:49:30.292Z","request_id":"25d5e019-c2c6-4b8a-af32-7d9e1a872a7d"},"status":"ok","message":"Strategies compared","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":["DCA"],"summary":"Service metadata and endpoint list","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"prices = the asset price at each buy, comma-separated oldest first. contribution = cash invested each period. fee_pct optional.","source":"Computed in-process from caller-supplied prices (no upstream)","service":"dca-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/compare":"DCA vs lump-sum vs best/worst-case timing (prices=..., contribution=100).","GET /v1/schedule":"Per-period breakdown (prices=..., contribution=100).","GET /v1/calculate":"DCA outcome + lump-sum comparison (prices=100,80,120,100, contribution=100)."},"description":"Live dollar-cost-averaging analytics computed on demand from a price series. The calculate endpoint returns the outcome of investing a fixed amount each period (total invested, units, average cost, current value, profit, ROI) with a lump-sum comparison; the schedule endpoint returns the per-period breakdown; the compare endpoint ranks dollar-cost averaging against lump-sum, best-case and worst-case timing. Computed live from your input, nothing stored — works for stocks, crypto, ETFs or forex. A dollar-cost-averaging engine, distinct from compound-interest and return-analysis tools.","upstream_status":"ok"},"meta":{"timestamp":"2026-06-11T07:49:30.387Z","request_id":"96af1ea3-b988-46d4-a6c8-6f6e1e4ede20"},"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"}}}},"/v1/schedule":{"get":{"operationId":"get_v1_schedule","tags":["DCA"],"summary":"Per-period DCA breakdown","description":"","parameters":[{"name":"prices","in":"query","required":true,"description":"Asset price at each buy, comma-separated","schema":{"type":"string"},"example":"100,95,110,90,105,120,115,100,130,125,140,135"},{"name":"contribution","in":"query","required":true,"description":"Cash invested each period","schema":{"type":"string"},"example":"100"},{"name":"fee_pct","in":"query","required":false,"description":"Fee percent per buy (default 0)","schema":{"type":"string"},"example":"0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"source":"DCA","fee_pct":0,"periods":12,"schedule":[{"price":100,"value":100,"period":1,"avg_cost":100,"units_bought":1,"cumulative_units":1,"cumulative_invested":100},{"price":95,"value":195,"period":2,"avg_cost":97.43589744,"units_bought":1.05263158,"cumulative_units":2.05263158,"cumulative_invested":200},{"price":110,"value":325.79,"period":3,"avg_cost":101.29240711,"units_bought":0.90909091,"cumulative_units":2.96172249,"cumulative_invested":300},{"price":90,"value":366.56,"period":4,"avg_cost":98.21172171,"units_bought":1.11111111,"cumulative_units":4.0728336,"cumulative_invested":400},{"price":105,"value":527.65,"period":5,"avg_cost":99.4982393,"units_bought":0.95238095,"cumulative_units":5.02521455,"cumulative_invested":500},{"price":120,"value":703.03,"period":6,"avg_cost":102.41445693,"units_bought":0.83333333,"cumulative_units":5.85854788,"cumulative_invested":600},{"price":115,"value":773.73,"period":7,"avg_cost":104.04105718,"units_bought":0.86956522,"cumulative_units":6.7281131,"cumulative_invested":700},{"price":100,"value":772.81,"period":8,"avg_cost":103.51815371,"units_bought":1,"cumulative_units":7.7281131,"cumulative_invested":800},{"price":130,"value":1104.65,"period":9,"avg_cost":105.91545001,"units_bought":0.76923077,"cumulative_units":8.49734387,"cumulative_invested":900},{"price":125,"value":1162.17,"period":10,"avg_cost":107.55760073,"units_bought":0.8,"cumulative_units":9.29734387,"cumulative_invested":1000},{"price":140,"value":1401.63,"period":11,"avg_cost":109.87222316,"units_bought":0.71428571,"cumulative_units":10.01162959,"cumulative_invested":1100},{"price":135,"value":1451.57,"period":12,"avg_cost":111.60329895,"units_bought":0.74074074,"cumulative_units":10.75237033,"cumulative_invested":1200}],"contribution_per_period":100},"meta":{"timestamp":"2026-06-11T07:49:30.486Z","request_id":"9981ad7a-dd25-46ed-9f61-1997de51b1fa"},"status":"ok","message":"Schedule computed","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":5550,"rps_limit":3,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":575,"monthly_call_quota":123000,"rps_limit":12,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1620,"monthly_call_quota":578000,"rps_limit":30,"hard_limit":true},{"slug":"business","name":"Business","price_cents_month":3920,"monthly_call_quota":3430000,"rps_limit":60,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/dca-api"}