Catalog/cryptocalc-dca-returns

Calculators

Dollar-cost-averaging returns calculator API

Compute DCA outcomes from fixed periodic buys: tokens = Σ contribution/price, avgCost = invested/tokens, ROI = (value−invested)/invested at a final price. Deterministic accumulation math. Answers 'what's my DCA average cost','return from buying $100/week','DCA profit at todays price'.

Price$0.01per request
MethodPOST
Route/v1/calc/cryptocalc-dca-returns
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calccryptodcareturnsroiinvestingaverage-costtrading
API URLhttps://x402.hexl.dev/v1/calc/cryptocalc-dca-returns
Integration docs
Example request
{
  "contribution": 100,
  "prices": [
    40000,
    35000,
    30000,
    38000
  ],
  "finalPrice": 45000
}
Example response
{
  "formula": "tokens = Σ contribution/price; avgCost = invested/tokens; ROI = (value−invested)/invested",
  "periods": 4,
  "totalInvested": 400,
  "totalTokens": 0.01132206,
  "averageCost": 35329.27504151,
  "finalPrice": 45000,
  "currentValue": 509.4925,
  "profit": 109.4925,
  "roiPct": 27.3731,
  "interpretation": "in-profit"
}
Input schema
{
  "type": "object",
  "required": [
    "contribution",
    "prices"
  ],
  "properties": {
    "contribution": {
      "type": "number",
      "description": "amount bought each period (USD)",
      "examples": [
        100
      ]
    },
    "prices": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "buy price each period",
      "examples": [
        [
          40000,
          35000,
          30000,
          38000
        ]
      ]
    },
    "finalPrice": {
      "type": "number",
      "description": "valuation price (defaults to last)",
      "examples": [
        45000
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}