# Bet CLV Tracker: Closing Line Value vs Sharp Odds (`mrdoe/bet-clv-tracker`) Actor

Measure closing line value for your bets. Compare each bet's odds with the sharp bookmaker's no-vig closing price: CLV %, whether you beat the close, and expected value at close, plus a summary across all bets.

- **URL**: https://apify.com/mrdoe/bet-clv-tracker.md
- **Developed by:** [MrDoe](https://apify.com/mrdoe) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

![Bet CLV Tracker: Closing Line Value vs Sharp Odds - See whether you beat the closing line: your bet odds against the sharp bookmaker's no-vig close, for every bet.](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/bet-clv-tracker--hero.png)

### What does Bet CLV Tracker: Closing Line Value vs Sharp Odds do?

Bet CLV Tracker grades your bets against the closing line. You give it a list of bets with decimal odds and one or more bookmaker odds datasets captured just before the games started. It matches each bet to its game, removes the margin from the sharp bookmaker's closing price to get the fair closing odds, and returns closing line value as a percent, whether you beat the close and the expected value at close. A summary record gives the average CLV and the share of bets that beat the closing line.

### Why use Bet CLV Tracker: Closing Line Value vs Sharp Odds?

- CLV is the fastest signal of long-term betting edge.
- Uses the sharp bookmaker's no-vig close, not a raw price.
- Matches bets to games across bookmakers despite name differences.
- Summary with average CLV and beat-the-close rate.
- Works with the odds datasets you already collect.

### What makes this different

Most CLV tools are closed apps tied to one sportsbook import. This Actor takes plain bets and any bookmaker odds datasets, uses a proportional no-vig closing price from the sharp book you choose, and gives per-bet CLV plus a summary you can chart or store.

### How it works

![Bet CLV Tracker: Closing Line Value vs Sharp Odds workflow: your input, collection, output](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/bet-clv-tracker--how-it-works.png)

1. **Your input** — paste your bets and pick the closing-odds datasets.
2. **The Actor collects it** — the Actor matches each bet to its game and removes the sharp book's margin.
3. **Your output** — you get CLV per bet and a summary record.

### What data can you extract?

The dataset has 17 fields per row:

| Field | Type | Description |
|---|---|---|
| `id` | string | Your bet id. |
| `event` | object | Home, away and start time. |
| `market` | string | moneyline or total. |
| `line` | number | Total line. |
| `selection` | string | home, draw, away, over or under. |
| `bookmaker` | string | Bookmaker you bet with. |
| `betOdds` | number | Your decimal odds. |
| `stake` | number | Your stake. |
| `status` | string | matched, no-closing-price, incomplete-closing-market, or not-a-closing-snapshot. |
| `closingOdds` | number | Sharp bookmaker raw closing odds. |
| `closingFairOdds` | number | No-vig fair closing odds. |
| `closingFairProbability` | number | No-vig fair closing probability. |
| `clvPercent` | number | Closing line value in percent. |
| `beatClosingLine` | boolean | True when CLV is positive. |
| `expectedValueAtCloseUnits` | number | Expected value at the close in stake units. |
| `hoursBeforeKickoff` | number | Hours between the closing quote's scrapedAt and kickoff (negative if scraped after kickoff); null when unknown. |
| `demo` | boolean | True for the built-in sample. |

### How to use Bet CLV Tracker: Closing Line Value vs Sharp Odds

![Bet CLV Tracker: Closing Line Value vs Sharp Odds input form](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/bet-clv-tracker--input.png)

1. Open the Actor and go to the **Input** tab.
2. Paste your **Bets** as JSON, pick the closing **Odds datasets**, and press Start. With no input it runs a built-in sample.
3. Optionally set filters and a **Max results** limit.
4. Click **Start**. A default run finishes in under a minute.
5. Open the **Output** tab, then download the dataset or connect it to your tools.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `bets` | array | No | `[]` | Bets to grade, as JSON. Each needs home, away, market (moneyline or total), selection (home, draw, away, over, under) and decimal odds; optional startTime, line (for totals), stake, bookmaker and id. Example: {"home":"Arsenal","away":"Chelsea","market":"moneyline","selection":"home","odds":2.2,"stake":10}. Leave empty to try a built-in sample. |
| `oddsDataset1` | string | No | — | Closing odds: a dataset from a bookmaker odds Actor run taken just before the games start (it must include the sharp bookmaker). |
| `oddsDataset2` | string | No | — | Another dataset of the same kind. |
| `oddsDataset3` | string | No | — | Another dataset of the same kind. |
| `oddsDataset4` | string | No | — | Another dataset of the same kind. |
| `sharpBookmaker` | string | No | `"Pinnacle"` | Bookmaker whose no-vig closing price is the fair closing line. Must match the bookmaker field in the datasets. |
| `maxStartDiffHours` | number | No | `3` | Listings count as the same match when start times are within this many hours. |
| `closingWindowHours` | number | No | `6` | A sharp price is only treated as a genuine closing line when it was scraped within this many hours before kickoff (and not after kickoff). A snapshot outside this window is reported as not-a-closing-snapshot instead of being used as if it were the close. |
| `maxResults` | integer | No | `5` | Maximum number of bets returned. Default is 5 for a quick test; set 0 to return everything available. |

### Output Data

![Bet CLV Tracker: Closing Line Value vs Sharp Odds dataset table](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/bet-clv-tracker--output.png)

`clvPercent` is bet odds times the closing fair probability minus 1, as a percent: positive means you got a better price than the fair closing price. `status` is `no-closing-price` when the game or market was not found. A `SUMMARY` record in the key-value store has the average CLV and the beat-the-close percentage.

![Bet CLV Tracker: Closing Line Value vs Sharp Odds field map of one record](https://api.apify.com/v2/key-value-stores/kE36venAoVchGsE6b/records/bet-clv-tracker--fields.png)

A real dataset item:

```json
{
  "id": "demo-1",
  "event": {
    "home": "Pittsburgh Pirates",
    "away": "San Francisco Giants",
    "startTime": "2030-01-01T19:00:00.000Z"
  },
  "market": "moneyline",
  "line": null,
  "selection": "away",
  "bookmaker": "FanDuel",
  "betOdds": 2.75,
  "stake": 10,
  "status": "matched",
  "closingOdds": 2.5,
  "closingFairOdds": 2.613,
  "closingFairProbability": 0.3827,
  "clvPercent": 5.25,
  "beatClosingLine": true,
  "expectedValueAtCloseUnits": 0.52,
  "hoursBeforeKickoff": null,
  "demo": true
}
```

### Usage Examples

#### Grade three bets

```json
{
  "bets": [
    {
      "home": "Arsenal",
      "away": "Chelsea",
      "market": "moneyline",
      "selection": "home",
      "odds": 2.2,
      "stake": 10
    }
  ],
  "maxResults": 0
}
```

#### Use a different sharp book

```json
{
  "sharpBookmaker": "Pinnacle",
  "maxResults": 0
}
```

#### Try the sample

```json
{}
```

### Tips for Best Results

- Default is 5 results for a fast test. Set the max to 0 to return everything available.

### Known Limitations

- Closing prices are only as close as the datasets you capture; run the odds Actors just before start times.
- Only moneyline and total bets are graded.
- Total bets need the same line as the sharp book's closing line.
- Team matching is fuzzy; unusual name differences can leave a bet unmatched.
- A closing price is only accepted when it was scraped within the configured window before kickoff (default 6 hours) and not after kickoff; a snapshot outside that window is reported as not-a-closing-snapshot rather than used as if it were the close.
- A three-way sport's closing quote missing its draw price is reported as incomplete-closing-market, not silently priced as two-way.

### Integrations

Run it from the Apify API, on a schedule, or from a webhook. Send results straight to Google Sheets, Make, Zapier, Slack or your own database with Apify's built-in integrations.

### Export Formats

Download the dataset as JSON, CSV, Excel, XML, HTML table or RSS from the **Output** tab or the API.

### Frequently Asked Questions

#### Does it need an account or API key?

No. The Actor only needs the bets and odds datasets you provide.

#### Am I charged for failed results?

No. You are only charged for results that are written to the dataset.

#### Do I need an account or login?

No. The Actor only needs the bets and odds datasets you provide.

#### Am I charged for failed runs or empty results?

You are only charged for results that are actually written to the dataset.

#### Can I run it on a schedule?

Yes. Create a Task with your input and add a schedule in Apify Console. With monitor mode on, each scheduled run returns only what changed since the previous one.

### Support

Questions or a missing field? Open an issue from the **Issues** tab on this Actor's page and it will be looked at.

### Legal / Responsible Use

You are responsible for how you use these results, including compliance with bookmaker terms and the gambling laws that apply to you. This Actor is analysis only and does not place bets. Gambling is age-restricted; if you or someone you know has a problem, seek support such as BeGambleAware or 1-800-GAMBLER.

# Actor input Schema

## `bets` (type: `array`):

Bets to grade, as JSON. Each needs home, away, market (moneyline or total), selection (home, draw, away, over, under) and decimal odds; optional startTime, line (for totals), stake, bookmaker and id. Example: {"home":"Arsenal","away":"Chelsea","market":"moneyline","selection":"home","odds":2.2,"stake":10}. Leave empty to try a built-in sample.

## `oddsDataset1` (type: `string`):

Closing odds: a dataset from a bookmaker odds Actor run taken just before the games start (it must include the sharp bookmaker).

## `oddsDataset2` (type: `string`):

Another dataset of the same kind.

## `oddsDataset3` (type: `string`):

Another dataset of the same kind.

## `oddsDataset4` (type: `string`):

Another dataset of the same kind.

## `sharpBookmaker` (type: `string`):

Bookmaker whose no-vig closing price is the fair closing line. Must match the bookmaker field in the datasets.

## `maxStartDiffHours` (type: `number`):

Listings count as the same match when start times are within this many hours.

## `closingWindowHours` (type: `number`):

A sharp price is only treated as a genuine closing line when it was scraped within this many hours before kickoff (and not after kickoff). A snapshot outside this window is reported as not-a-closing-snapshot instead of being used as if it were the close.

## `maxResults` (type: `integer`):

Maximum number of bets returned. Default is 5 for a quick test; set 0 to return everything available.

## Actor input object example

```json
{
  "bets": [],
  "sharpBookmaker": "Pinnacle",
  "maxStartDiffHours": 3,
  "closingWindowHours": 6,
  "maxResults": 5
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sharpBookmaker": "Pinnacle",
    "maxResults": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("mrdoe/bet-clv-tracker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "sharpBookmaker": "Pinnacle",
    "maxResults": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("mrdoe/bet-clv-tracker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sharpBookmaker": "Pinnacle",
  "maxResults": 5
}' |
apify call mrdoe/bet-clv-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mrdoe/bet-clv-tracker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/waDSNSOVmbXzO7sVc/builds/9Oby4fXSqd04e0REM/openapi.json
