Skip to content

Financial Hub · Calculation

Financial Hub historical snapshot

Build a dated, single-currency snapshot from supplied account histories, effective cash-flow streams and goal balances.

Open Financial Hub in HT Calc

Visitors can explore a sample snapshot. Saved accounts, loans and properties open within the member’s own Financial Hub.

Example result · asOfDate: 2026-03-01 See output

Cost per success
1 calculation credit
Production plans
Standard, Business, Scale, Enterprise
Plan allowances
Free sandbox
Not available

Integration example

Make a request

Use a production key scoped to financial-hub-historical-snapshot.

Keep the key on your server. A successful call uses 1 calculation credit.

Production request

Set HT_PRODUCTION_KEY on your server. Save as example.mjs and run node example.mjs with Node.js 18 or later.

import { randomUUID } from "node:crypto";

const key = process.env.HT_PRODUCTION_KEY;
if (!key) throw new Error("Set HT_PRODUCTION_KEY on your server.");
const endpoint = "https://calc.hasstechapi.com/v2/calc/financial-hub-historical-snapshot";
const input = {
  "asOfDate": "2026-03-01",
  "currency": "USD",
  "ledgers": [
    {
      "account": {
        "id": "cash",
        "accountClass": "asset",
        "accountType": "checking",
        "calculationModel": "observed_value",
        "ownershipPercentage": 50
      },
      "observations": [
        {
          "id": "orig",
          "observedOn": "2026-01-01",
          "value": 10,
          "valueKind": "verified"
        },
        {
          "id": "fix",
          "observedOn": "2026-01-01",
          "value": 500,
          "valueKind": "verified",
          "supersedesId": "orig"
        }
      ],
      "events": [
        {
          "occurredOn": "2026-02-02",
          "eventType": "fee",
          "amount": 3,
          "idempotencyKey": "fee-Feb"
        },
        {
          "occurredOn": "2026-02-02",
          "eventType": "fee",
          "amount": 3,
          "idempotencyKey": "fee-Feb"
        },
        {
          "occurredOn": "2026-02-28",
          "eventType": "withdrawal",
          "amount": 50,
          "idempotencyKey": "transfer"
        }
      ]
    },
    {
      "account": {
        "id": "loan",
        "accountClass": "liability",
        "accountType": "auto_loan",
        "calculationModel": "fixed_amortizing",
        "ownershipPercentage": 100
      },
      "observations": [
        {
          "id": "a",
          "observedOn": "2026-01-01",
          "value": 1000,
          "valueKind": "verified"
        }
      ],
      "terms": [
        {
          "version": 1,
          "effectiveFrom": "2026-01-01",
          "rateType": "fixed",
          "annualRate": 12,
          "paymentFrequency": "monthly",
          "scheduledPayment": 100,
          "dueDay": 1
        }
      ],
      "events": [
        {
          "occurredOn": "2026-02-01",
          "eventType": "missed_payment",
          "idempotencyKey": "missed-Feb"
        }
      ]
    }
  ],
  "cashFlows": [
    {
      "key": "wage",
      "version": 1,
      "effectiveFrom": "2026-01-01",
      "streamType": "income",
      "amount": 50,
      "cadence": "weekly",
      "valueKind": "verified"
    },
    {
      "key": "wage",
      "version": 2,
      "effectiveFrom": "2026-03-01",
      "streamType": "income",
      "amount": 60,
      "cadence": "weekly",
      "valueKind": "verified"
    },
    {
      "key": "wage",
      "version": 3,
      "effectiveFrom": "2026-04-01",
      "streamType": "income",
      "amount": 90,
      "cadence": "weekly",
      "valueKind": "verified"
    },
    {
      "key": "rent",
      "version": 1,
      "effectiveFrom": "2026-01-01",
      "streamType": "obligation",
      "amount": 40,
      "cadence": "semimonthly",
      "valueKind": "estimated"
    },
    {
      "key": "ignored",
      "version": 1,
      "effectiveFrom": "2026-01-01",
      "streamType": "income",
      "amount": 100,
      "cadence": "monthly",
      "valueKind": "estimated"
    },
    {
      "key": "ignored",
      "version": 2,
      "effectiveFrom": "2026-02-01",
      "streamType": "income",
      "amount": 120,
      "cadence": "monthly",
      "valueKind": "estimated",
      "pending": true
    }
  ],
  "goals": [
    {
      "key": "goal",
      "status": "active",
      "fundedAmount": 120
    },
    {
      "key": "closed",
      "status": "closed",
      "fundedAmount": 20
    }
  ]
};
const requestId = process.env.HT_REQUEST_ID || Date.now() + "." + randomUUID();
// Keep this ID to look up usage if the connection is interrupted.
console.error("Usage lookup ID:", requestId);

