{"uid":"cap_Mz9AckVdPvX6vaWRVAdIH","slug":"finmath-deterministic-finance-crypto-math-api-7510750b","name":"finmath – Deterministic Finance & Crypto Math API","description":"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.","url":"https://finmath.qzqh5rrbkz.workers.dev/v1/json_format","method":"POST","headers":{},"bodySchema":{"type":"object","required":["json"],"properties":{"json":{"type":"string","description":"json"},"mode":{"type":"string","description":"mode"},"indent":{"type":"number","description":"indent"}}},"responseSchema":{"type":"object","required":["result","meta"],"properties":{"meta":{"type":"object"},"result":{}}},"example":{"request":{"json":"{\"operation\": \"npv\", \"rate\": 0.05, \"cashflows\": [100, 100, 100]}","mode":"default","indent":2},"response":{"meta":{"tool":"json_format","disclaimer":"Deterministic calculation utility. Not financial, investment, or trading advice.","deterministic":true},"result":{"result":"{\n  \"operation\": \"npv\",\n  \"rate\": 0.05,\n  \"cashflows\": [\n    100,\n    100,\n    100\n  ]\n}"}}},"exampleRequest":{"json":"{\"operation\": \"npv\", \"rate\": 0.05, \"cashflows\": [100, 100, 100]}","mode":"default","indent":2},"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_vOFpIox8hwYg9mprM-WxM","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes exact financial and DeFi math (NPV, IRR, Black-Scholes, Greeks, bond pricing, VaR, Sharpe, impermanent loss, Uniswap v3, perp liquidation, health factor, cost basis) via a JSON-in/JSON-out API, billed per call in USDC.","exampleAgentPrompt":"Calculate the Black-Scholes price and all Greeks for a European call option where spot is 150, strike is 155, risk-free rate is 5%, volatility is 25%, and time to expiry is 0.5 years — give me the result as JSON.","exampleUseCases":null,"resultDescription":"A JSON object with a 'result' field containing the computed financial value(s) (e.g. option price, Greeks, NPV, IRR, impermanent loss percentage, liquidation price, etc.) and a 'meta' field with request metadata such as the calculation type and input echo.","failureModes":["Malformed or invalid JSON in the 'json' field returns an error result","Missing required calculation parameters (e.g. no strike price for options) causes a computation error","Unsupported calculation type in the formula spec returns an unknown-mode error","Payment failure or insufficient USDC balance results in HTTP 402 before computation","Numeric edge cases (e.g. zero volatility, negative time to expiry) may return NaN or error"],"whenToPreferThis":"Choose this endpoint when you need deterministic, exact financial arithmetic that LLMs are unreliable at — especially for options pricing, Greeks, DeFi impermanent loss, perp liquidation, or IRR/XIRR on irregular cash flows. Prefer this over asking the LLM directly whenever numerical precision matters, and over general-purpose code execution when you want a hosted, per-call-priced, schema-driven math service covering both TradFi and DeFi in a single API.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:51:20.963Z","isFirstParty":false}