# x402stock.xyz US Treasury Exchange Rates

> x402stock.xyz US Treasury Exchange Rates is a paid API for AI agents from x402stock.xyz, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Returns official US Treasury FX reference rates for ~170 currencies (foreign currency units per 1 USD) for the latest quarter, sourced from FiscalData.

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/exchange-rates
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-xyz-us-treasury-exchange-rates-0efdb6b0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bQoMOXLOLRnnPAVDL6J5z

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 x402stock-xyz-us-treasury-exchange-rates-0efdb6b0
```

Example prompt: Can you look up the official US Treasury exchange rate for the Euro from the FiscalData source — I need the accounting-grade government FX rate, not a market rate.

## When to prefer this

Choose this endpoint when you need official, government-authoritative FX rates for accounting, auditing, or compliance purposes — especially for exotic currencies not reliably covered by market feeds. Prefer over market FX endpoints when the source must be the US Treasury FiscalData and quarterly precision is acceptable.

## Known failure modes

- Invalid or unrecognized currency name in filter returns empty rates array or no match
- Quarterly update lag means rates may be up to 3 months old — not suitable for real-time market pricing
- Currency not covered by Treasury (~170 currencies total) returns no result
- Network or payment errors return non-200 status

## How this service works

Official US Treasury reporting rates of exchange — government FX reference rates for ~170 currencies, in units of foreign currency per 1 USD, for the latest quarter. Use for accounting-grade and exotic-currency conversion the market /api/v1/forex feed lacks. Filter with `?currency=Euro`. Updated quarterly. From the US Treasury (FiscalData). From x402stock

## Output

A JSON object with source ('us_treasury'), as_of date, record_date, series name, count of rates, and an array of rate objects each containing country, currency name, country_currency label, exchange_rate (foreign currency units per 1 USD), and effective_date.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "currency": "EUR"
  }
 }
}
```

## 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",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "properties": {
      "currency": {
       "type": "string",
       "maxLength": 64,
       "minLength": 1
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "source",
      "as_of",
      "series",
      "note",
      "record_date",
      "count",
      "rates"
     ],
     "properties": {
      "note": {
       "type": "string"
      },
      "as_of": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ]
      },
      "count": {
       "type": "number"
      },
      "rates": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "country",
         "currency",
         "country_currency",
         "exchange_rate",
         "effective_date"
        ],
        "properties": {
         "country": {
          "type": "string"
         },
         "currency": {
          "type": "string"
         },
         "exchange_rate": {
          "anyOf": [
           {
            "type": "number"
           },
           {
            "type": "null"
           }
          ]
         },
         "effective_date": {
          "type": "string"
         },
         "country_currency": {
          "type": "string"
         }
        },
        "additionalProperties": false
       }
      },
      "series": {
       "type": "string"
      },
      "source": {
       "type": "string",
       "const": "us_treasury"
      },
      "record_date": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ]
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "Official US Treasury reporting rates of exchange — units of foreign currency per 1 USD. Updated quarterly; use for accounting/reference conversion, not live FX (see /api/v1/forex for market rates).",
  "as_of": "2026-03-31T00:00:00.000Z",
  "count": 168,
  "rates": [
   {
    "country": "Euro Zone",
    "currency": "Euro",
    "exchange_rate": 0.924,
    "effective_date": "2026-03-31",
    "country_currency": "Euro Zone-Euro"
   },
   {
    "country": "Japan",
    "currency": "Yen",
    "exchange_rate": 149.32,
    "effective_date": "2026-03-31",
    "country_currency": "Japan-Yen"
   }
  ],
  "series": "rates_of_exchange",
  "source": "us_treasury",
  "record_date": "2026-03-31"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-xyz-us-treasury-exchange-rates-0efdb6b0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402stock.xyz](https://www.zero.xyz/host/x402stock.xyz/llms.txt)