const response = await fetch(endpoint, {
  method: "POST",
  redirect: "error",
  headers: {
    "Authorization": "Bearer " + key,
    "Content-Type": "application/json",
    "Idempotency-Key": requestId
  },
  body: JSON.stringify(input)
});
if (!response.ok) {
  const problem = await response.json().catch(() => null);
  const code = problem?.error?.code || response.statusText;
  const delay = response.headers.get("retry-after");
  if (delay) console.error("Retry-After (seconds):", delay);
  console.error("HTTP " + response.status + " " + code + ". Usage lookup ID: " + requestId);
  if (Array.isArray(problem?.error?.details)) {
    for (const issue of problem.error.details) console.error("Input issue:", JSON.stringify(issue));
  }
  process.exitCode = 1;
} else {
  console.log(JSON.stringify(await response.json(), null, 2));
}
cURL (shell)

Set HT_PRODUCTION_KEY on your server. Run in a POSIX shell with cURL 7.76+ and Python 3.7+ to create a request ID.

(
  set -eu
  : "${HT_PRODUCTION_KEY:?Set HT_PRODUCTION_KEY on your server}"
  request_id="${HT_REQUEST_ID:-}"
  if [ -z "$request_id" ]; then
    request_id=$(python3 -c 'import time, uuid; print(str(time.time_ns() // 1000000) + "." + str(uuid.uuid4()))')
  fi
  printf 'Usage lookup ID: %s\n' "$request_id" >&2
  # On INVALID_INPUT, read error.details in the JSON response body.
  curl --disable --silent --show-error --fail-with-body --include \
    --request POST 'https://calc.hasstechapi.com/v2/calc/financial-hub-historical-snapshot' \
    --header "Authorization: Bearer $HT_PRODUCTION_KEY" \
    --header 'Content-Type: application/json' \
    --header "Idempotency-Key: $request_id" \
    --data-binary @- <<'HT_INPUT'
{
  "asOfDate": "2026-03-01",
  "currency": "USD",
  "ledgers": [
    {
      "account": {
        "id": "cash",
        "accountClass": "asset",
        "accountType": "checking",
        "calculationModel": "observed_value",
        "ownershipPercentage": 50
      },
      "observations": [
        {
          "id": "orig",
          "observedOn": "2026-01-01",
          "value": 10,
          "valueKind": "verified"
        },
        {
          "id": "fix",
          "observedOn": "2026-01-01",
          "value": 500,
          "valueKind": "verified",
          "supersedesId": "orig"
        }
      ],
      "events": [
        {
          "occurredOn": "2026-02-02",
          "eventType": "fee",
          "amount": 3,
          "idempotencyKey": "fee-Feb"
        },
        {
          "occurredOn": "2026-02-02",
          "eventType": "fee",
          "amount": 3,
          "idempotencyKey": "fee-Feb"
        },
        {
          "occurredOn": "2026-02-28",
          "eventType": "withdrawal",
          "amount": 50,
          "idempotencyKey": "transfer"
        }
      ]
    },
    {
      "account": {
        "id": "loan",
        "accountClass": "liability",
        "accountType": "auto_loan",
        "calculationModel": "fixed_amortizing",
        "ownershipPercentage": 100
      },
      "observations": [
        {
          "id": "a",
          "observedOn": "2026-01-01",
          "value": 1000,
          "valueKind": "verified"
        }
      ],
      "terms": [
        {
          "version": 1,
          "effectiveFrom": "2026-01-01",
          "rateType": "fixed",
          "annualRate": 12,
          "paymentFrequency": "monthly",
          "scheduledPayment": 100,
          "dueDay": 1
        }
      ],
      "events": [
        {
          "occurredOn": "2026-02-01",
          "eventType": "missed_payment",
          "idempotencyKey": "missed-Feb"
        }
      ]
    }
  ],
  "cashFlows": [
    {
      "key": "wage",
      "version": 1,
      "effectiveFrom": "2026-01-01",
      "streamType": "income",
      "amount": 50,
      "cadence": "weekly",
      "valueKind": "verified"
    },
    {
      "key": "wage",
      "version": 2,
      "effectiveFrom": "2026-03-01",
      "streamType": "income",
      "amount": 60,
      "cadence": "weekly",
      "valueKind": "verified"
    },
    {
      "key": "wage",
      "version": 3,
      "effectiveFrom": "2026-04-01",
      "streamType": "income",
      "amount": 90,
      "cadence": "weekly",
      "valueKind": "verified"
    },
    {
      "key": "rent",
      "version": 1,
      "effectiveFrom": "2026-01-01",
      "streamType": "obligation",
      "amount": 40,
      "cadence": "semimonthly",
      "valueKind": "estimated"
    },
    {
      "key": "ignored",
      "version": 1,
      "effectiveFrom": "2026-01-01",
      "streamType": "income",
      "amount": 100,
      "cadence": "monthly",
      "valueKind": "estimated"
    },
    {
      "key": "ignored",
      "version": 2,
      "effectiveFrom": "2026-02-01",
      "streamType": "income",
      "amount": 120,
      "cadence": "monthly",
      "valueKind": "estimated",
      "pending": true
    }
  ],
  "goals": [
    {
      "key": "goal",
      "status": "active",
      "fundedAmount": 120
    },
    {
      "key": "closed",
      "status": "closed",
      "fundedAmount": 20
    }
  ]
}
HT_INPUT
)
If your request fails
400 INVALID_INPUT

