Beefy API

July 31, 2026 · View on GitHub

The backend that powers Beefy. It reads prices, APYs, TVL and vault metadata from the chains Beefy is deployed on, caches them in memory, and serves them as JSON.

The frontend lives in beefy-v2. The endpoint reference is published at docs.beefy.finance.

Requirements

  • Node — version in .nvmrc
  • pnpm — version pinned by the packageManager field in package.json

Running

pnpm install
pnpm start

The API listens on port 3000 (PORT to override). It fetches everything on boot, so expect a minute or two before data is available; endpoints return 503 until their data is ready.

Configuration is optional — the repo ships default public RPCs and sane fallbacks. To override anything, copy .env.example to .env; pnpm start loads it automatically. Public RPCs are heavily rate-limited, so supplying your own is worthwhile if you are working on a specific chain.

Commands

CommandPurpose
pnpm startRun from source with tsx (development)
pnpm buildBundle to dist/ with tsdown
pnpm start:prodRun the built bundle
pnpm typecheckType-check the API
pnpm lint / pnpm lint:fixLint and format with Biome

Layout

This repository is a pnpm workspace containing the API and one published package.

PathContents
src/router.jsEvery route and the handler it maps to — the source of truth for what the API serves
src/app.tsServer setup and the boot sequence that starts each data service
src/api/Route handlers and the services that fetch and cache their data
src/data/Per-chain vault, pool and boost configuration (JSON)
src/abis/Contract ABIs
src/utils/Shared helpers — RPC clients, caching, HTTP, logging
scripts/Maintenance helpers, mostly for adding new vaults and pools
packages/address-book/Token and protocol addresses per chain, published to npm as @beefyfinance/blockchain-addressbook

Contributing

See CONTRIBUTING.md.

License

MIT.