# StationFX 2-Year U.S. Treasury Yield (Constant Maturity)

> StationFX 2-Year U.S. Treasury Yield (Constant Maturity) is a paid API for AI agents from stationfx.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-02).

Returns daily 2-year U.S. Treasury constant maturity yield with derived metrics including z-scores, percentile ranks, rolling averages, and period-over-period changes.

## Facts

- Endpoint: GET https://stationfx.com/economic-data/interest-rates/market-yield-on-u-s-treasury-securities-at-2-year-constant-maturity-quoted-on-an-investment-basis?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stationfx-2-year-u-s-treasury-yield-constant-maturity-42157a30
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6R41Ukv2Jmddu-kTm6Ot7

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 stationfx-2-year-u-s-treasury-yield-constant-maturity-42157a30
```

Example prompt: Pull the 2-year U.S. Treasury yield data from StationFX for the past 12 months in JSON format, including z-scores and percentile ranks, so I can analyze where short-end rates stand relative to recent history.

## When to prefer this

Choose this endpoint when you need the short end of the U.S. Treasury yield curve — specifically the 2-year constant maturity rate — especially for Fed policy sensitivity analysis, yield curve spread calculations (e.g. 2s10s), or rate cycle timing. It provides pre-computed derived metrics (z-scores, percentile ranks, rolling averages) that would otherwise require separate computation, making it more useful than raw FRED data for agent workflows. Prefer this over longer-maturity Treasury endpoints when your analysis focuses on near-term monetary policy expectations rather than long-run inflation or growth premia.

## Known failure modes

- Invalid date format returns a 400-level error — use YYYY-MM-DD
- Requesting future dates returns empty data or an error
- Unsupported fmt enum value may return an error or unexpected format
- Network or payment authorization failure returns a 402 if x402 payment is not resolved
- Very large date ranges may result in slow responses or truncated payloads

## How this service works

Short-end U.S. Treasury yield most sensitive to Fed policy expectations. Moves closely with fed funds rate expectations. Primary input for yield curve spread calculations and rate cycle timing. Daily frequency with full derived metrics.

## Output

A JSON array of daily observations, each containing the raw 2-year Treasury yield value, month-over-month and year-over-year absolute and percentage changes, 12-month and 5-year z-scores, 5-year percentile rank, 3-month and 12-month rolling averages, and a binary above-trend indicator — all covering the requested date range.

## 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",
     "description": "Always \"http\" for HTTP endpoints"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string",
     "description": "HTTP method. Always GET for StationFX query endpoints"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "fmt": {
       "enum": [
        "json",
        "toon"
       ],
       "type": "string",
       "description": "Response format. Use toon for compact agent-friendly output."
      },
      "fields": {
       "type": "string",
       "description": "Comma-separated metric names"
      },
      "date_to": {
       "type": "string",
       "description": "End date YYYY-MM-DD"
      },
      "date_from": {
       "type": "string",
       "description": "Start date YYYY-MM-DD"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "description": "Response format. Always \"json\" (or \"toon\" if fmt=toon was requested)"
    },
    "example": {
     "type": "object",
     "properties": {
      "data": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "date": {
          "type": "string",
          "description": "Observation date YYYY-MM-DD"
         },
         "value": {
          "type": "number",
          "description": "Raw observed value in series units"
         },
         "mom_pct": {
          "type": "number",
          "description": "Month-over-month % change"
         },
         "yoy_pct": {
          "type": "number",
          "description": "Year-over-year % change"
         },
         "zscore_5y": {
          "type": "number",
          "description": "Z-score relative to trailing 5 years"
         },
         "mom_change": {
          "type": "number",
          "description": "Month-over-month absolute change"
         },
         "yoy_change": {
          "type": "number",
          "description": "Year-over-year absolute change"
         },
         "zscore_12m": {
          "type": "number",
          "description": "Z-score relative to trailing 12
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "schema": {
  "type": "object",
  "properties": {
   "data": {
    "type": "array",
    "items": {
     "type": "object",
     "properties": {
      "date": {
       "type": "string",
       "description": "Observation date YYYY-MM-DD"
      },
      "value": {
       "type": "number",
       "description": "Raw observed value in series units"
      },
      "mom_pct": {
       "type": "number",
       "description": "Month-over-month % change"
      },
      "yoy_pct": {
       "type": "number",
       "description": "Year-over-year % change"
      },
      "zscore_5y": {
       "type": "number",
       "description": "Z-score relative to trailing 5 years"
      },
      "mom_change": {
       "type": "number",
       "description": "Month-over-month absolute change"
      },
      "yoy_change": {
       "type": "number",
       "description": "Year-over-year absolute change"
      },
      "zscore_12m": {
       "type": "number",
       "description": "Z-score relative to trailing 12 months"
      },
      "above_trend": {
       "type": "integer",
       "description": "1 if value is above long-run trend, else 0"
      },
      "pct_rank_5y": {
       "type": "number",
       "description": "Percentile rank over trailing 5 years (0-100)"
      },
      "rolling_3m_avg": {
       "type": "number",
       "description": "3-month rolling average"
      },
      "rolling_12m_avg": {
       "type": "number",
       "description": "12-month rolling average"
      },
      "trend_direction": {
       "type": "integer",
       "description": "Trend: 1 rising, -1 falling, 0 flat"
      }
     }
    },
    "description": "Observations ordered by date ascending"
   },
   "meta": {
    "type": "object",
    "description": "Series metadata: source_key (FRED series ID), units, frequency (D/W/M/Q/A), date_from, date_to, fields"
   }
  },
  "description": "Station f(x) response with metadata and pre-computed derived metrics"
 },
 "example": {
  "data": [
   {
    "date": "2024-01-01",
    "value": 5.33,
    "mom_pct": 0,
    "yoy_change": 0.5,
    "zscore_12m": 1.2,
    "trend_direction": 1
   }
  ],
  "meta": {
   "frequency": "D",
   "source_key": "DGS2"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stationfx-2-year-u-s-treasury-yield-constant-maturity-42157a30/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stationfx.com](https://www.zero.xyz/host/stationfx.com/llms.txt)
