US Treasury 3-Month Timeseries API: Historical Prints and Charts

US Treasury 3-Month Timeseries API: Historical Prints and Charts

You need reliable, daily US Treasury 3‑Month history to drive pricing, risk, and funding dashboards—without hand‑scraping, guesswork on business days, or time‑series gaps. By the end of this article you will fetch multi‑year US_TREASURY_3M time series from a single API, calculate changes and spreads, render OHLC candlesticks for charts, and load the series into pandas for CSV/Parquet exports—ready to plug into your fintech or analytics stack.

What the US_TREASURY_3M series represents

Symbol: US_TREASURY_3M

Illustration: US Treasury 3-Month Timeseries API: Historical Prints and Charts

Type: Treasury

Currency: USD

Frequency: daily (business days)

The Interest Rates API expresses rates as numeric percentages (for example, 5.33 means 5.33%). The “effective date” of a value is the key in the dates map (when provided) or the date keys in the time series itself. The series is delivered in UTC date strings (YYYY-MM-DD). Expect no prints on weekends and US market holidays; daily frequency refers to business days where data is published.

All examples below come from Try Interest Rates API and use the documented endpoints and shapes. Authentication always uses the api_key query parameter; all requests are GET; base URL is https://interestratesapi.com/api/v1/.

Fetch multi‑year history first: /timeseries

The /timeseries endpoint returns a complete date-indexed series between start and end, which is the backbone for backtests, charts, and regressions. For US_TREASURY_3M, ask for multi‑year windows in one call and manage gaps client‑side if you need continuous calendars.

cURL: US_TREASURY_3M time series

curl -s "https://interestratesapi.com/api/v1/latest?api_key=YOUR_API_KEY&symbols=SOFR"

Representative JSON response

{
"success": true,
"date": "2026-10-01",
"base": "USD",
"rates": {
"SOFR": 3.87
},
"dates": {
"SOFR": "2026-10-01"
},
"currencies": {
"SOFR": "USD"
},
"base_filter_note": null
}

Fields you will use:

  • rates.US_TREASURY_3M: date-to-value map. Each value is a percentage.
  • frequencies.US_TREASURY_3M: “daily” confirms a business-day series.
  • start_date, end_date: useful for validating slicing logic and plotting domains.

Python (requests): load and iterate the series

import requests

resp = requests.get(
'https://interestratesapi.com/api/v1/timeseries',
params=dict(
start='2025-10-03',
end='2026-10-03',
symbols='US_TREASURY_3M',
api_key='YOUR_KEY'
)
)
data = resp.json()
series = data['rates']['US_TREASURY_3M'] # dict: date -> value (percentage)
for dt, v in sorted(series.items()):
# dt is 'YYYY-MM-DD'; v is a numeric percent, e.g., 5.33
pass # replace with your logic

JavaScript (fetch): build arrays for charts

const url = 'https://interestratesapi.com/api/v1/timeseries?start=2025-10-03&end=2026-10-03&symbols=US_TREASURY_3M&api_key=YOUR_KEY';
const res = await fetch(url);
const json = await res.json();
const series = json.rates['US_TREASURY_3M']; // { 'YYYY-MM-DD': value }
const dates = Object.keys(series).sort();
const values = dates.map(d => series[d]);

PHP: GET and decode time series

<?php
$endpoint = 'https://interestratesapi.com/api/v1/timeseries?start=2025-10-03&end=2026-10-03&symbols=US_TREASURY_3M&api_key=YOUR_KEY';
$json = file_get_contents($endpoint);
$data = json_decode($json, true);
$series = $data['rates']['US_TREASURY_3M']; // associative array 'date' => value

Time series details that matter

  • Business days only: No weekend/holiday rows. If you need continuous calendars, forward‑fill or resample explicitly.
  • As‑of dates: Date keys are the effective dates to show in labels/tooltips.
  • Caching: Treasury prints don’t change intra‑day once published. Cache by date window and symbol in your app for the trading day to reduce 429s and boost speed. Consult X-RateLimit-* headers on responses.
  • Rate limits: Respect 429 responses. Headers include X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and Retry-After.

You can explore additional capabilities and endpoints at Explore Interest Rates API features and Get started with Interest Rates API.

Point‑in‑time prints: /historical for US_TREASURY_3M

Use /historical when you need “the value as of a specific date” (for backdated calculations, compliance snapshots, or auditing). For daily symbols like US_TREASURY_3M, if the requested date is a non‑business day, the API returns data for the requested date if available; otherwise handle absence as a 404 or adjust to the nearest prior business day in your client logic.

cURL: historical print