Read error.details when present. Node prints each issue. cURL returns the JSON body. Each path points into your request. An empty path refers to the whole body.

Check the accepted inputs for required fields, units and ranges. Send the corrected JSON as a new request.

401 or 403
Check that the server has the bearer key for the endpoint’s environment and that the key includes financial-hub-historical-snapshot.
429
Read the service error code, check your allowance, and wait for the Retry-After interval when supplied before trying again.
Lost response, 409 or 503
Open Request lookup, select the same environment and enter the printed usage lookup ID. A settled ID has already consumed credits. To retry the same calculation, set HT_REQUEST_ID to the original ID and reuse the same inputs. A settled request does not return its result again. Unset the variable for a new request, which can consume credits.

The usage lookup ID is the Idempotency-Key your server sends. The response’s x-request-id identifies the HTTP exchange for support.

Output

Example result

These values come from running this operation on the example inputs.

asOfDate
2026-03-01
currency
USD
netWorth
-696.6

Result warnings

  • This account is refresh due and should be refreshed.
  • A missed scheduled payment caused unpaid interest to be added to the balance.
How to interpret this result
  • Use goal balances as known on the requested date. Each account needs an eligible observation. Weekly 52/12 and biweekly 26/12 convert periodic cash flows to monthly amounts.
Full example response (JSON)
{
  "status": "available",
  "result": {
    "asOfDate": "2026-03-01",
    "currency": "USD",
    "netWorth": -696.6,
    "assets": 223.5,
    "liabilities": 920.1,
    "liquidity": 223.5,
    "monthlyIncome": 260,
    "monthlyObligations": 80,
    "goalFunding": 120,
    "engineVersion": "trusted-financial-twin-v1",
    "lines": [
      {
        "accountId": "cash",
        "lineType": "asset",
        "label": "cash",
        "amount": 223.5,
        "currency": "USD",
        "valueKind": "projected",
        "freshness": "refresh_due",
        "asOfDate": "2026-02-28",
        "source": "manual",
        "termVersion": null,
        "assumptions": [
          {
            "code": "observation_anchor",
            "message": "Started from the verified value dated 2026-01-01.",
            "source": "observation"
          }
        ],
        "warnings": [
          {
            "code": "refresh_required",
            "message": "This account is refresh due and should be refreshed."
          }
        ]
      },
      {
        "accountId": "loan",
        "lineType": "liability",
        "label": "loan",
        "amount": 920.1,
        "currency": "USD",
        "valueKind": "projected",
        "freshness": "current",
        "asOfDate": "2026-03-01",
        "source": "manual",
        "termVersion": 1,
        "assumptions": [
          {
            "code": "observation_anchor",
            "message": "Started from the verified value dated 2026-01-01.",
            "source": "observation"
          },
          {
            "code": "effective_terms",
            "message": "Used confirmed term version 1, effective 2026-01-01.",
            "source": "term"
          }
        ],
        "warnings": [
          {
            "code": "negative_amortization",
            "message": "A missed scheduled payment caused unpaid interest to be added to the balance."
          }
        ]
      },
      {
        "lineType": "income",
        "label": "wage",
        "amount": 260,
        "currency": "USD",
        "valueKind": "verified",
        "freshness": "current",
        "asOfDate": "2026-03-01",
        "source": "manual",
        "termVersion": null,
        "assumptions": [],
        "warnings": []
      },
      {
        "lineType": "obligation",
        "label": "rent",
        "amount": 80,
        "currency": "USD",
        "valueKind": "estimated",
        "freshness": "current",
        "asOfDate": "2026-01-01",
        "source": "manual",
        "termVersion": null,
        "assumptions": [],
        "warnings": []
      },
      {
        "lineType": "goal_funding",
        "label": "goal",
        "amount": 120,
        "currency": "USD",
        "valueKind": "verified",
        "freshness": "current",
        "asOfDate": "2026-03-01",
        "source": "goal",
        "termVersion": null,
        "assumptions": [],
        "warnings": []
      }
    ]
  },
  "formulaVersion": "financial-hub-historical-snapshot-v1",
  "units": {
    "money": "currency major units"
  },
  "assumptions": [
    "Use goal balances as known on the requested date. Each account needs an eligible observation. Weekly 52/12 and biweekly 26/12 convert periodic cash flows to monthly amounts."
  ],
  "warnings": [
    "This account is refresh due and should be refreshed.",
    "A missed scheduled payment caused unpaid interest to be added to the balance."
  ],
  "creditCost": 1
}

