Read a price in four lines.
Pick a pair and how old a price you accept. See what the SDK returns right now, and copy the exact code for TypeScript, Solidity or React.
Pair
maxAgeSec · 1h
1m5m15m1h3h1d
await plumb.getPrice("HYPE/USD")…
{
pair: "HYPE/USD",
price: …,
answer: …,
decimals: 8,
roundId: …,
updatedAt: …,
ageSec: …,
stale: …
}Feeds are not on-chain yet: this is the off-chain median the signers will push, refreshed every 3 s. Heartbeat 1h, deviation 0.50%.
Sponsor HYPE/USD · 3 × 30 days
30 HYPEtotal
15 HYPEto buyback & burn
15 HYPEgas & ops
price.ts
import { createPlumbClient } from "@plumb-oracle/sdk"; const plumb = createPlumbClient({ chain: "mainnet" }); // Throws StalePriceError if older than maxAgeSec const hype = await plumb.getPrice("HYPE/USD", { maxAgeSec: 3600 }); console.log(hype.price, hype.updatedAt, hype.roundId); // Every pair in one multicall const all = await plumb.getPrices(); // Live updates const stop = plumb.watchPrice("HYPE/USD", (p) => console.log(p.price));
$ npm i @plumb-oracle/sdk viem
HYPE/USD · median now
…