US20Y/USD
OfflineUNITED STATES 20 YEAR GOVERNMENT BONDS PRICE / US DOLLAR · Rates
Price
—
Confidence (±)
—
±0.0000%
Last Update
—
Quote
USD
Confidence Band
Pyth Feed ID
0x366306ff35188dcdcdf4c8142458253eac643aa82208271fd0dd5125382d347c
About the US20Y/USD Pyth feed
The US20Y/USD feed (UNITED STATES 20 YEAR GOVERNMENT BONDS PRICE / US DOLLAR) is an aggregated rates price published on-chain by the Pyth Network — a first-party oracle sourcing quotes from institutional publishers including exchanges, market makers and trading firms. Each update carries a confidence interval (±), an exponent and a publish timestamp, currently around $0.000. PythFeeds streams this feed live from the Hermes API and surfaces its staleness so you can see exactly how fresh the oracle price is.
On-chain (Solidity)
// Read US20Y/USD on-chain with the Pyth pull oracle
bytes32 constant US20Y_USD =
0x366306ff35188dcdcdf4c8142458253eac643aa82208271fd0dd5125382d347c;
PythStructs.Price memory p =
pyth.getPriceNoOlderThan(US20Y_USD, 60); // revert if >60s stale
// real price = p.price * 10 ** p.expoOff-chain (Hermes API)
// Fetch the latest US20Y/USD price off-chain (Hermes REST)
const id = "0x366306ff35188dcdcdf4c8142458253eac643aa82208271fd0dd5125382d347c";
const res = await fetch(
`https://hermes.pyth.network/v2/updates/price/latest?ids[]=${id}&parsed=true`
);
const { parsed } = await res.json();
const p = parsed[0].price;
const price = Number(p.price) * 10 ** p.expo;