# Treasury FX Exposure Analyzer

> Treasury FX Exposure Analyzer is a paid API for AI agents from portfolio-risk-analyzer-g9ao.onrender.com, paid per call via x402, $0.25/call, status unknown (last checked 2026-11-30).

Analyzes foreign exchange exposure across treasury positions, calculating gross/net exposure by currency, identifying natural hedges, running stress scenarios, and prioritizing hedge actions.

## Facts

- Endpoint: POST https://portfolio-risk-analyzer-g9ao.onrender.com/fx-exposure?utm_source=zero.xyz
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/treasury-fx-exposure-analyzer-09bc19b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_S-7443L7oVCvV7jnOaU_E

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 treasury-fx-exposure-analyzer-09bc19b9 -d '<json body>'
```

Example prompt: Analyze my company's FX exposure — I have EUR receivables of 500,000, JPY payables of 80,000,000, and GBP cash of 200,000. Use USD as the base currency, apply FX rates of EUR/USD 1.09, JPY/USD 0.0067, GBP/USD 1.27, and run a 10% stress shock to tell me gross/net exposure by currency, any natural hedges, and which positions to hedge first.

## When to prefer this

Use this endpoint when you need deterministic, rule-based FX exposure computation rather than probabilistic or ML-driven risk estimates. Ideal for treasury teams that need consistent, auditable calculations of currency exposure, natural hedge identification, and hedge prioritization from first-principles arithmetic. Prefer this over general portfolio risk endpoints when the specific concern is currency risk across receivables, payables, and cash — not equity volatility or broader portfolio metrics.

## Known failure modes

- Missing required positions array returns 400 validation error
- FX rates object missing a currency present in positions causes calculation failure or unresolved conversion
- Negative or zero amounts may trigger schema validation rejection
- Malformed currency codes produce incorrect or null exposure groupings
- totalTreasuryValueBase of zero or missing may prevent percentage-of-treasury metrics from rendering
- Network timeout on cold-start container (Render free-tier spin-up latency)

## How this service works

Treasury Risk Analyzer — Deterministic FX exposure analysis: gross/net exposure by currency, natural hedges, stress scenarios, hedge priority.

## Output

Returns a structured breakdown of gross and net FX exposure by currency converted to the base currency, identification of naturally offsetting positions (natural hedges), stress-tested exposure values based on the specified shock percentage, and a prioritized list of currency positions to hedge — all computed deterministically from the submitted positions and FX rates.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fxRates": {
   "type": "object",
   "additionalProperties": {
    "type": "number"
   }
  },
  "positions": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "currency",
     "type",
     "amount"
    ],
    "properties": {
     "type": {
      "enum": [
       "receivable",
       "payable",
       "cash"
      ],
      "type": "string"
     },
     "amount": {
      "type": "number",
      "minimum": 0
     },
     "hedged": {
      "type": "boolean",
      "default": false
     },
     "currency": {
      "type": "string"
     }
    }
   }
  },
  "baseCurrency": {
   "type": "string",
   "default": "USD"
  },
  "stressShockPct": {
   "type": "number",
   "default": 0.1
  },
  "totalTreasuryValueBase": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "success",
  "warnings": [
   "Over 75% of net FX exposure is unhedged."
  ],
  "timestamp": "2026-11-05T06:08:41.990Z",
  "fx_metrics": {
   "net_exposure": {
    "EUR": 540000,
    "GBP": -254000
   },
   "gross_exposure": {
    "EUR": 540000,
    "GBP": 254000
   },
   "unhedged_ratio": 1,
   "hedged_net_exposure": {
    "EUR": 0,
    "GBP": 0
   },
   "unhedged_net_exposure": {
    "EUR": 540000,
    "GBP": -254000
   },
   "currency_concentration": {
    "hhi": 0.5648725643840136,
    "effectiveCount": 1.770310797605275
   }
  },
  "analysis_id": "318f3f32-f2a8-4d04-9324-3ccbcad0ccde",
  "stress_test": [
   {
    "impact": -54000,
    "currency": "EUR",
    "scenario": "EUR_10pct_move",
    "impactBeforeHedges": -54000
   }
  ],
  "base_currency": "USD",
  "hedge_priority": [
   "EUR"
  ],
  "natural_hedges": [],
  "risk_classification": {
   "level": "MEDIUM",
   "score": 50
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/treasury-fx-exposure-analyzer-09bc19b9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from portfolio-risk-analyzer-g9ao.onrender.com](https://www.zero.xyz/host/portfolio-risk-analyzer-g9ao.onrender.com/llms.txt)
