Math

Exact financial + token math

Exact financial + token math. POST {op:…}: compound (growth with per-period contributions), amortize (payment, total interest, schedule), npv, irr (deterministic bisection) — and token_units: exact decimal↔base-unit conversion via BigInt for any token decimals (ETH 18, USDC 6), the 18-decimal math that float64 silently corrupts. Iterative series computed exactly, never guessed.

Price: $0.005 per call, paid in USDC via the x402 protocol (see the x402 security scheme).

post/api/calc/finance

Request

  • Base URL: https://api.webbersites.com
  • URL: https://api.webbersites.com/api/calc/finance
  • Auth: API key in header X-PAYMENT

Request body

opstring required

compound | amortize | npv | irr | token_units

principalnumber
ratenumber

annual %, e.g. 6.5

yearsnumber
periods_per_yearnumber

default 12

contribution_per_periodnumber
amountstring

token_units — decimal or base-unit string

decimalsnumber

token_units — ETH 18, USDC 6

tostring

token_units — base | decimal

Response

Success

opstring
future_valuenumber
payment_per_periodnumber
total_interestnumber
npvnumber
irr_pctnumber
base_unitsstring
decimalstring

Changes

No recorded changes to this operation across all 1 revision of this API.