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

@stryketrade/reference-bot

v0.1.28

Published

Runnable reference bot built exclusively on the public Stryke SDK.

Readme

@stryketrade/reference-bot

Continuous paper/live reference bot built only on @stryketrade/sdk. Node.js 22+ is required.

Start paper trading

From an empty directory:

npm init -y
npm install @stryketrade/sdk @stryketrade/reference-bot
npx stryke-reference-bot doctor --profile=paper
npx stryke-reference-bot --profile=paper

Paper mode uses production markets and executable quotes. It never loads a wallet or submits a transaction. It consumes Pyth observations only where the selected baseline model or simulated settlement needs them. Simulated positions are stored locally and resumed after restart. Add --ticks=2 for a short check; otherwise the bot runs until Ctrl-C.

Doctor exits 0 for ready, 2 for healthy market waiting, and 1 for a blocked setup. Follow the printed remediation for the first failed check. No command forces a trade.

Move to live trading

Install the Solana CLI and create a dedicated wallet outside the project:

solana-keygen new --outfile ../stryke-trading-wallet.json
solana-keygen pubkey ../stryke-trading-wallet.json

Fund only the printed mainnet address with SOL you intend to risk. The JSON file controls the wallet: never commit or share it, and do not use a personal wallet.

Configure the adapter bundled with this installed package and the keypair:

export STRYKE_WALLET_ADAPTER_PATH="$PWD/node_modules/@stryketrade/reference-bot/wallet-adapter.example.mjs"
export STRYKE_WALLET_KEYPAIR_PATH="$PWD/../stryke-trading-wallet.json"

Check live readiness without signing, then explicitly start live trading:

npx stryke-reference-bot doctor --profile=live
npx stryke-reference-bot --profile=live

No .env or additional live-enable variable is required for this default path; --profile=live applies the signed mainnet profile. Doctor validates the API, market, strategy-required data, wallet, mainnet RPC, and required balance without signing. For a live Polymarket strategy, the Pyth check is explicitly skipped; for baseline and paper settlement it is required. Doctor prints the exact funding remediation when the wallet is short.

Live inherits paper's market, strategy, minimum-size, exposure, and safety defaults. The trade size is checked against the API-authoritative minimum for each market. Keep additional SOL for transaction fees, position-account rent, and possible first-trader shared market initialization.

Strategy inputs and decisions

For polymarket_early and polymarket_late, entry uses:

  • the current API-authored market and aligned Polymarket token identifiers;
  • fresh Stryke executable YES/NO buy quotes;
  • fresh Polymarket executable YES/NO asks; and
  • timing, edge, size, exposure, slippage, and fee-free-capacity controls.

Those live strategies neither subscribe to Hermes nor read the local Pyth store. polymarket_early can sell when its configured convergence policy says the remaining edge is too small. With pre-fee revalidation enabled, polymarket_late reruns ordinary executable entry economics near the end of the trading window using the original position cost basis. It holds only if the held side remains the best qualifying side; otherwise it sells before fees rise. Unavailable inputs are retried only within the bounded window and never replaced with invented values.

baseline uses fresh Pyth current price and bounded history for its probability model and fails closed without them. Paper mode retains Pyth observations for simulated settlement. After trading closes, all strategies follow the API's authoritative lifecycle for settlement, claim/refund, and safe cleanup.

Continuous lifecycle

Every live tick reconciles durable state before taking another action. It then manages open positions, sells or waits for settlement, claims/refunds only when the API authorizes them, closes API-authorized position accounts to return rent, and finally evaluates the next market.

If the wallet is below the new-entry reserve, existing reconciliation and rent recovery continue while new entries report insufficient_funding. To recover eligible rent without permitting a new entry:

npx stryke-reference-bot recover-rent --profile=live

At an entry cutoff, use the continuous terminal lifecycle instead:

npx stryke-reference-bot drain --profile=live

Drain never evaluates or submits a new entry. It reconciles pending actions, waits for settlement, claims/refunds, executes API-authored cleanup, and exits only after two consecutive fresh lifecycle observations are clean. Successful completion emits reference_bot_drain_complete; absence of that event is a failed or incomplete drain.

Position-account rent can be recovered. Shared market-series or strike-market initialization costs are recovered only when the API explicitly includes those safe, authoritative instructions in the reviewed cleanup plan.

The default state is local:

STRYKE_CHECKPOINT_PATH=.stryke/reference-bot-action.json
STRYKE_ROUND_STATE_PATH=.stryke/reference-bot-rounds.json

Keep these files across restarts. Paper positions use a derived local ledger. Operators requiring shared state can select STRYKE_STATE_BACKEND=postgres and set STRYKE_DATABASE_URL plus a stable STRYKE_STATE_NAMESPACE.

Output and safety

Every run prints effective non-secret configuration and a reason for each action, wait, or block. A BTC market identifier can contain :SOL: because SOL is the collateral asset; the configured/token asset remains BTC.

Never put a private key, seed phrase, signed transaction, or database password in logs or committed configuration. A signature proves submission, not confirmation. Submitted or unknown actions retain their checkpoint and are reconciled before another transaction.

Advanced environment controls and SDK mechanics are documented in the source repository: https://github.com/dannydoritoeth/stryke-sdk.