← Back to marketplace

Finmath

external

Deterministic finance and crypto math for AI agents: TradFi (NPV, IRR, XIRR, Black-Scholes + Greeks, bonds, VaR, Sharpe) and DeFi (impermanent loss, perp liquidation, funding, Uniswap v3, health factor, cost basis). Exact, model-free arithmetic that LLMs get wrong — priced per call in USDC.

by Workers39 endpoints100% uptime41ms avg

Price

from $0.0010

up to $0.0030 per request

Network

base

Category

ai

On-chain txns

50

Uptime

100%

Avg latency

41ms

Checks

88

Status

Healthy

Base URL

https://finmath.qzqh5rrbkz.workers.dev

Endpoints (39)

Discovered from on-chain x402 payment activity. Prices shown are per-call in USDC.

POST/v1/apr_to_apy
base$0.0010
POST/v1/apy_to_apr
base$0.0010
POST/v1/basis_annualized
base$0.0010
POST/v1/beta
base$0.0020
POST/v1/black_scholes_option
base$0.0030
POST/v1/bond_convexity
base$0.0020
POST/v1/bond_duration
base$0.0020
POST/v1/bond_price
base$0.0020
POST/v1/bond_ytm
base$0.0020
POST/v1/cagr
base$0.0010
POST/v1/cagr_from_series
base$0.0020
POST/v1/correlation
base$0.0020
POST/v1/cost_basis
base$0.0020
POST/v1/dca_backtest
base$0.0020
POST/v1/funding_apr
base$0.0010
POST/v1/funding_payment
base$0.0010
POST/v1/future_value
base$0.0010
POST/v1/fv_annuity
base$0.0010
POST/v1/health_factor
base$0.0010
POST/v1/impermanent_loss
base$0.0010
POST/v1/implied_volatility
base$0.0030
POST/v1/irr
base$0.0010
POST/v1/kelly_criterion
base$0.0010
POST/v1/loan_amortization
base$0.0030
POST/v1/lp_value_vs_hodl
base$0.0020
POST/v1/max_drawdown
base$0.0020
POST/v1/npv
base$0.0010
POST/v1/perp_liquidation_price
base$0.0020
POST/v1/position_size
base$0.0020
POST/v1/present_value
base$0.0010
POST/v1/pv_annuity
base$0.0010
POST/v1/sharpe_ratio
base$0.0020
POST/v1/sortino_ratio
base$0.0020
POST/v1/staking_yield
base$0.0010
POST/v1/uniswap_v3_amounts
base$0.0020
POST/v1/value_at_risk
base$0.0020
POST/v1/volatility
base$0.0020
POST/v1/xirr
base$0.0020
POST/v1/xnpv
base$0.0020

Payment

Protocolx402 (direct payment, USDC)
Networkbase

How to call

Via APIHub (recommended)No wallet · pay with credits · gasless
# one-time setup
npx @apihubio/cli register
npx @apihubio/cli topup 10

# call it
npx @apihubio/cli call https://finmath.qzqh5rrbkz.workers.dev \
  -X POST \
  -d '{ /* check provider docs for input */ }'

# or save it to Claude/Cursor/Codex
npx @apihubio/cli install
npx @apihubio/cli add https://finmath.qzqh5rrbkz.workers.dev
APIHub pays the provider on your behalf and debits your credit balance for the exact amount. No wallet setup, no gas, no per-call signing.
Via direct x402 (advanced)Bring your own wallet
import { wrapFetchWithPayment } from "@x402/fetch";
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";

const account = privateKeyToAccount("0xYOUR_PRIVATE_KEY");
const client = createWalletClient({ account, chain: base, transport: http() });
const x402Fetch = wrapFetchWithPayment(client);

const res = await x402Fetch("https://finmath.qzqh5rrbkz.workers.dev", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ /* check provider docs for input */ }),
});
const data = await res.json();
Requires USDC on Base and gas on each call. The @x402/fetch client signs EIP-3009 transferWithAuthorization for each 402 response and retries.

This is an external service not operated by APIHub. Listing data is sourced from public on-chain records and third-party indexes. Payment goes directly to the service provider via the x402 protocol. APIHub does not guarantee availability, accuracy, or quality of external services.