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

portfolio-armor

v1.0.0

Published

Hedge your crypto portfolio with protective collars on Derive. Reads positions from Binance, EVM wallets, or Solana — recommends zero-cost put spread + covered call structures.

Readme

portfolio-armor

Hedge your crypto portfolio in one command. Paste a wallet address, get a zero-cost collar strategy with exact strikes, expiries, and execution code.

npx portfolio-armor 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

Reads positions from EVM wallets (Ethereum, Arbitrum, Optimism, Base), Solana, or Binance. Fetches live options from Derive. Recommends a 3-leg protective collar (put spread + covered call) optimized for near-zero net cost.

Quick start

# EVM wallet — paste any address
npx portfolio-armor 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

# Solana wallet
npx portfolio-armor 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU

# Binance (needs API keys)
BINANCE_API_KEY=xxx BINANCE_API_SECRET=xxx npx portfolio-armor binance

Or install globally: npm install -g portfolio-armor

What you get

1. Portfolio scan across all chains with live pricing:

┌────┬──────────────────┬───────┬──────┬──────────┬────────────┬────────────┬────────┐
│ #  │ Source           │ Asset │ Side │ Size     │ Price      │ Value      │ Weight │
├────┼──────────────────┼───────┼──────┼──────────┼────────────┼────────────┼────────┤
│ 1  │ onchain          │ ETH   │ LONG │ 32.4584  │ $2,155.92  │ $69,977.70 │ 47.7%  │
│ 2  │ onchain-ethereum │ WBTC  │ LONG │ 0.001072 │ $70,751.88 │ $75.83     │ 0.1%   │
│ -  │ -                │ USDC  │ -    │ -        │ -          │ $76,233.29 │ 51.9%  │
└────┴──────────────────┴───────┴──────┴──────────┴────────────┴────────────┴────────┘
  Total: $146,834

2. Collar structure with P&L diagram:

  P&L
   ↑
   ╲╲╲╲╲╲╲╲━━━━━━━━━━━━━━━━━━╱╱╱╱╱╱╱╱╱╱╱╱╱━━━━━━━━━━
           ↑$1,800           ↑SPOT          ↑$2,300
   unhedged  ━ protected  ╱ participates  ━ capped

3. Exact legs with strikes, premiums, IV, and greeks:

│ BUY PUT   │ ETH-20260424-2100-P │ $2,100 │ -$149.60  │ 72.4% │
│ SELL PUT  │ ETH-20260424-1800-P │ $1,800 │ +$46.41   │ 78.9% │
│ SELL CALL │ ETH-20260424-2300-C │ $2,300 │ +$104.04  │ 71.0% │

  NET CREDIT: $0.85/contract — you get paid to hedge

4. Risk profile:

| | | |---|---| | Floor | $2,100 (97% of spot) | | Max loss | $1,800 (84% of spot) | | Upside cap | $2,300 (+6.7%) | | Worst-case drawdown | -2.6% | | Cost | $0 (net credit) |

5. Execution plan with ready-to-paste Python code for derive-client.

How a collar works

A 3-leg collar gives you downside protection funded by capping your upside:

| Leg | What | Why | |-----|------|-----| | Buy put near the money | Sets the floor — you're protected below this | Costs premium | | Sell put further down | Caps how deep the protection goes | Earns premium back | | Sell call above spot | Caps your upside | Pays for the rest |

When the credits from selling ≥ the cost of buying, the collar is zero-cost (or net credit). You give up gains above the ceiling in exchange for a protected band below.

The optimizer scores all valid strike/expiry combinations and picks the one that minimizes cost, maximizes the protection band width, prefers on-screen liquidity, and stays close to your target DTE.

Flags

portfolio-armor 0xAddr --hedge-ratio 0.5   # hedge 50% of each position
portfolio-armor 0xAddr --dte 60             # target 60-day expiry

What it supports

Hedgeable on Derive: ETH and BTC (European-style options, USDC-settled, up to 400-day expiry)

Read but not hedgeable: SOL, UNI, LINK, ARB, AAVE, CRV, and other altcoins — these are flagged in the output with suggestions.

Data sources: On-chain reads via public RPCs + Multicall3. Prices from DeFi Llama + Jupiter. Derive options via public API. No API keys needed (except Binance mode).

Project structure

src/
├── index.mjs       CLI + arg parsing
├── binance.mjs     Binance spot + futures (HMAC-signed)
├── onchain.mjs     EVM reader — 4 chains via Multicall3
├── solana.mjs      SOL + SPL tokens via RPC
├── derive.mjs      Derive options chain fetcher
└── strategy.mjs    Collar optimizer + terminal renderer

One-click alternative

Don't want to trade the legs manually? Parachute executes the same collar strategy in one click — handles leg management, rolling, and execution automatically.

License

MIT