Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tripolskypetr/pump-anomaly/llms.txt
Use this file to discover all available pages before exploring further.
pump-anomaly is a pure TypeScript package published to npm. It ships both an ESM (index.mjs) and a CommonJS (index.cjs) build under the package exports field, so it works in modern Node.js ESM projects, bundlers, and legacy CJS environments without any extra configuration. The only peer dependency is TypeScript itself.
Install
Requirements
TypeScript ^5.3.0
TypeScript is declared as a peer dependency. Install it alongside
pump-anomaly — any version 5.3.0 or later is compatible.Node.js 18+
The library uses native
structuredClone, Array.at(), and modern Promise APIs. Node.js 18 LTS or later is required.ESM or CJS
The package exports both
index.mjs (ESM) and index.cjs (CJS) via the exports field. Both build targets include full TypeScript declarations from types.d.ts.getCandles adapter
You must supply a
GetCandles function that fetches 1-minute OHLCV data from your exchange. The library cannot operate without one for training or cascade detection.TypeScript Configuration
pump-anomaly uses standard TypeScript generics and does not require any special compiler options beyond what a modern TypeScript project already uses. The recommended tsconfig.json settings for ESM projects are:
CommonJS module format:
The
moduleResolution: "NodeNext" setting is required when "type": "module" is set in your package.json. If you are using a bundler such as Vite or esbuild, moduleResolution: "Bundler" also works correctly with pump-anomaly’s dual-format exports.The getCandles Adapter
pump-anomaly needs a single async function — your GetCandles adapter — to fetch 1-minute OHLCV candles from any exchange or data source. The library calls it during training to replay exits on historical candles, and during plan() to fetch the pre-signal candle window for liquidation-cascade detection.
See /api/get-candles for the complete API reference and adapter examples. The required type signature is:
fetchCandlesChunked, so your adapter does not need to paginate. A broken symbol (data gap, unknown ticker) should throw — the library catches per-symbol errors and degrades gracefully rather than crashing the entire fit() or plan() call.