Request contract

Accepted inputs

Fields for this example. Expand the schema for all supported combinations and limits.

FieldType, units and limits

asOfDateRequired
string

UTC calendar date (YYYY-MM-DD), 1900–2199.

Format: date · Min length 10 · Max length 10
currencyRequired
string

One supported currency per request. The app rounds JPY to 0 decimals, BHD/JOD/KWD/OMR to 3 and the remaining supported codes to 2. No FX conversion.

Allowed: "USD", "CAD", "EUR", "GBP", "AUD", "NZD", "CHF", "CNY", "INR", "BRL", "MXN", "JPY", "BHD", "JOD", "KWD", "OMR"
ledgersRequired
arrayMin items 0 · Max items 16
ledgers[].accountRequired
object

Caller supplies the model. Ownership defaults to 100%; used in the snapshot only.

ledgers[].account.idRequired
string

Caller-defined, nonidentifying key within this request.

Min length 1 · Max length 48
ledgers[].account.accountTypeRequired
stringAllowed: "credit_card", "mortgage", "auto_loan", "student_loan", "personal_loan", "loan", "heloc", "home_equity_loan", "checking", "savings", "cash", "investment", "retirement", "money_market", "cd", "crypto", "property", "vehicle", "collectible", "business_interest", "other"
ledgers[].account.accountClassRequired
stringAllowed: "asset", "liability"
ledgers[].account.calculationModelRequired
stringAllowed: "fixed_amortizing", "daily_interest", "adjustable_rate", "interest_only", "balloon", "revolving", "deposit", "investment", "cash_flow", "observed_value"
ledgers[].account.ownershipPercentageOptional
number

Percentage points from 0 through 100.

Min 0 · Max 100
ledgers[].observationsRequired
arrayMin items 1 · Max items 48
ledgers[].observations[].idRequired
string

Caller-defined, nonidentifying key within this request.

Min length 1 · Max length 48
ledgers[].observations[].observedOnRequired
string

UTC calendar date (YYYY-MM-DD), 1900–2199.

Format: date · Min length 10 · Max length 10
ledgers[].observations[].valueRequired
number

Nonnegative currency major units; smallest nonzero amount is 0.000001.

Min 0 · Max 1000000000000
ledgers[].observations[].valueKindRequired
stringAllowed: "verified", "estimated"
ledgers[].observations[].supersedesIdOptional
string

Caller-defined, nonidentifying key within this request.

Min length 1 · Max length 48
ledgers[].termsOptional
arrayMin items 0 · Max items 24
ledgers[].terms[].versionRequired
integer

Effective term revision number.

Min 1 · Max 100000
ledgers[].terms[].effectiveFromRequired
string

UTC calendar date (YYYY-MM-DD), 1900–2199.

Format: date · Min length 10 · Max length 10
ledgers[].terms[].effectiveToOptional
string

UTC calendar date (YYYY-MM-DD), 1900–2199.

Format: date · Min length 10 · Max length 10
ledgers[].terms[].rateTypeRequired
stringAllowed: "none", "fixed", "variable", "adjustable", "promotional"
ledgers[].terms[].rateBasisOptional
stringAllowed: "apr", "apy", "nominal"
ledgers[].terms[].annualRateOptional
number

Annual rate as percentage points (6.5 means 6.5%).

