npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

newyorkfed

v1.0.0

Published

Typed, zero-dependency client for the NY Fed's free Markets Data API — SOFR, EFFR, OBFR, BGCR, TGCR reference rates, SOFR averages & index, SOMA holdings. No API key required.

Readme

newyorkfed

Typed, zero-dependency client for the Federal Reserve Bank of New York's free Markets Data API — the primary source for SOFR and the other US reference rates. No API key required.

npm install newyorkfed

Why

SOFR replaced LIBOR as the benchmark underneath floating-rate loans, swaps, and futures — and the NY Fed publishes it (with percentiles and volume), plus EFFR, OBFR, BGCR, TGCR, the SOFR averages & index, and SOMA holdings, all as free keyless JSON. npm had no client library for any of it.

import { lastRates, latestRates, sofrAverages } from "newyorkfed";

const [sofr] = await lastRates("sofr", 1);
sofr.percentRate;       // 3.53          (percent)
sofr.volumeInBillions;  // 3126          ($3.1T of repo behind one number)
sofr.percentPercentile75; // 3.57

const all = await latestRates(); // SOFR, EFFR, OBFR, BGCR, TGCR + averages

const [avg] = await sofrAverages(1);
avg.average30day; avg.average90day; avg.index; // compounded averages & index

API

All functions take an optional final options: { fetch?, baseUrl? } (inject fetch for tests/proxies). Rates are percents, as published.

  • latestRates() — the latest value of every reference rate
  • lastRates(type, n?) — last n observations; type: "sofr" | "bgcr" | "tgcr" (secured) or "effr" | "obfr" (unsecured) — routing is handled for you
  • searchRates(type, { startDate, endDate }) — history over a date range
  • sofrAverages(n?) — 30/90/180-day compounded SOFR averages and the SOFR index
  • somaSummary() — the System Open Market Account holdings time series
  • raw(path) — escape hatch for the rest of the API (Treasury ops, repo ops, primary dealer stats, FX swaps, securities lending, AMBS): any documented /api/... path, parsed JSON back

Failures throw NewYorkFedError with status and url. The mocked test suite runs offline; npm run smoke exercises the live API.

Related

Part of a small fixed-income toolkit: treasurydirect (Treasury auctions & Debt to the Penny) · tbill (bill yield math) · 32nds (quote notation) · day-count · accrued-interest · sifma-holidays.

Author

Built by Moshe Malka — engineering leader in New York City. Studio work at Quentin.Code.

MIT © Moshe Malka