The Engine. No black box.

Same simulator the website runs. Hit it from your app, Slack bot, AI agent, or Jupyter notebook. INR, India tax, CORS open, no auth on the public endpoint. Fork the swarm.

Low Latency Modeling

Our engine calculates 1,000+ data points across 60+ years of a life cycle in under 50ms, allowing for smooth, reactive UIs in your applications.

Public
No Auth
CORS Open

Free Public Endpoint (for AI agents & devs)

Built for AI agents (ChatGPT custom tools, Claude Projects, MCP servers, browsing models) and indie developers who want to call the simulator with zero setup. Stateless, idempotent, runs on Vercel Edge — typical response in 50–150 ms. INR-denominated, India tax rules. No API key, no signup. Be polite: cache identical requests, batch where you can.

GET
https://cockroachmoney.in/api/v1/calculate
# Quick GET (flat query params, single portfolio)
curl 'https://cockroachmoney.in/api/v1/calculate?currentAgeYears=30&retirementAgeYears=60&monthlyExpense=50000&currentCorpus=500000&monthlyContribution=20000'
POST
https://cockroachmoney.in/api/v1/calculate— full LifeCycleInput JSON for multi-portfolio / milestones / tax modelling
curl -X POST 'https://cockroachmoney.in/api/v1/calculate' \
  -H 'Content-Type: application/json' \
  -d '{
    "currentYear": 2026,
    "currentAgeYears": 32,
    "retirementAgeYears": 55,
    "planningEndAgeYears": 90,
    "annualInflationRatePct": 6,
    "currentCorpus": 5000000,
    "expenses": [{ "label": "Living", "currentMonthlyAmount": 100000 }],
    "milestones": [],
    "investments": [{
      "label": "Equity MFs",
      "initialCorpus": 5000000,
      "initialMonthlyContribution": 80000,
      "expectedAnnualReturnRatePct": 13,
      "annualStepUpRatePct": 8
    }],
    "investmentPlan": { "initialMonthlyContribution": 80000, "annualStepUpRatePct": 8, "expectedAnnualReturnRatePct": 13 },
    "retirementPlan": { "initialMonthlyWithdrawal": 150000, "annualWithdrawalStepUpRatePct": 6, "expectedAnnualReturnRatePct": 8 }
  }'

# Response: { input, summary: { finalCorpus, corpusWentToZero, ... },
#             timeSeries: [{ ageYears, corpus, ... }, ...],
#             meta: { docs, methodology, version, currency, generatedAt } }

Methodology

Year-by-year simulation, monthly compounding, optional Indian tax module (LTCG, 80C, slab-based income tax).

Read the methodology →

Need higher volume?

The Enterprise tier (covered below) offers higher per-minute limits, white-label embeds, and dedicated support.

See Enterprise tier ↓

Authentication

We offer two tiers of access to our API:

Freemium Tier

No API key required. Perfect for development, sandboxing, and small-scale prototypes.

Open Access

Enterprise Tier

Requires an `X-API-Key` header. Includes higher limits, custom branding logic, and dedicated support.

Key Required

Rate Limits

To ensure platform stability, we enforce rate limits based on your tier.

TierLimitWindow
Freemium5 requests1 Minute
Growth1,000 requests1 Minute
EnterpriseUnlimited*Custom
POST
/api/public/simulate

Run Lifecycle Simulation

The core endpoint for calculating a full financial roadmap. Returns summary stats and monthly time-series data.

Request Body (JSON)

  • currentAgeYears

    number

    Current age of the subject.

    Required
  • retirementAgeYears

    number

    Target age for retirement.

    Required
  • planningEndAgeYears

    number

    Age at which simulation ends (e.g. 90).

    Required
  • expenses

    array

    Array of Expense objects.

    Required
  • investmentPlan

    object

    Contribution and return assumptions.

    Required
  • retirementPlan

    object

    Withdrawal assumptions.

    Required

Implementation Example

fetch('https://api.cockroachmoney.in/api/public/simulate', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    currentAgeYears: 30,
    retirementAgeYears: 60,
    planningEndAgeYears: 90,
    annualInflationRatePct: 6,
    currentCorpus: 5000000,
    expenses: [
      { label: "Living", currentMonthlyAmount: 50000 }
    ],
    investmentPlan: {
      initialMonthlyContribution: 20000,
      annualStepUpRatePct: 10,
      expectedAnnualReturnRatePct: 12
    },
    retirementPlan: {
      initialMonthlyWithdrawal: 100000,
      annualWithdrawalStepUpRatePct: 6,
      expectedAnnualReturnRatePct: 8
    }
  })
}).then(res => res.json())
  .then(data => console.log(data.summary));

Tip: Always validate inputs on your end to ensure ages are between 1 and 120, and all currency values are non-negative.

TypeScript / JavaScript SDK

The official @cockroachmoney/sdk package wraps the REST API with full TypeScript types.

Install

npm install @cockroachmoney/sdk
# or
yarn add @cockroachmoney/sdk

Quick Start

import { CockroachMoneyClient } from '@cockroachmoney/sdk';

const client = new CockroachMoneyClient({ apiKey: 'YOUR_API_KEY' });

const result = await client.simulate({
  currentAgeYears: 30,
  retirementAgeYears: 60,
  planningEndAgeYears: 85,
  currentYear: 2025,
  annualInflationRatePct: 6,
  currentCorpus: 500000,
  expenses: [{ label: 'Living', currentMonthlyAmount: 50000 }],
  investments: [{
    label: 'Mutual Funds',
    initialCorpus: 500000,
    initialMonthlyContribution: 15000,
    annualStepUpRatePct: 10,
    expectedAnnualReturnRatePct: 12,
  }],
  investmentPlan: { initialMonthlyContribution: 15000, annualStepUpRatePct: 10, expectedAnnualReturnRatePct: 12 },
  retirementPlan: { initialMonthlyWithdrawal: 80000, annualWithdrawalStepUpRatePct: 6, expectedAnnualReturnRatePct: 8 },
});

console.log('Final corpus:', result.summary.finalCorpus);
console.log('Safe plan:', !result.summary.corpusWentToZero);

Full TypeScript types are included. No configuration required beyond your API key.

Ready for Enterprise Scale?

If your application requires higher throughput, dedicated infrastructure, or direct engineering support, our institutional team is ready to help.