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

@vasokai/fxbg-sdk

v0.15.3

Published

Forex Bulgaria student SDK — curated trading concept detectors for writing strategies with Claude Code.

Readme

@vasokai/fxbg-sdk

Forex Bulgaria Academy — student SDK. Write trading strategies locally with Claude Code, backtest them against cached historical candles with an identical-to-production viewer, then deploy certified runs to the platform.

npx @vasokai/fxbg-sdk login
npx @vasokai/fxbg-sdk backtest src/strategies/my-strategy.ts \
  --from 2024-01-01 --to 2024-12-31

A browser tab opens with the same viewer you see on forexbulgaria.bg/backtest: PositionBox overlays per trade, engine primitives (FVG, CISD, Order Blocks, engulfing, etc.) on every timeframe pane, HTF + LTF context, full metrics dashboard.


What this package gives you

  • 85+ curated detectors — candlestick patterns, FVGs, CISD, liquidity sweeps, killzones, swings, imbalances, market-structure — available under a single import surface (@vasokai/fxbg-sdk).
  • fxbg backtest — local engine run on the same runBacktest() the platform uses in production. First run fetches candles from the platform with your API key, caches them at ~/.fxbg/candles/ (SQLite), subsequent runs are sub-second (zero network).
  • Identical viewer — the Vite-bundled @vasokai/backtest-viewer ships inside the SDK and is served over a local 127.0.0.1 HTTP server. Same React viewer as the platform, with /api/chart/* proxied through to the platform (Bearer token injected) for neighbor-TF fetches.
  • fxbg deploy — uploads the bundled strategy + source tree to forexbulgaria.bg/api/strategies/deploy for a certified, shareable, signed production run.
  • fxbg candles — manage the local SQLite cache: status, sync --pair X --tf Y --years N, clear.

Commands

| Command | What it does | |---|---| | fxbg login | Authenticate once — saves API key to ~/.fxbg-auth.json. | | fxbg backtest [file] | Bundle → cache-fetch → run engine → open browser viewer. | | fxbg deploy [file] | Bundle → upload to the platform for certified production run. | | fxbg candles status | Inspect the local candle cache. | | fxbg candles sync --pair EURUSD --tf H1,M15 --years 2 | Pre-warm a range. | | fxbg candles clear [--pair X --tf Y] | Drop all or a subset. | | fxbg dev | Live engine visualizer for src/engines/. | | fxbg update | Refresh CLAUDE.md + .mcp.json in a student's project. |

fxbg backtest flags

--from YYYY-MM-DD       inclusive start (default: 1 year ago)
--to   YYYY-MM-DD       inclusive end (default: today)
--capital 10000         initial capital in account currency
--risk 0.5              risk per trade, percent
--broker blueberry-markets
--no-open               print URL but don't auto-open browser

Symbol + timeframe are read from the strategy's meta.symbols[0] and meta.timeframes[0] — no flags needed.


Declare meta.engines to paint the viewer

The strategy's meta block accepts a engines: string[] field — the list of visual primitives the viewer overlays on every pane, so you see exactly what the strategy "saw" at each candle:

export default {
  meta: {
    id: 'engulfing-london',
    name: 'Engulfing London KZ',
    version: '1.0.0',
    symbols: ['EURUSD'],
    timeframes: ['H1'],
    direction: 'both',
    markets: ['forex'],
    engines: ['bullishEngulfing', 'bearishEngulfing'],
  },
  // ...
};

Recognized ids: bullishEngulfing, bearishEngulfing, engulfing, doji, hammer, pinBar, insideBar, fvg, cisd, swings, ema20, ema50, ema200. Missing / empty = plain candles.


Storage layout

~/.fxbg-auth.json                              # login credentials
~/.fxbg/candles/<broker>/candles.db           # SQLite cache, same schema as server
~/.fxbg/candles/<broker>/<SYMBOL>__<TF>.meta.json
~/.fxbg/runs/<timestamp>-<slug>/result.json   # every local run

Safe to delete ~/.fxbg/runs/ any time. fxbg candles clear is the friendly way to reclaim the cache.


Requirements

  • Node 20 or newer
  • An active Forex Bulgaria Academy account

License

UNLICENSED — internal tool for Forex Bulgaria Academy students.