Min 0 · Max 100
ledgers[].terms[].interestConventionOptional
stringAllowed: "none", "daily_365", "daily_360", "monthly", "statement_cycle"
ledgers[].terms[].compoundingFrequencyOptional
stringAllowed: "none", "daily", "monthly", "quarterly", "semiannual", "annual"
ledgers[].terms[].paymentFrequencyOptional
stringAllowed: "weekly", "biweekly", "semimonthly", "monthly", "quarterly", "annual"
ledgers[].terms[].scheduledPaymentOptional
number

Nonnegative currency major units; smallest nonzero amount is 0.000001.

Min 0 · Max 1000000000000
ledgers[].terms[].minimumPaymentOptional
number

Nonnegative currency major units; smallest nonzero amount is 0.000001.

Min 0 · Max 1000000000000
ledgers[].terms[].maturityDateOptional
string

UTC calendar date (YYYY-MM-DD), 1900–2199.

Format: date · Min length 10 · Max length 10
ledgers[].terms[].dueDayOptional
integer

Day of month; clamped in short months.

Min 1 · Max 31
ledgers[].terms[].promotionalRateExpiresOnOptional
string

UTC calendar date (YYYY-MM-DD), 1900–2199.

Format: date · Min length 10 · Max length 10
ledgers[].terms[].armNextResetOnOptional
string

UTC calendar date (YYYY-MM-DD), 1900–2199.

Format: date · Min length 10 · Max length 10
ledgers[].terms[].interestOnlyUntilOptional
string

UTC calendar date (YYYY-MM-DD), 1900–2199.

Format: date · Min length 10 · Max length 10
ledgers[].eventsOptional
arrayMin items 0 · Max items 128
ledgers[].events[].idempotencyKeyRequired
string

Caller-defined, nonidentifying key within this request.

Min length 1 · Max length 48
ledgers[].events[].occurredOnRequired
string

UTC calendar date (YYYY-MM-DD), 1900–2199.

Format: date · Min length 10 · Max length 10
ledgers[].events[].eventTypeRequired
stringAllowed: "payment", "extra_payment", "missed_payment", "contribution", "withdrawal", "purchase", "fee", "rate_change", "payment_change", "capitalization", "correction"
ledgers[].events[].amountOptional
number

Signed amount in currency major units; a correction may decrease the balance.

Min -1000000000000 · Max 1000000000000
ledgers[].events[].newRateOptional
number

Annual rate as percentage points (6.5 means 6.5%).

Min 0 · Max 100
ledgers[].events[].newPaymentOptional
number

Nonnegative currency major units; smallest nonzero amount is 0.000001.

Min 0 · Max 1000000000000
cashFlowsOptional
arrayMin items 0 · Max items 128
cashFlows[].keyRequired
string

Caller-defined, nonidentifying key within this request.

Min length 1 · Max length 48
cashFlows[].versionRequired
integer

Logical cash-flow stream revision.

Min 1 · Max 100000
cashFlows[].effectiveFromRequired
string

UTC calendar date (YYYY-MM-DD), 1900–2199.

Format: date · Min length 10 · Max length 10
cashFlows[].effectiveToOptional
string

UTC calendar date (YYYY-MM-DD), 1900–2199.

Format: date · Min length 10 · Max length 10
cashFlows[].streamTypeRequired
stringAllowed: "income", "obligation"
cashFlows[].amountRequired
number

Nonnegative currency major units; smallest nonzero amount is 0.000001.

Min 0 · Max 1000000000000
cashFlows[].cadenceRequired
stringAllowed: "weekly", "biweekly", "semimonthly", "monthly", "quarterly", "annual", "variable"
cashFlows[].valueKindRequired
stringAllowed: "verified", "estimated"
cashFlows[].pendingOptional
boolean
goalsOptional
arrayMin items 0 · Max items 64
goals[].keyRequired
string

Caller-defined, nonidentifying key within this request.

Min length 1 · Max length 48
goals[].fundedAmountRequired
number

Nonnegative currency major units; smallest nonzero amount is 0.000001.

