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

@blazing-customs/factorweave

v0.1.0

Published

Official TypeScript client for the Factor Weave quant-factor data API — factors, vector similarity, leak-free labels, derived analytics, MCP for ~12,000 US-listed tickers.

Readme

@blazing-customs/factorweave

Official TypeScript / JavaScript client for the Factor Weave quant-factor data API.

Daily factor scores, vector similarity, leak-free forward-return labels, derived market analytics (factor dispersion, regime, risk-cluster tags, 32-D embeddings) and MCP for ~12,000 US-listed tickers.

Install

npm install @blazing-customs/factorweave
# or
pnpm add @blazing-customs/factorweave
# or
yarn add @blazing-customs/factorweave

Node 18+ (uses native fetch). For older runtimes, pass your own fetch.

Authenticate

Sign up free (250 calls/day, no card), then mint a long-lived key on the Profile page (fw_live_…).

import { FactorWeave } from '@blazing-customs/factorweave';

const fw = new FactorWeave({ apiKey: 'fw_live_…' });
// or read from FACTORWEAVE_API_KEY env var:
const fw = new FactorWeave();

Quick recipes

// latest factor row
const row = await fw.latestFeatures('AAPL');
console.log(row?.rsi, row?.mom, row?.comp_score);

// 252-day history
const hist = await fw.features('AAPL', {
  startDate: '2024-01-01',
  endDate: '2024-12-31',
});

// top 25 momentum names today
const top = await fw.top({ factor: 'mom', n: 25 });

// similarity search
const hits = await fw.similar('AAPL', { method: 'cosine', limit: 10, minLookbackDays: 30 });
for (const h of hits) console.log(h.ticker, h.date, h.distance);

// derived analytics
const ctx  = await fw.marketContext();          // FREE today / HOBBY+ full
const card = await fw.reportCard('AAPL');       // HOBBY+
const risk = await fw.riskCluster('TSLA');      // PRO+
const emb  = await fw.embedding('NVDA');        // QUANT

// usage
const u = await fw.usage();
console.log(`${u.calls_today}/${u.daily_quota} today on ${u.tier}`);

// escape hatch for endpoints not yet wrapped
const anything = await fw.raw<{ status: string }>('/health', { authed: false });

Error handling

import { FactorWeave, AuthError, TierError, NotFoundError, RateLimitError } from '@blazing-customs/factorweave';

try {
  await fw.embedding('AAPL');
} catch (e) {
  if (e instanceof TierError) console.error('upgrade to QUANT for embeddings');
  else if (e instanceof AuthError) console.error('check your API key');
  else if (e instanceof NotFoundError) console.error('unknown ticker');
  else if (e instanceof RateLimitError) console.error(`backoff ${e.retryAfterSeconds}s`);
  else throw e;
}

The client automatically retries on 429 (honoring Retry-After) and 5xx with exponential backoff (opts.retries, default 2).

Configuration

| Option | Type | Default | Notes | | --- | --- | --- | --- | | apiKey | string | env FACTORWEAVE_API_KEY | Long-lived dev key. | | bearerToken | string | — | Alternative to apiKey. | | baseUrl | string | https://factorweave.com/api | Override for staging / self-hosted. | | timeoutMs | number | 30000 | Per-request timeout (AbortController). | | retries | number | 2 | Retry attempts on 429 + 5xx. | | userAgent | string | factorweave-js/<v> | Identify your app. | | fetch | function | globalThis.fetch | Inject your own for Node <18. |

Server-side only — please

Like the Python SDK, this client uses your fw_live_… key as a bearer credential. Shipping that key to a browser exposes it to every visitor. Use this SDK from:

  • Node.js / Bun / Deno servers
  • Serverless functions (Vercel, Cloudflare Workers with Node compatibility, AWS Lambda)
  • Build steps + edge functions where the key never reaches the client

For browser apps, proxy requests through your own backend.

Honest positioning

Factor Weave is a research substrate, not a return-prediction service. Our own leak-free probes show factor similarity does not forecast forward returns — only risk-coherence (forward realized volatility of analogues) shows a meaningful signal. The full methodology is at factorweave.com/research.html.

Use these tools the honest way: to screen, explore, and assemble research data. The thesis is yours.

Links

License

MIT