Access Rates data.
Treasury yields, instrument evidence, source history and measured settlement costs. Inspect a free record, then use the paid data products through MCP or HTTP.
Connect Rates over MCP
Add https://api.402rates.com/mcp/rates to a Streamable HTTP MCP client. No account or API key is needed.
11 MCP tools: 8 free and 3 paid. 13 HTTP capabilities including shared service information.
{"mcpServers":{"rates":{"url":"https://api.402rates.com/mcp/rates"}}}Connection does not authorize a paid purchase. Instrument/history allowances and rate limits are shared with HTTP and the combined legacy /mcp entry.
Agent tests have their own product: Compass integration.
1. Read a free sample
Open the USTB instrument record to see the response shape, yield basis, terms and source evidence.
curl "https://api.402rates.com/v1/rwa/instrument?ticker=USTB"
Up to three distinct instruments per rolling hour are free across instrument and history calls. Repeating those instruments stays free. Current coverage is public.
2. Choose the result you need
| Result | MCP tool | USDC per call |
|---|---|---|
| Measured and quoted RWA yields, with provenance | get_rwa_yields | 0.03 |
| All tracked instrument records, including terms and evidence | get_rwa_instruments | 5 |
| Full settlement cost comparison | compare_settlement_costs | 0.01 |
The same products are available over HTTP at /v1/rwa/yields, /v1/rwa/instruments and /v1/settlement/costs. The full snapshot is a single purchase with internal-use and attribution terms. Data-use terms.
Each paid call buys the described result for that request. The main obligation is fulfilled on delivery of the agreed result to your client, within the published scope and limits. Payment alone does not establish delivery. No ongoing monitoring, automatic updates or later transactions are included unless expressly agreed. Repeated individual purchases are permitted under the same use terms. Claims concerning a failed or defective delivery remain unaffected. Per-call scope and completion; separate test-run access and report limits.
For non-delivery after payment, duplicate charges for the same payment authorization or a calculation inconsistent with its supplied inputs and published method, email info@402rates.com. Include the capability, payment network, transaction identifier and available evidence with secrets removed. Reports are reviewed manually; statutory rights remain unaffected.
Compare saved snapshots
The free compare_rwa_snapshots tool and POST /v1/rwa/changes accept before and after saved Rates responses, plus an optional threshold_bps (default 5). Yield, issuer divergence, source identifiers, calculation windows and missing rows are compared. A threshold crossing is numerical, not a claim about economic significance.
Use schema-version 0.5.0 yields, instrument or full-instrument responses. JSON inputs are limited to 192 KiB and are not persistently stored. An empty object returns a synthetic example. No new market data is fetched; supplied records are not authenticated. HTTP/MCP connector.
All MCP tools
Names and summaries below come from the server's tool list. Free tools require no payment. Paid tools require an x402-capable client. Rates manifest.
| Tool | What it provides | Price per call |
|---|---|---|
list_rwa_updates | Read observed Treasury changes since a saved cursor | Free |
compare_rwa_benchmark | Compare a supplied USD Treasury return with a matching benchmark | Free |
compare_rwa_snapshots | Compare yield and divergence fields in two saved Treasury responses | Free |
list_capabilities | List capabilities for Rates by 402rates | Free |
get_manifest | Get the manifest for Rates by 402rates | Free |
get_rwa_instrument | Get one RWA instrument state | Free |
get_rwa_history | Get one RWA source history | Free |
cheapest_settlement_chain | Cheapest chain for a USDC transfer | Free |
compare_settlement_costs | Measured cost of a USDC transfer per chain, cheapest first | 0.01 USDC |
get_rwa_yields | Realised 30-day yields of tokenized treasuries, recomputable | 0.03 USDC |
get_rwa_instruments | Complete evidence snapshot for all tracked tokenized treasuries | 5 USDC |
3. Install and supply your wallet locally
Use Node 20.6 or later. In a new local directory, install the packages below. Supply your wallet key through the EVM_PRIVATE_KEY environment variable using your local secret manager. The examples use USDC on Base, chain eip155:8453.
npm init -y
npm install @modelcontextprotocol/sdk@1.30.0 @x402/core@2.17.0 @x402/evm@2.17.0 @x402/mcp@2.17.0 viem@2.55.0
Connecting an MCP server exposes its tools. Paid calls also require an x402 payment-capable client and a wallet with enough USDC. The examples sign a real purchase when run with a funded key.
Paid capabilities are for business/professional use only, under the
service and data-use terms. The HTTP v2 payment
resource description and paid MCP descriptions include this notice before
payment. Paid HTTP endpoints also return a Link header with
rel="terms-of-service" and X-Paid-Service-Audience.
The legacy XDC mirror supplies these headers while retaining its existing
payment-body format.
4. Download and run the MCP example
Save mcp-paid-rwa.mjs in that directory. The default call buys USTB yields with a 0.03 USDC ceiling. The full snapshot requires --snapshot and has a 5 USDC ceiling.
node mcp-paid-rwa.mjs
# Separate purchase: full snapshot, up to 5 USDC
node mcp-paid-rwa.mjs --snapshot
The client reads the server's payment terms, accepts only Base USDC within its limit, signs and retries. A successful result includes a settlement receipt. A yield selection with no usable figure returns a data error without settlement.
HTTP and discovery examples
node-paid-yield.mjs buys the same USTB yield result over HTTP with a 0.03 USDC ceiling and the same installed packages.
node node-paid-yield.mjs
Tool discovery and payment checks are documented in Compass.
Free MCP tools are available at https://api.402rates.com/mcp/rates using Streamable HTTP. See the OpenAPI manifest for HTTP arguments and response contracts.
Rates / Changes
What changed since the last call?
list_rwa_updates reads notices from a saved cursor. The free feed lists changed fields, detection times and state digests. Full previous and current values appear in the existing instrument response under changes, with the same instrument allowance and prices.
POST https://api.402rates.com/v1/rwa/updates
Content-Type: application/json
{"limit":50}
Save next_cursor after processing the page and pass it as cursor on the next call. Continue while has_more is true. cursor_reset_required means a retention gap or a replaced journal; start a new baseline explicitly. stale and unavailable are not a healthy empty result.
Capture runs every fifteen minutes from recorded sources. The first event is a baseline. Terms reflect our versioned evidence catalogue; issuer documents are not continuously scraped. Ninety-day retention; full instrument responses contain at most the latest 100 events with an explicit truncation flag. Detection time is not an issuer's effective date.
Download the one-poll cursor client. No payment or subscription is started. This optional free feed does not add a continuous-service guarantee to individual purchases.
Rates / Comparison
A benchmark with matching dates.
compare_rwa_benchmark compares a saved measured USD instrument response with caller-supplied Treasury total-return index levels. It performs arithmetic; it does not fetch or authenticate an index.
POST https://api.402rates.com/v1/rwa/benchmark
{
"snapshot": { "...": "saved complete single-instrument response" },
"benchmark": {
"kind": "us_treasury_total_return_index", "currency": "USD",
"start_date": "2026-08-01", "end_date": "2026-08-31",
"start_value": 100, "end_value": 100.3,
"source_url": "https://example.invalid/total-return-index",
"retrieved_at": "2026-09-01"
}
}
This is a synthetic benchmark example with a placeholder snapshot, not a reported market return. Supply your actual saved response and a source you can use. Dates must match exactly, within the 28-32 day yield window. Both returns use USD and simple actual/365. Spot yields, price-only indices, quoted fund yields and different currencies return not_comparable.
benchmark_spread_bps is fund minus benchmark. It does not identify fees, cash drag or causality; no management fee is subtracted again. Portfolio duration and holdings may differ.