# APR ↔ APY Converter (Any Compounding Frequency)

> APR ↔ APY Converter (Any Compounding Frequency) is a paid API for AI agents from twin.unykorn.org, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-01).

Converts between Annual Percentage Rate (APR) and Annual Percentage yield (APY) at any compounding frequency via the UnyKorn Operator Network.

## Facts

- Endpoint: POST https://twin.unykorn.org/apr-apy?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/apr-apy-converter-any-compounding-frequency-86dba96b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vrK1fWBaqPG_0cPonojcF

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 apr-apy-converter-any-compounding-frequency-86dba96b -d '<json body>'
```

Example prompt: Can you convert a 7.5% APR to APY using monthly compounding (12 periods)?

## When to prefer this

Choose this endpoint when you need a programmatic, pay-per-call APR↔APY conversion with cryptographic receipt proof, especially in DeFi or fintech agent workflows where auditability of rate conversions matters. Prefer it over manual formula implementations when you need tamper-evident receipts or are already operating within the x402 micropayment ecosystem.

## Known failure modes

- Invalid or missing 'rate' string — returns error or malformed response
- Invalid 'direction' value not matching expected enum (e.g. 'apr-apy' or 'apy-apr') — may return error
- Periods set to 0 or negative — may cause division-by-zero or invalid computation
- Payment failure on x402 micropayment layer — request rejected before computation
- Malformed JSON body — returns HTTP 400 or equivalent error

## How this service works

Convert between APR and APY at any compounding frequency — Genesis402 / UnyKorn Operator Network

## Output

Returns a JSON object with ok status, the conversion type label ('apr-apy'), the computed converted rate, and a receipt object containing a transaction hash, USD amount paid, and a unique receipt ID — plus an ISO 8601 timestamp of when the result was generated.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "params": {
   "type": "object",
   "properties": {
    "rate": {
     "type": "string"
    },
    "periods": {
     "type": "integer",
     "minimum": 0
    },
    "direction": {
     "type": "string"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "apr-apy",
  "receipt": {
   "tx_hash": "0x<64hex>",
   "amount_usd": 0.002,
   "receipt_id": "g402-<16hex>"
  },
  "generated_at": "<iso8601>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/apr-apy-converter-any-compounding-frequency-86dba96b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twin.unykorn.org](https://www.zero.xyz/host/twin.unykorn.org/llms.txt)