Representative JSON response

How to read it:

  • rates.US_TREASURY_3M gives the percentage for the specified date window.
  • If there is no data for that date, expect an error per “COMMON ERROR RESPONSES.”

Change over a window: /fluctuation

Compute start/end levels, absolute and percentage change, and min/max over a period without pulling the full time series. Perfect for dashboards that show Δd, Δm, Δy at top‑line.

cURL: windowed change stats

JSON response

Interpretation:

  • start_value and end_value are the first/last observed percentages in the window.
  • change and change_pct are precomputed for quick UI updates.
  • high and low are extrema in the same window.

Create candlestick charts: /ohlc

The /ohlc endpoint computes open, high, low, close for weekly, monthly, or quarterly periods directly from daily data. For US_TREASURY_3M, monthly candles commonly power rate‑trend dashboards and overlay comparisons.

cURL: monthly OHLC

JSON response

Notes:

  • period uses YYYY-MM for monthly, and similar for weekly/quarterly.
  • data_points counts the number of daily observations included, helpful for validating missing days around holidays.

JavaScript with Plotly: candlestick from /ohlc

<div id="chart"></div>
<script type="module">
const url = 'https://interestratesapi.com/api/v1/ohlc?symbols=US_TREASURY_3M&period=monthly&start=2025-10-03&end=2026-10-03&api_key=YOUR_KEY';
const res = await fetch(url);
const json = await res.json();
const rows = json.rates['US_TREASURY_3M']; // array of { period, open, high, low, close }

const x = rows.map(r => r.period);
const open = rows.map(r => r.open);
const high = rows.map(r => r.high);
const low = rows.map(r => r.low);
const close = rows.map(r => r.close);

const trace = {
x, open, high, low, close, type: 'candlestick',
increasing: { line: { color: '#2ca02c' } },
decreasing: { line: { color: '#d62728' } }
};
const layout = { title: 'US_TREASURY_3M — Monthly Candles', dragmode: 'zoom' };
Plotly.newPlot('chart', [trace], layout);
</script>

Alternatively, output arrays for Chart.js Financial or any other candlestick library; the OHLC payload is already periodized to your requested granularity.

Build a Python data pipeline: fetch → pandas → CSV/Parquet

This end‑to‑end snippet pulls a US_TREASURY_3M window via /timeseries, constructs a DataFrame indexed by date, and writes both CSV and Parquet.

import requests
import pandas as pd

API = 'https://interestratesapi.com/api/v1/timeseries'
params = dict(
start='2025-10-03',
end='2026-10-03',
symbols='US_TREASURY_3M',
api_key='YOUR_KEY'
)

r = requests.get(API, params=params)
r.raise_for_status()
data = r.json()

series = data['rates']['US_TREASURY_3M'] # {'YYYY-MM-DD': value}
df = pd.Series(series, name='US_TREASURY_3M').rename_axis('date').to_frame()
df.index = pd.to_datetime(df.index, utc=True) # ensure timezone-aware
df.sort_index(inplace=True)

# Optional resampling or filling if you need continuous calendars:
# df = df.asfreq('B').ffill() # business days, forward-filled

df.to_csv('us_treasury_3m.csv', index=True)
try:
import pyarrow # noqa: F401
df.to_parquet('us_treasury_3m.parquet')
except ImportError:
print('Install pyarrow to write Parquet')

Tips:

  • Do not assume contiguous dates; resample explicitly if required.
  • Keep values as percentages; apply rate/100 only when converting to decimals (e.g., for pricing models).
  • Cache your raw API JSON and your processed CSV/Parquet by date range to avoid recomputation and preserve provenance.

Spreads and loan math with US_TREASURY_3M

Two common operations are computing a spread to another benchmark and estimating payments at rate + spread.

Spread from two series

Given two percentages r1 (US_TREASURY_3M) and r2 (comparison symbol),

  • Spread (percentage points) = r1 − r2
  • Relative spread (%) = ((r1 − r2) / |r2|) × 100 (guard against r2 = 0)

Use /latest or /historical for point spreads, or align /timeseries results by date to build a spread time series.

Monthly payment using US_TREASURY_3M + spread

To compute an amortizing monthly payment at annual percentage rate APR_pct (e.g., APR_pct = US_TREASURY_3M + margin), with principal P and term in months N:

  • apr = APR_pct / 100
  • i = apr / 12
  • payment = P × i × (1 + i)^N / ((1 + i)^N − 1) (if i > 0)
  • For interest‑only: monthly_interest = P × i

This uses the API’s percentage format properly and avoids hard‑coding numbers.

Alternatively, use /convert to compare loan interest costs

