# finmath APR to APY Converter

> finmath APR to APY Converter is a paid API for AI agents from finmath.qzqh5rrbkz.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Converts an Annual Percentage Rate (APR) to Annual Percentage Yield (APY) given a compounding frequency, using exact arithmetic.

## Facts

- Endpoint: POST https://finmath.qzqh5rrbkz.workers.dev/v1/apr_to_apy
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/finmath-apr-to-apy-converter-e1a92a93
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_f_dbQDxIRmuDcPrN-B16z

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability finmath-apr-to-apy-converter-e1a92a93 -d '<json body>'
```

Example prompt: What's the APY on a savings account advertising 5.2% APR compounded monthly — give me the exact figure?

## When to prefer this

Use this endpoint when you need a mathematically exact APR-to-APY conversion rather than relying on LLM approximation. Prefer it for financial applications, DeFi yield comparisons, lending rate disclosures, or any scenario where rounding errors are unacceptable. Ideal when the compounding frequency is known and a deterministic, auditable result is required.

## Known failure modes

- Missing required fields (apr or compounds_per_year) returns a validation error
- Non-numeric values for apr or compounds_per_year return a type error
- compounds_per_year of 0 may cause division-by-zero or invalid result
- Payment failure (402) if USDC balance is insufficient
- Network timeout if Cloudflare Worker is unavailable

## How this service works

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.

## Output

Returns a JSON object with a 'result' field containing the computed APY as a number, and a 'meta' field with additional call metadata.

## Example request

```json
{
 "apr": 5,
 "compounds_per_year": 12
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "apr",
  "compounds_per_year"
 ],
 "properties": {
  "apr": {
   "type": "number",
   "description": "apr"
  },
  "compounds_per_year": {
   "type": "number",
   "description": "compounds_per_year"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "result",
  "meta"
 ],
 "properties": {
  "meta": {
   "type": "object"
  },
  "result": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/finmath-apr-to-apy-converter-e1a92a93/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from finmath.qzqh5rrbkz.workers.dev](https://www.zero.xyz/host/finmath.qzqh5rrbkz.workers.dev/llms.txt)
