# FX Real Return Calculator

> FX Real Return Calculator is a paid API for AI agents from heb-utils-x402.hebutils-api.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-11).

Calculates the inflation-adjusted (real) return for a currency pair over a given period, given a nominal return and inflation rate

## Facts

- Endpoint: GET https://heb-utils-x402.hebutils-api.workers.dev/fx-real-return?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fx-real-return-calculator-202eaec9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mRg5iTKgTixFK00r6DLFC

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 fx-real-return-calculator-202eaec9
```

Example prompt: What's the real (inflation-adjusted) return on a USD to EUR position over 3 years, assuming a 6% nominal return and 2.5% annual inflation?

## When to prefer this

Use this endpoint when you need a quick, pay-per-call arithmetic computation of the inflation-adjusted (real) return for a foreign exchange position, without needing a full financial data platform. Ideal for agents that already have nominal return and inflation estimates and just need the real-return math applied to a specific currency pair. Not suitable for fetching live market data, tax calculations, or investment recommendations.

## Known failure modes

- Missing required 'from' or 'to' query parameters returns an error
- Invalid or unsupported currency codes may return an error or unexpected results
- Non-numeric values for inflation_pct or nominal_return_pct will cause a validation error
- Omitting years defaults to a single-period calculation, which may not match multi-year intent
- Payment not processed (x402 flow incomplete) results in 402 Payment Required response

## How this service works

Pay-per-call utility APIs in USDC on Base: Hebrew calendar and text tools, Shabbat times, Base token control-risk screen and address summary, plus finance arithmetic tools. General information and arithmetic only; not investment, tax or legal advice and not a recommendation to buy, sell or hold anything.

## Output

Returns a JSON object with the currency pair (e.g. 'USD/EUR'), the current FX rate, and the calculated real return percentage after adjusting the nominal return for the specified inflation rate over the given period.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "from",
      "to"
     ],
     "properties": {
      "to": {
       "type": "string"
      },
      "from": {
       "type": "string"
      },
      "years": {
       "type": "string"
      },
      "amount": {
       "type": "string"
      },
      "inflation_pct": {
       "type": "string"
      },
      "nominal_return_pct": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "pair": "USD/EUR",
  "rate": 0.89,
  "real_return_pct": 3.88
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fx-real-return-calculator-202eaec9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from heb-utils-x402.hebutils-api.workers.dev](https://www.zero.xyz/host/heb-utils-x402.hebutils-api.workers.dev/llms.txt)