Min 0 · Max 1000000000000
goals[].statusRequired
stringAllowed: "active", "achieved", "closed", "paused"
Example request body (JSON)
{
  "asOfDate": "2026-03-01",
  "currency": "USD",
  "ledgers": [
    {
      "account": {
        "id": "cash",
        "accountClass": "asset",
        "accountType": "checking",
        "calculationModel": "observed_value",
        "ownershipPercentage": 50
      },
      "observations": [
        {
          "id": "orig",
          "observedOn": "2026-01-01",
          "value": 10,
          "valueKind": "verified"
        },
        {
          "id": "fix",
          "observedOn": "2026-01-01",
          "value": 500,
          "valueKind": "verified",
          "supersedesId": "orig"
        }
      ],
      "events": [
        {
          "occurredOn": "2026-02-02",
          "eventType": "fee",
          "amount": 3,
          "idempotencyKey": "fee-Feb"
        },
        {
          "occurredOn": "2026-02-02",
          "eventType": "fee",
          "amount": 3,
          "idempotencyKey": "fee-Feb"
        },
        {
          "occurredOn": "2026-02-28",
          "eventType": "withdrawal",
          "amount": 50,
          "idempotencyKey": "transfer"
        }
      ]
    },
    {
      "account": {
        "id": "loan",
        "accountClass": "liability",
        "accountType": "auto_loan",
        "calculationModel": "fixed_amortizing",
        "ownershipPercentage": 100
      },
      "observations": [
        {
          "id": "a",
          "observedOn": "2026-01-01",
          "value": 1000,
          "valueKind": "verified"
        }
      ],
      "terms": [
        {
          "version": 1,
          "effectiveFrom": "2026-01-01",
          "rateType": "fixed",
          "annualRate": 12,
          "paymentFrequency": "monthly",
          "scheduledPayment": 100,
          "dueDay": 1
        }
      ],
      "events": [
        {
          "occurredOn": "2026-02-01",
          "eventType": "missed_payment",
          "idempotencyKey": "missed-Feb"
        }
      ]
    }
  ],
  "cashFlows": [
    {
      "key": "wage",
      "version": 1,
      "effectiveFrom": "2026-01-01",
      "streamType": "income",
      "amount": 50,
      "cadence": "weekly",
      "valueKind": "verified"
    },
    {
      "key": "wage",
      "version": 2,
      "effectiveFrom": "2026-03-01",
      "streamType": "income",
      "amount": 60,
      "cadence": "weekly",
      "valueKind": "verified"
    },
    {
      "key": "wage",
      "version": 3,
      "effectiveFrom": "2026-04-01",
      "streamType": "income",
      "amount": 90,
      "cadence": "weekly",
      "valueKind": "verified"
    },
    {
      "key": "rent",
      "version": 1,
      "effectiveFrom": "2026-01-01",
      "streamType": "obligation",
      "amount": 40,
      "cadence": "semimonthly",
      "valueKind": "estimated"
    },
    {
      "key": "ignored",
      "version": 1,
      "effectiveFrom": "2026-01-01",
      "streamType": "income",
      "amount": 100,
      "cadence": "monthly",
      "valueKind": "estimated"
    },
    {
      "key": "ignored",
      "version": 2,
      "effectiveFrom": "2026-02-01",
      "streamType": "income",
      "amount": 120,
      "cadence": "monthly",
      "valueKind": "estimated",
      "pending": true
    }
  ],
  "goals": [
    {
      "key": "goal",
      "status": "active",
      "fundedAmount": 120
    },
    {
      "key": "closed",
      "status": "closed",
      "fundedAmount": 20
    }
  ]
}
Full JSON schema
{
  "type": "object",
  "properties": {
    "asOfDate": {
      "type": "string",
      "format": "date",
      "minLength": 10,
      "maxLength": 10,
      "pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
      "description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
    },
    "currency": {
      "type": "string",
      "enum": [
        "USD",
        "CAD",
        "EUR",
        "GBP",
        "AUD",
        "NZD",
        "CHF",
        "CNY",
        "INR",
        "BRL",
        "MXN",
        "JPY",
        "BHD",
        "JOD",
        "KWD",
        "OMR"
      ],
      "description": "One supported currency per request. The app rounds JPY to 0 decimals, BHD/JOD/KWD/OMR to 3 and the remaining supported codes to 2. No FX conversion."
    },
    "ledgers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 48,
                "pattern": "^[A-Za-z0-9_-]+$",
                "description": "Caller-defined, nonidentifying key within this request."
              },
              "accountType": {
                "type": "string",
                "enum": [
                  "credit_card",
                  "mortgage",
                  "auto_loan",
                  "student_loan",
                  "personal_loan",
                  "loan",
                  "heloc",
                  "home_equity_loan",
                  "checking",
                  "savings",
                  "cash",
                  "investment",
                  "retirement",
                  "money_market",
                  "cd",
                  "crypto",
                  "property",
                  "vehicle",
                  "collectible",
                  "business_interest",
                  "other"
                ]
              },
              "accountClass": {
                "type": "string",
                "enum": [
                  "asset",
                  "liability"
                ]
              },
              "calculationModel": {
                "type": "string",
                "enum": [
                  "fixed_amortizing",
                  "daily_interest",
                  "adjustable_rate",
                  "interest_only",
                  "balloon",
                  "revolving",
                  "deposit",
                  "investment",
                  "cash_flow",
                  "observed_value"
                ]
              },
              "ownershipPercentage": {
                "type": "number",
                "minimum": 0,
                "maximum": 100,
                "description": "Percentage points from 0 through 100."
              }
            },
            "required": [
              "id",
              "accountType",
              "accountClass",
              "calculationModel"
            ],
            "additionalProperties": false,
            "description": "Caller supplies the model. Ownership defaults to 100%; used in the snapshot only."
          },
          "observations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 48,
                  "pattern": "^[A-Za-z0-9_-]+$",
                  "description": "Caller-defined, nonidentifying key within this request."
                },
                "observedOn": {
                  "type": "string",
                  "format": "date",
                  "minLength": 10,
                  "maxLength": 10,
                  "pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
                  "description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
                },
                "value": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1000000000000,
                  "description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
                  "anyOf": [
                    {
                      "const": 0
                    },
                    {
                      "minimum": 0.000001
                    }
                  ]
                },
                "valueKind": {
                  "type": "string",
                  "enum": [
                    "verified",
                    "estimated"
                  ]
                },
                "supersedesId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 48,
                  "pattern": "^[A-Za-z0-9_-]+$",
                  "description": "Caller-defined, nonidentifying key within this request."
                }
              },
              "required": [
                "id",
                "observedOn",
                "value",
                "valueKind"
              ],
              "additionalProperties": false,
              "description": "Manual balance point. Verified means the caller confirmed it."
            },
            "minItems": 1,
            "maxItems": 48
          },
          "terms": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "version": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 100000,
                  "description": "Effective term revision number."
                },
                "effectiveFrom": {
                  "type": "string",
                  "format": "date",
                  "minLength": 10,
                  "maxLength": 10,
                  "pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
                  "description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
                },
                "effectiveTo": {
                  "type": "string",
                  "format": "date",
                  "minLength": 10,
                  "maxLength": 10,
                  "pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
                  "description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
                },
                "rateType": {
                  "type": "string",
                  "enum": [
                    "none",
                    "fixed",
                    "variable",
                    "adjustable",
                    "promotional"
                  ]
                },
                "rateBasis": {
                  "type": "string",
                  "enum": [
                    "apr",
                    "apy",
                    "nominal"
                  ]
                },
                "annualRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100,
                  "description": "Annual rate as percentage points (6.5 means 6.5%)."
                },
                "interestConvention": {
                  "type": "string",
                  "enum": [
                    "none",
                    "daily_365",
                    "daily_360",
                    "monthly",
                    "statement_cycle"
                  ]
                },
                "compoundingFrequency": {
                  "type": "string",
                  "enum": [
                    "none",
                    "daily",
                    "monthly",
                    "quarterly",
                    "semiannual",
                    "annual"
                  ]
                },
                "paymentFrequency": {
                  "type": "string",
                  "enum": [
                    "weekly",
                    "biweekly",
                    "semimonthly",
                    "monthly",
                    "quarterly",
                    "annual"
                  ]
                },
                "scheduledPayment": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1000000000000,
                  "description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
                  "anyOf": [
                    {
                      "const": 0
                    },
                    {
                      "minimum": 0.000001
                    }
                  ]
                },
                "minimumPayment": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1000000000000,
                  "description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
                  "anyOf": [
                    {
                      "const": 0
                    },
                    {
                      "minimum": 0.000001
                    }
                  ]
                },
                "maturityDate": {
                  "type": "string",
                  "format": "date",
                  "minLength": 10,
                  "maxLength": 10,
                  "pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
                  "description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
                },
                "dueDay": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 31,
                  "description": "Day of month; clamped in short months."
                },
                "promotionalRateExpiresOn": {
                  "type": "string",
                  "format": "date",
                  "minLength": 10,
                  "maxLength": 10,
                  "pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
                  "description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
                },
                "armNextResetOn": {
                  "type": "string",
                  "format": "date",
                  "minLength": 10,
                  "maxLength": 10,
                  "pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
                  "description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
                },
                "interestOnlyUntil": {
                  "type": "string",
                  "format": "date",
                  "minLength": 10,
                  "maxLength": 10,
                  "pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
                  "description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
                }
              },
              "required": [
                "version",
                "effectiveFrom",
                "rateType"
              ],
              "additionalProperties": false,
              "description": "Effective debt or deposit terms. Unknown assumed rate changes stop a projection. A missing rate/frequency yields engine warnings."
            },
            "minItems": 0,
            "maxItems": 24
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "idempotencyKey": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 48,
                  "pattern": "^[A-Za-z0-9_-]+$",
                  "description": "Caller-defined, nonidentifying key within this request."
                },
                "occurredOn": {
                  "type": "string",
                  "format": "date",
                  "minLength": 10,
                  "maxLength": 10,
                  "pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
                  "description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
                },
                "eventType": {
                  "type": "string",
                  "enum": [
                    "payment",
                    "extra_payment",
                    "missed_payment",
                    "contribution",
                    "withdrawal",
                    "purchase",
                    "fee",
                    "rate_change",
                    "payment_change",
                    "capitalization",
                    "correction"
                  ]
                },
                "amount": {
                  "type": "number",
                  "minimum": -1000000000000,
                  "maximum": 1000000000000,
                  "description": "Signed amount in currency major units; a correction may decrease the balance."
                },
                "newRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100,
                  "description": "Annual rate as percentage points (6.5 means 6.5%)."
                },
                "newPayment": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1000000000000,
                  "description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
                  "anyOf": [
                    {
                      "const": 0
                    },
                    {
                      "minimum": 0.000001
                    }
                  ]
                }
              },
              "required": [
                "idempotencyKey",
                "occurredOn",
                "eventType"
              ],
              "additionalProperties": false,
              "description": "A recorded activity. Amount for monetary events, signed amount for correction, newRate for rate_change, newPayment for payment_change, no amount for missed_payment. Identical repeated keys count once."
            },
            "minItems": 0,
            "maxItems": 128
          }
        },
        "required": [
          "account",
          "observations"
        ],
        "additionalProperties": false,
        "description": "Single account history. Supply an observation on or before the snapshot date; raw account projection preserves the engine warning for earlier dates."
      },
      "minItems": 0,
      "maxItems": 16
    },
    "cashFlows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48,
            "pattern": "^[A-Za-z0-9_-]+$",
            "description": "Caller-defined, nonidentifying key within this request."
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100000,
            "description": "Logical cash-flow stream revision."
          },
          "effectiveFrom": {
            "type": "string",
            "format": "date",
            "minLength": 10,
            "maxLength": 10,
            "pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
            "description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
          },
          "effectiveTo": {
            "type": "string",
            "format": "date",
            "minLength": 10,
            "maxLength": 10,
            "pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
            "description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
          },
          "streamType": {
            "type": "string",
            "enum": [
              "income",
              "obligation"
            ]
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000,
            "description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
            "anyOf": [
              {
                "const": 0
              },
              {
                "minimum": 0.000001
              }
            ]
          },
          "cadence": {
            "type": "string",
            "enum": [
              "weekly",
              "biweekly",
              "semimonthly",
              "monthly",
              "quarterly",
              "annual",
              "variable"
            ]
          },
          "valueKind": {
            "type": "string",
            "enum": [
              "verified",
              "estimated"
            ]
          },
          "pending": {
            "type": "boolean"
          }
        },
        "required": [
          "key",
          "version",
          "effectiveFrom",
          "streamType",
          "amount",
          "cadence",
          "valueKind"
        ],
        "additionalProperties": false,
        "description": "Snapshot uses the latest active version per key. A pending latest version withholds the stream."
      },
      "minItems": 0,
      "maxItems": 128
    },
    "goals": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 48,
            "pattern": "^[A-Za-z0-9_-]+$",
            "description": "Caller-defined, nonidentifying key within this request."
          },
          "fundedAmount": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000000,
            "description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
            "anyOf": [
              {
                "const": 0
              },
              {
                "minimum": 0.000001
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "achieved",
              "closed",
              "paused"
            ]
          }
        },
        "required": [
          "key",
          "fundedAmount",
          "status"
        ],
        "additionalProperties": false
      },
      "minItems": 0,
      "maxItems": 64
    }
  },
  "required": [
    "asOfDate",
    "currency",
    "ledgers"
  ],
  "additionalProperties": false,
  "description": "Caller supplies goal balances as known at asOfDate. Snapshot values are owned shares in one currency."
}

Production endpoint: POST https://calc.hasstechapi.com/v2/calc/financial-hub-historical-snapshot
Formula: financial-hub-historical-snapshot-v1