# US Treasury Official Rates of Exchange (FBAR/8938)

> US Treasury Official Rates of Exchange (FBAR/8938) is a paid API for AI agents from x402-datashop-production.up.railway.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Returns the official US Treasury quarterly exchange rates required for FBAR and Form 8938 filings, covering ~170 currencies including exotics, as units of foreign currency per 1 USD.

## Facts

- Endpoint: GET https://x402-datashop-production.up.railway.app/v1/fx/official
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/us-treasury-official-rates-of-exchange-fbar-8938-45ed59f8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qJ9cvIg0T89MD4JCPfFkH

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 us-treasury-official-rates-of-exchange-fbar-8938-45ed59f8
```

Example prompt: What is the official US Treasury exchange rate for the Euro and Japanese Yen as of December 31, 2023? I need it for my FBAR filing.

## When to prefer this

Use this endpoint when you need the legally mandated US Treasury exchange rates for tax compliance purposes (FBAR, Form 8938, federal accounting), especially for exotic currencies not covered by ECB or commercial FX feeds. Prefer this over market-rate FX APIs whenever official/legal rates are required rather than real-time trading rates.

## Known failure modes

- Invalid or unrecognized currency descriptor returns an error or empty result for that currency
- Date prior to Treasury data coverage returns no rate
- More than 30 currencies in a single request may be rejected
- Malformed date format returns a 400-level error
- Source data not yet updated for very recent quarter may return previous quarter's rate

## How this service works

Official US Treasury Reporting Rates of Exchange: the legal USD conversion rates required for FBAR/8938 filings and US federal accounting, covering ~170 currencies including exotics absent from ECB feeds. Query: ?currencies=Euro Zone-Euro,Japan-Yen (optional, all if omitted) and ?date=YYYY-MM-DD (latest quarterly rate at or before that date, default today). Returns units of foreign currency per 1 USD. Source updates quarterly; served with a 7-day cache.

## Output

Returns a JSON object mapping each requested currency (using Treasury 'Country-Currency' descriptors) to its official quarterly exchange rate expressed as units of foreign currency per 1 USD, as of the latest quarterly publication at or before the specified date. Cached for 7 days.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "date": {
       "type": "string",
       "description": "YYYY-MM-DD; latest quarterly rate at or before this date (default today)"
      },
      "currencies": {
       "type": "string",
       "description": "Comma-separated Treasury 'Country-Currency' descriptors, max 30 (optional -> all)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/us-treasury-official-rates-of-exchange-fbar-8938-45ed59f8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-datashop-production.up.railway.app](https://www.zero.xyz/host/x402-datashop-production.up.railway.app/llms.txt)
