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

bettoredge-value-finder

v1.0.1

Published

Find +EV betting opportunities on BettorEdge prediction markets. MCP server for Claude Desktop and Claude Code.

Readme

BettorEdge Value Finder

Find +EV (positive expected value) betting opportunities on BettorEdge prediction markets.

MCP Server for Claude Desktop & Claude Code - Ask Claude to find value bets, check your balance, and manage your portfolio conversationally.

Features

  • 🎯 Value Detection - Identifies mispriced markets using bid/ask spread analysis
  • 📊 Edge Calculation - Computes expected value and edge percentage
  • 💰 Kelly Criterion - Optimal bet sizing based on your edge
  • 🛡️ Bankroll Management - Built-in risk controls and stop-losses
  • 📈 Portfolio Tracking - Monitor positions and exposure
  • 🤖 MCP Server - Use with Claude Desktop, Claude Code, or Cursor

Getting Started

1. Create a BettorEdge Account

Sign up at play.bettoredge.com

2. Request API Access

API access requires whitelisting. Email [email protected] to request access.

Include in your email:

  • Your BettorEdge username/email
  • Brief description of your use case

3. Set Up Credentials

Once whitelisted, set your environment variables:

export BETTOREDGE_EMAIL="[email protected]"
export BETTOREDGE_PASSWORD="your-password"

4. Install & Run

Option A: MCP Server (for Claude Desktop)

npm install
# See INSTALL.md for Claude Desktop configuration

Option B: CLI

npm run find-value

Quick Start (Code)

import BettorEdgeValueFinder from './src/index.js';

// Initialize
const finder = new BettorEdgeValueFinder({
  valueFinder: {
    minEdge: 0.02,        // 2% minimum edge
    kellyFraction: 0.25   // Quarter Kelly
  },
  bankroll: {
    maxBetPercent: 0.05,  // Max 5% per bet
    maxDailyLossPercent: 0.10  // 10% daily stop-loss
  }
});

// Authenticate (requires API whitelist - email [email protected])
await finder.authenticate('your-email', 'your-password');

// Find value
const { opportunities, formatted } = await finder.findValue({
  minEdge: 0.03,      // 3% minimum edge
  maxResults: 10      // Top 10 opportunities
});

console.log(formatted);

Installation

cd "Claude Skills/bettoredge-value-finder"
npm install

MCP Server (Claude Desktop / Claude Code)

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "bettoredge": {
      "command": "node",
      "args": ["/path/to/bettoredge-value-finder/src/mcp-server.js"],
      "env": {
        "BETTOREDGE_EMAIL": "your-email",
        "BETTOREDGE_PASSWORD": "your-password"
      }
    }
  }
}

Then ask Claude things like:

  • "Find me +EV opportunities on BettorEdge"
  • "What's my BettorEdge balance?"
  • "Show my current positions"

See INSTALL.md for detailed setup instructions.

Testing

npm test

API Reference

BettorEdgeValueFinder

Main class that orchestrates value finding.

Methods

| Method | Description | |--------|-------------| | authenticate(username, password) | Login to BettorEdge | | setToken(accessToken) | Use existing token | | findValue(options) | Scan for +EV opportunities | | getLeagues() | List available leagues | | placeBet(opportunity, amount) | Place a bet (with validation) | | getBankrollStatus() | Get risk management status | | getFullStatus() | Get complete account status |

ValueFinder

Edge detection engine.

Configuration

{
  minEdge: 0.02,        // Minimum edge to flag (2%)
  minLiquidity: 10,     // Minimum $10 liquidity
  kellyFraction: 0.25,  // Quarter Kelly
  maxBetPercent: 0.05,  // Max 5% of bankroll
  minBetPercent: 0.005  // Min 0.5% to bother
}

BankrollManager

Risk management module.

Configuration

{
  maxBetPercent: 0.05,        // Max 5% per bet
  maxDailyLossPercent: 0.10,  // 10% daily stop-loss
  maxExposurePercent: 0.25,   // Max 25% at risk
  minBetAmount: 1,            // $1 minimum
  maxBetAmount: 1000,         // $1000 maximum
  kellyFraction: 0.25         // Quarter Kelly
}

Odds Utilities

import * as oddsUtils from './src/odds-utils.js';

// Convert American odds to probability
oddsUtils.americanToProb(-110);  // → 0.524

// Convert probability to American odds
oddsUtils.probToAmerican(0.55);  // → -122

// Calculate Kelly bet size
oddsUtils.kellyBet(0.55, 2.0, 0.25);  // → 0.025 (2.5% of bankroll)

// Calculate expected value
oddsUtils.calculateEV(0.55, 2.0, 100);  // → $10

// Analyze a market
oddsUtils.analyzeMarket(1.91, 1.91, 'decimal');
// → { implied: {...}, true: {...}, overround: 0.047, ... }

How Value Detection Works

BettorEdge is a prediction market exchange where users trade contracts priced 0-100 (cents).

  1. Fetch Markets - Get current bid/ask prices from the API
  2. Calculate Midpoint - Use (bid + ask) / 2 as estimated "true" probability
  3. Find Edge - Compare true probability to available prices
  4. Score Confidence - Factor in edge size, liquidity, and spread width
  5. Size Bets - Apply Kelly criterion with bankroll limits

Example

Market: Lakers to Win
Bid: $0.45 (someone will pay 45¢ for YES)
Ask: $0.48 (someone will sell YES for 48¢)
Midpoint: $0.465 (estimated true probability: 46.5%)

If buying YES at $0.48:
  Edge = 0.465 - 0.48 = -0.015 (negative, no value)

If buying NO (selling YES) at bid $0.45:
  NO price = 1 - 0.45 = $0.55
  True NO prob = 1 - 0.465 = 0.535
  Edge = 0.45 - 0.465 = -0.015 (also negative)

This market is fairly priced. Look for wider spreads.

Risk Management

The bankroll manager enforces several protections:

| Limit | Default | Purpose | |-------|---------|---------| | Max Bet % | 5% | Prevent over-betting single opportunities | | Daily Loss % | 10% | Stop-loss to prevent tilt | | Max Exposure % | 25% | Limit total capital at risk | | Kelly Fraction | 25% | Reduce variance from full Kelly |

Disclaimer

⚠️ Gambling involves risk. This tool is for educational and informational purposes. Past edge does not guarantee future results. Only bet what you can afford to lose. Please gamble responsibly.

License

MIT