The /convert endpoint computes the total interest for a simple loan at the latest rate of each symbol. This is useful to sanity‑check rate‑level differences or to quickly quantify savings. Example request below compares US_TREASURY_3M to ECB_MRO; adapt the amount and term to your scenario.

Note: Values in response payloads are illustrative examples from the API’s documentation.

Discover symbols and metadata: /symbols

Filter the catalogue to confirm identifiers and categories before wiring them into production logic. For US Treasury yields, filter category=treasury and base=USD. Then read each symbol’s frequency and description to validate assumptions in your pipeline.

cURL: list US treasury symbols in USD

You may also browse the broader catalogue and docs at Try Interest Rates API and the MCP documentation index at MCP.

How to read “latest” responses and dates

For dashboards that need the most recent print, use /latest. The following two blocks are official samples showing the exact shape returned by the endpoint (here demonstrated with SOFR to illustrate the schema). Keep your US_TREASURY_3M logic identical—swap the symbol list accordingly.

Field mapping you’ll reuse:

  • rates.SYMBOL is the numeric percentage.
  • dates.SYMBOL is the effective date of the latest print.
  • date (top‑level) gives the response’s context date.

Error handling, non‑trading days, and caching

  • Non‑trading days: Daily treasury symbols publish on US business days; weekends and US holidays will not have entries. For “latest” use the last available business day; for “historical,” handle missing dates gracefully.
  • Common errors: Expect 401/403 for auth issues, 404 when no data matches the request (e.g., out‑of‑range dates), 422 for validation errors, 429 for rate limits. The error shape is success=false and an error message string (some 404s include a details field).
  • Rate limits: Use X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and Retry-After to back off and retry.
  • Caching: Since published rates are fixed for their dates, cache responses keyed by (endpoint, symbol set, start, end) for at least the current business day. Invalidate caches after the expected publication time or on a schedule aligned with your data SLAs.

Putting it all together

When building with US_TREASURY_3M:

  • Use /timeseries for analytics windows and backtests.
  • Use /ohlc to pre‑bucket for charting; rely on data_points to validate completeness.
  • Use /fluctuation for fast top‑line changes without pulling the entire series.
  • Use /historical for point‑in‑time lookups tied to a specific date (audits, EOD reports).
  • Always read values as percentages and convert to decimals only in math routines.

If you’re ready to integrate, Register and get an API key. You can also Explore Interest Rates API features and Get started with Interest Rates API for more endpoints and examples.

Appendix: Quick “latest” examples for US_TREASURY_3M

Use /latest for a single‑tick call. Below are minimal samples that follow the API’s GET with api_key query param.

cURL

Python (requests)

import requests
response = requests.get(
'https://interestratesapi.com/api/v1/latest',
params=dict(symbols='US_TREASURY_3M', api_key='YOUR_KEY')
)
data = response.json()
rate = data['rates']['US_TREASURY_3M'] # percentage

JavaScript (fetch)

const response = await fetch(
'https://interestratesapi.com/api/v1/latest?symbols=US_TREASURY_3M&api_key=YOUR_KEY'
);
const data = await response.json();
const rate = data.rates['US_TREASURY_3M'];

PHP

<?php
$url = 'https://interestratesapi.com/api/v1/latest?symbols=US_TREASURY_3M&api_key=YOUR_KEY';
$json = file_get_contents($url);
$data = json_decode($json, true);
$rate = $data['rates']['US_TREASURY_3M'];

FAQ

Q: What unit are values returned in?
A: Percentages (e.g., 5.33 represents 5.33%). Convert to decimals by dividing by 100 only when you run calculations.

Q: Why are some dates missing in /timeseries?
A: US_TREASURY_3M is a daily business‑day series; weekends and US holidays do not print. Use business‑day resampling and forward‑fill if a continuous calendar is required.

Q: How do I know the effective date of the latest value?
A: In /latest, check dates.SYMBOL. In /timeseries, the date keys are the effective dates.

Q: How should I cache these responses?
A: Cache by (endpoint, symbols, start, end) for the business day. Invalidate after expected publication or on a cron aligned to your reporting cycle. Always handle 429 with Retry‑After.

Q: Can I combine US_TREASURY_3M with other benchmarks?
A: Yes, pass multiple symbols to /latest, /timeseries, or /fluctuation (comma‑separated). Align date keys before computing spreads.

Ship your US_TREASURY_3M integration now: Register, review the MCP, and start testing with your key. You can also Try Interest Rates API from any environment with a single GET request.

Ready to get started?

Get your API key and start validating bank data in minutes.

Get API Key

Related posts