@numeratica/sdk
v1.0.0
Published
Official TypeScript SDK for the Numeratica financial-planning API — generated from the OpenAPI spec.
Maintainers
Readme
@numeratica/sdk
Official TypeScript SDK for the Numeratica financial-planning API — retirement Monte Carlo, taxes, RMDs, Social Security, Roth conversions, and more. Fully typed, generated from the OpenAPI spec (never hand-written), so it never drifts from the API.
Get a free API key at docs.numeratica.com.
Install
npm install @numeratica/sdkUse
import { configure, retirementMonteCarlo, taxEstimate } from "@numeratica/sdk";
configure({ apiKey: process.env.NUMERATICA_API_KEY! }); // once
const { data } = await retirementMonteCarlo({
body: {
current_age: 40, retirement_age: 65, end_age: 95,
current_balance: 500000, annual_contribution: 30000, annual_spending: 60000,
expected_return: 0.06, return_volatility: 0.12,
},
});
console.log(data?.result.success_probability, data?.result_id);Every operation is a typed function named from the endpoint's operationId
(tvm, taxEstimate, retirementMonteCarlo, medicareIrmaa, …). Instead of
configure() you can pass auth per call: taxEstimate({ body, auth: key }).
- Node ≥ 18 (uses the built-in
fetch). - One small runtime dependency:
@hey-api/client-fetch. - Base URL defaults to
https://api.numeratica.com; override withconfigure({ apiKey, baseUrl }).
Notes
The src/generated/ directory is produced from api/openapi.yaml
(make sdk-ts in the main repo) and must not be edited by hand. Docs &
reference: https://docs.numeratica.com.
MIT © Numeratica / Francis Townsend-Merino
