# history

Look up any past season, game, record or betting trend, with its sources, coverage and sample size.

| Method | Path | Title | Access | Price | MCP tool |
| --- | --- | --- | --- | --- | --- |
| GET | [`/v1/entities:resolve`](#resolve-entity) | Resolve a name to IDs | public | 1 | `resolve_entity` |
| GET | [`/v1/metrics`](#describe-metrics) | Describe stats | public | 1 | `describe_metrics` |
| GET | [`/v1/coverage`](#get-coverage) | Get a stat's coverage | public | 1 | `get_coverage` |
| POST | [`/v1/stats:find`](#find-stats) | Find stats | public | 1 | `find_stats` |
| GET | [`/v1/players/{player_id}/history`](#get-player-history) | Get a player's history | public | 1 | `get_player_history` |
| GET | [`/v1/teams/{team_id}/history`](#get-team-history) | Get a team's history | public | 1 | `get_team_history` |
| GET | [`/v1/games/{game_id}/history`](#get-game-history) | Get a past game | public | 1 | `get_game_history` |
| GET | [`/v1/records`](#get-records) | Get records | public | 1 | `get_records` |
| POST | [`/v1/lines:history`](#get-line-history) | Get a betting trend | public | 1 | `get_line_history` |
| POST | [`/v1/views:query`](#get-view) | Get a stats table | public | 1 | `get_view` |
| POST | [`/v1/views:parse`](#parse-view) | Turn words into a stats table | public | 0 | `parse_view` |
| POST | [`/v1/rules:test`](#test-rule) | Test a betting rule | public | 1 | `test_rule` |
| POST | [`/v1/charts:export`](#export-chart) | Export a chart | public | 0 | `export_chart` |
| POST | [`/v1/rules:compare_source`](#compare-rule-to-source) | Compare a rule with its source's record | public | 1 | `compare_rule_to_source` |
| POST | [`/v1/rules:test_portfolio`](#test-portfolio) | Test betting rules together | public | 1 | `test_portfolio` |
| GET | [`/v1/rules/templates`](#list-rule-templates) | List system templates | public | 0 | `list_rule_templates` |
| POST | [`/v1/rules/templates:fill`](#fill-rule-template) | Fill in a system template | public | 0 | `fill_rule_template` |
| POST | [`/v1/rules:interview`](#build-rule) | Build a rule by questions | public | 1 | `build_rule` |
| POST | [`/v1/data-requests:draft`](#create-data-request) | Draft a data request letter | public | 0 | `create_data_request` |
| POST | [`/v1/rules:test_exchange`](#test-exchange-strategy) | Test an exchange trading strategy | public | 1 | `test_exchange_strategy` |
| POST | [`/v1/rules:test_batch`](#test-rules-batch) | Test many betting rules at once | public | 1 | `test_rules_batch` |
| GET | [`/v1/rules/runs/{run_id}`](#get-rule-run) | Get a rule test you ran | public | 0 | `get_rule_run` |
| GET | [`/v1/rules/{rule_id}/versions`](#list-rule-versions) | List a saved rule's versions | public | 0 | `list_rule_versions` |
| GET | [`/v1/rules/{rule_id}/diff`](#compare-rule-versions) | Compare two versions of a saved rule | public | 0 | `compare_rule_versions` |
| POST | [`/v1/rules:translate`](#translate-rule) | Write a rule from words | public | 0 | `translate_rule` |
| GET | [`/v1/rules/{rule_id}/record`](#get-rule-record) | Get a saved rule's record since it was saved | public | 0 | `get_rule_record` |
| POST | [`/v1/rules/{rule_id}:register`](#register-rule) | Register a saved rule in public | public | 0 | `register_rule` |
| GET | [`/v1/registrations/{registration_id}`](#get-registration) | Get a registered rule | public | 0 | `get_registration` |
| POST | [`/v1/registrations/{registration_id}:withdraw`](#withdraw-registration) | Withdraw a registration | public | 0 | `withdraw_registration` |
| GET | [`/v1/rules/{rule_id}/matches`](#list-rule-matches) | List a saved rule's matches now | public | 0 | `list_rule_matches` |
| POST | [`/v1/rules:sweep`](#sweep-rule) | Sweep a betting rule's numbers | public | 1 | `sweep_rule` |
| GET | [`/v1/rules/runs/{run_id}/export`](#export-rule-run) | Export a rule test's bets | public | 0 | `export_rule_run` |
| POST | [`/v1/rules:compare`](#compare-rules) | Compare rule tests | public | 0 | `compare_rules` |
| POST | [`/v1/rules:share`](#share-rule-run) | Share a rule test | public | 0 | `share_rule_run` |
| GET | [`/v1/rules/reports/{report_id}`](#get-rule-report) | Get a shared rule test | public | 0 | `get_rule_report` |
| GET | [`/v1/rules/runs`](#list-rule-runs) | List the rule tests you ran | public | 0 | `list_rule_runs` |
| GET | [`/v1/trends`](#list-trends) | List trends that survived screening | public | 0 | `list_trends` |
| POST | [`/v1/trends:audit`](#audit-trend) | Audit a published trend | public | 1 | `audit_trend` |
| POST | [`/v1/rules:import`](#import-rule) | Import a betting system | `write:formulas` | 40 | `import_rule` |
| GET | [`/v1/rules/imports/{import_id}`](#get-rule-import) | Get an imported system | `read:formulas` | 0 | `get_rule_import` |
| POST | [`/v1/rules:import/{import_id}:confirm`](#confirm-rule-import) | Save an imported system | `write:formulas` | 1 | `confirm_rule_import` |
| POST | [`/v1/rules:import/{import_id}:undo`](#undo-rule-import) | Undo a saved import | `write:formulas` | 0 | `undo_rule_import` |
| GET | [`/v1/rules/imports`](#list-rule-imports) | List your imported systems | `read:formulas` | 0 | `list_rule_imports` |

`GET /v1/entities:resolve`

## Resolve a name to IDs
public, no key needed · 1 credit, not charged during the beta · MCP tool `resolve_entity` · status live

A player's, team's, coach's or game's name to Kelly IDs: ranked candidates with team, seasons, position and birth date, and the ID when exactly one is meant. When two match, the result asks which, never guesses.

### Parameters
- `q` string · query · required  
  The name as the person said it, e.g. 'Gary Payton'.  
  min length 1 · max length 80
- `kind` string · query  
  player, team, game or competition; default any.  
  One of: `player`, `team`, `game`, `competition` (open: new values may be added).
- `sport` string · query  
  A sport slug, e.g. basketball.
- `season` string · query  
  A season they played in, e.g. 1995-96.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `team_id` string · query  
  A team they played for (tm_…).
- `position` string · query  
  A position, e.g. C.  
  max length 8
- `limit` integer · query  
  Candidates, 1 to 10; default 5.  
  min 1 · max 10

### Response
`200` The entities facts.

- `object` const · required  
  Always entities.  
  Always `"entities"`.
- `resolved` string · required · nullable  
  The ID when exactly one candidate is meant; null when the result asks.
- `candidates` array of object · required  
  Candidates, best first.
  - `id` string · required  
    Its Kelly ID.
  - `kind` string · required  
    player, team, game or competition.
  - `name` string · required  
    Its name.
  - `sport` string · nullable  
    Its sport.
  - `match` string · required  
    exact, alias, prefix, trigram or vector.  
    One of: `exact`, `alias`, `prefix`, `trigram`, `vector` (open: new values may be added).
  - `score` number · required  
    Name similarity, 0 to 1.
  - `teams` array of object  
    Teams, latest first.
    - `team_id` string · nullable  
      Its Kelly ID.
    - `name` string · nullable  
      Its name.
    - `from` string · nullable  
      First season.
    - `to` string · nullable  
      Last season.
  - `seasons` object  
    First and last seasons Kelly holds.
    - `first` string · nullable  
      First.
    - `last` string · nullable  
      Last.
  - `position` string · nullable  
    Position.
  - `born` string · nullable  
    Birth date.  
    format date
  - `competition` string · nullable  
    A team's competition.
  - `context` object  
    A game's kickoff, week and teams.
- `ambiguity` object · required · nullable  
  Set when the input could mean more than one thing: no rows, and the question to ask the person.
  - `param` string · required  
    The input that's unclear.
  - `question` string · required  
    The question to ask.
  - `candidates` array of object · required  
    The choices.
    - `id` string  
      Its ID.
    - `label` string  
      How a person tells it apart.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled)

### Example
```http
GET https://api.askkelly.ai/v1/entities:resolve?q=Chiefs&kind=team
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "entities",
  "resolved": "tm_0xcwddhkbjaqggrxg4xg",
  "candidates": [
    {
      "id": "tm_0xcwddhkbjaqggrxg4xg",
      "kind": "team",
      "name": "Kansas City Chiefs",
      "sport": "spt_bzcnprg8js5azynzmsyd",
      "match": "prefix",
      "score": 1,
      "seasons": {
        "first": "2026",
        "last": "2026"
      },
      "competition": "nfl"
    },
    {
      "id": "tm_r46ra6zqhcwmgn5c8b46",
      "kind": "team",
      "name": "Chicago Bears",
      "sport": "spt_bzcnprg8js5azynzmsyd",
      "match": "trigram",
      "score": 0.429,
      "seasons": {
        "first": "2026",
        "last": "2026"
      },
      "competition": "nfl"
    },
    {
      "id": "tm_szswdq5mys2cx8dhz3ep",
      "kind": "team",
      "name": "Los Angeles Chargers",
      "sport": "spt_bzcnprg8js5azynzmsyd",
      "match": "trigram",
      "score": 0.286,
      "seasons": {
        "first": "2026",
        "last": "2026"
      },
      "competition": "nfl"
    }
  ],
  "ambiguity": null,
  "summary": "Chiefs is Kansas City Chiefs (tm_0xcwddhkbjaqggrxg4xg).",
  "assumptions": [],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_98a43d8632dc3d0cb5394fd6",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`GET /v1/metrics`

## Describe stats
public, no key needed · 1 credit, not charged during the beta · MCP tool `describe_metrics` · status live

A competition's stats from Kelly's catalogue: name, synonyms and slang, unit, definition, formula, version, grains, splits, defaults, qualifiers and coverage.

### Parameters
- `competition` string · query · required  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...  
  pattern ^[a-z0-9_]{2,24}$
- `q` string · query  
  Words for a stat, slang allowed: 'dimes', 'Ks', 'ATS'.  
  max length 80
- `metric_ids` array of string · query  
  Stat IDs or names.  
  min items 1 · max items 8
- `entity` string · query  
  player or team.  
  One of: `player`, `team` (open: new values may be added).
- `include` array of string · query  
  Add: coverage_summary, qualifiers, splits.

### Response
`200` The metrics facts.

- `object` const · required  
  Always metrics.  
  Always `"metrics"`.
- `catalogue_version` string · required  
  The catalogue's version.
- `metrics` array of object · required  
  The stats.
  - `metric_id` string · required  
    {competition}.{stat_key}.
  - `name` string · required  
    Its name.
  - `synonyms` array of string  
    Other words for it, slang included.
  - `unit` string · nullable  
    Its unit.
  - `definition` string · required  
    What it counts.
  - `formula` string · nullable  
    How it's computed, for a derived stat.
  - `version` string · required  
    Its definition's version.
- `dimensions` array of string · required  
  Fields filters may name besides stats.
- `splits` array of string · required  
  Splits find_stats takes.
- `defaults` object · required  
  Defaults applied when a call doesn't say.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`unknown_metric`](/problems/unknown_metric)

### Example
```http
GET https://api.askkelly.ai/v1/metrics?competition=nba&q=dimes
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "metrics",
  "catalogue_version": "1.0.0",
  "metrics": [
    {
      "metric_id": "nba.assists",
      "name": "Assists",
      "synonyms": [
        "ast",
        "dimes",
        "apg",
        "dishes"
      ],
      "unit": "ast",
      "definition": "Passes leading directly to a made field goal.",
      "kind": "count",
      "formula": null,
      "inputs": [],
      "version": "1.0.0",
      "catalogue_version": "1.0.0",
      "tolerance": 0,
      "entities": [
        "player",
        "team"
      ],
      "grains": [
        "game",
        "season",
        "career"
      ],
      "defaults": {
        "season_type": "regular",
        "since_year_includes": "season_starting",
        "missing_is": "null",
        "era_adjust": "when_careers_do_not_overlap",
        "small_sample_n": 30
      },
      "plausible_range": {
        "game": [
          0,
          60
        ]
      },
      "precedence": [
        "balldontlie",
        "kelly"
      ],
      "rights": {
        "field": "player.stats.game.*",
        "class": "redistribute_derived",
        "surfaces": [
          "site",
          "wire_first_party",
          "api",
          "mcp_plain",
          "mcp_premium",
          "mcp_cards"
        ]
      },
      "dont_confuse_with": [],
      "better": "high",
      "decimals": null,
      "per": [
        "game",
        "season",
        "rate"
      ]
    }
  ],
  "dimensions": [
    "season",
    "season_type",
    "game_date",
    "home",
    "neutral",
    "opponent_id",
    "team_id",
    "player_id",
    "result",
    "month",
    "day_of_week",
    "started",
    "position",
    "rest_days",
    "back_to_back",
    "career_game_number",
    "age"
  ],
  "splits": [
    "home_away",
    "opponent",
    "month",
    "result",
    "season",
    "day_of_week",
    "started",
    "rest"
  ],
  "defaults": {
    "season_type": "regular",
    "since_year_includes": "season_starting",
    "missing_is": "null",
    "era_adjust": "when_careers_do_not_overlap",
    "small_sample_n": 30
  },
  "summary": "1 nba stat in Kelly's catalogue (version 1.0.0) matching 'dimes'.",
  "assumptions": [],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_734c32275ef84e3849106d3a",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`GET /v1/coverage`

## Get a stat's coverage
public, no key needed · 1 credit, not charged during the beta · MCP tool `get_coverage` · status live

Which seasons each stat exists for and its status (official, unofficial, reconstructed, incomplete or absent), with games expected and present, so a missing stat is never read as zero.

### Parameters
- `competition` string · query · required  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...  
  pattern ^[a-z0-9_]{2,24}$
- `metric_ids` array of string · query  
  Stat IDs or names; default all.  
  min items 1 · max items 8
- `from_season` string · query  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string · query  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `entity` string · query  
  player or team; default both.  
  One of: `player`, `team` (open: new values may be added).
- `as_of` string · query  
  Answer as Kelly knew it at this time (RFC 3339); default now.  
  format date-time
- `snapshot_id` string · query  
  A snapshot_id an earlier history result returned, to read the same data again.  
  pattern ^snap_[0-9]{1,18}$
- `response_format` string · query  
  concise (default: key columns, 25 rows) or detailed (IDs, every column, up to 200 rows).  
  One of: `concise`, `detailed` (open: new values may be added).
- `limit` integer · query  
  Rows per page, 1 to 200; default 25.  
  min 1 · max 200
- `cursor` string · query  
  A result's next value, for the next page.
- `season_type` string · query  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).

### Response
`200` The coverage facts.

- `object` const · required  
  Always coverage.  
  Always `"coverage"`.
- `snapshot_id` string · required · nullable  
  The lake snapshot read; pass it back to read the same data.  
  pattern ^snap_[0-9]{1,18}$
- `read_from` string  
  lake, lake+neon or neon (the fallback).  
  One of: `lake`, `lake+neon`, `neon` (open: new values may be added).
- `data_through` object · required  
  The newest final game included, per sport.
- `stale` boolean · required  
  A freshness target was missed.
- `table` object · required · nullable  
  Rows as columns plus rows, units in the columns. Concise results leave out ID columns; detailed ones keep them.
  - `columns` array of object · required  
    The columns, in row order.
    - `name` string · required  
      The column's name.
    - `label` string · required  
      Its label, as a person reads it.
    - `type` string · required  
      string, integer, number, boolean, date or id.  
      One of: `string`, `integer`, `number`, `boolean`, `date`, `id` (open: new values may be added).
    - `unit` string  
      The stat's unit (yd, pts, fraction).
    - `metric_id` string  
      The stat's catalogue ID ({competition}.{stat_key}).
    - `metric_version` string  
      The stat definition's version (semver).
    - `source_key` string  
      The key in sources its values come from.
  - `rows` array of array · required  
    The rows on this page.
  - `row_count` integer · required  
    Rows on this page.
  - `total_rows` integer · required  
    Rows in the whole result.
  - `withheld` array of object  
    Columns this surface may not carry.
    - `column` string · required  
      Its name.
    - `reason` string · required  
      Why: the Rights Register entry that keeps it off this surface.
- `sources` array of object · required  
  Every source the values came from, by precedence.
  - `key` string · required  
    The key columns point at (s1, s2...).
  - `source` string · required  
    The source's name in Kelly's Rights Register.
  - `licence` string · required  
    Its licence or terms, in short.
  - `attribution` string · nullable  
    The credit line it requires.
  - `snapshot_id` string · required · nullable  
    The lake snapshot read.  
    pattern ^snap_[0-9]{1,18}$
  - `recorded_at` string · required · nullable  
    When Kelly recorded the values.  
    format date-time
  - `official` boolean · required  
    The league's official figures.
  - `reconstructed` boolean · required  
    Rebuilt from play-by-play rather than a box score.
  - `disagrees` boolean · required  
    Another source differs beyond tolerance.
  - `precedence` integer · required  
    Its rank when sources disagree; 1 is served.
- `coverage_notes` array of object · required  
  What's missing or unofficial in the span.
  - `metric_id` string · required  
    The stat's catalogue ID.
  - `seasons` string · required  
    The seasons, one or a range.
  - `status` string · required  
    absent, incomplete, unofficial, reconstructed or tier_locked.  
    One of: `official`, `unofficial`, `reconstructed`, `incomplete`, `absent`, `tier_locked` (open: new values may be added).
  - `text` string · required  
    One sentence to state in the answer.
- `ambiguity` object · required · nullable  
  Set when the input could mean more than one thing: no rows, and the question to ask the person.
  - `param` string · required  
    The input that's unclear.
  - `question` string · required  
    The question to ask.
  - `candidates` array of object · required  
    The choices.
    - `id` string  
      Its ID.
    - `label` string  
      How a person tells it apart.
- `sample` object · required · nullable  
  A trend's sample: the count, its 95% Wilson interval, a baseline and how many filters made it.
  - `n` integer · required  
    Games, pushes included.
  - `wins` integer · required  
    Wins (covers, overs).
  - `losses` integer · required  
    Losses.
  - `pushes` integer · required  
    Pushes.
  - `rate` number · required · nullable  
    Wins over decided games.
  - `ci_low` number · required · nullable  
    The interval's low end.
  - `ci_high` number · required · nullable  
    The interval's high end.
  - `ci_method` const · required  
    Always wilson_95.  
    Always `"wilson_95"`.
  - `baseline` object · required · nullable  
    The same kind of bet with no filters, over the same seasons.
    - `label` string · required  
      What the baseline counts.
    - `n` integer · required  
      Decided games in it.
    - `rate` number · required · nullable  
      Its rate.
  - `filters_applied` integer · required  
    Filters that narrowed the sample.
  - `small_sample` boolean · required  
    Too few games to read much into.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found) · [`unknown_metric`](/problems/unknown_metric) · [`invalid_filter`](/problems/invalid_filter) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout)

### Example
```http
GET https://api.askkelly.ai/v1/coverage?competition=nba&metric_ids=points
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "coverage",
  "snapshot_id": "snap_52",
  "data_through": {},
  "stale": false,
  "table": {
    "columns": [
      {
        "name": "season_label",
        "label": "Season",
        "type": "string"
      },
      {
        "name": "metric_id",
        "label": "Metric id",
        "type": "string"
      },
      {
        "name": "entity",
        "label": "Entity",
        "type": "string"
      },
      {
        "name": "season_type",
        "label": "Season type",
        "type": "string"
      },
      {
        "name": "status",
        "label": "Status",
        "type": "string"
      },
      {
        "name": "games_expected",
        "label": "Games expected",
        "type": "string"
      },
      {
        "name": "games_present",
        "label": "Games present",
        "type": "string"
      }
    ],
    "rows": [
      [
        "2025-26",
        "nba.points",
        "player",
        "regular",
        "official",
        3,
        3
      ],
      [
        "2025-26",
        "nba.points",
        "team",
        "regular",
        "incomplete",
        3,
        1
      ]
    ],
    "row_count": 2,
    "total_rows": 2
  },
  "sources": [
    {
      "key": "s1",
      "source": "balldontlie",
      "licence": "BALLDONTLIE Terms of Service, last updated September 17, 2026, §6: Data may be used for lawful commercial purposes, incl",
      "snapshot_id": "snap_52",
      "recorded_at": null,
      "official": true,
      "reconstructed": false,
      "disagrees": false,
      "precedence": 1
    }
  ],
  "coverage_notes": [],
  "ambiguity": null,
  "sample": null,
  "read_from": "lake",
  "summary": "Coverage of 1 nba stat: 2 season rows, statuses incomplete, official.",
  "assumptions": [],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-11-06T00:00:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_8c636e3a52e0a466b23480ad",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

`POST /v1/stats:find`

## Find stats
public, no key needed · 1 credit, not charged during the beta · MCP tool `find_stats` · status live

A finder over every season Kelly holds: metrics at game, season or career grain for players or teams, with filters, a split, a sort and a limit, as columns plus rows with sources, coverage notes and the snapshot read. Ranked by the sort you choose.

### Parameters
Body, `application/json` (required):

- `competition` string  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...  
  pattern ^[a-z0-9_]{2,24}$
- `entity` string  
  player or team.  
  One of: `player`, `team` (open: new values may be added).
- `grain` string  
  game, season or career.  
  One of: `game`, `season`, `career` (open: new values may be added).
- `metrics` array of string  
  1 to 8 stat IDs or names; games, starts, wins, losses and ties count rows. Teams also take points_for, points_against, point_diff, win_pct, the ATS and over/under records (ats_wins, ats_pct, overs, over_pct…) and opp_<key> for the opponent's figure.  
  min items 1 · max items 8
- `filters` array of string  
  Game rows to keep before totals; 'active = true' keeps players or teams with a season in the latest season (false: retired), each '<field> <op> <value>' with op = != > >= < <= in between, e.g. 'passing_yards >= 300', 'home = false', 'spread between 6.5..7.5'.  
  max items 12
- `having` array of string  
  Totals to keep after, same form, e.g. 'games >= 10'.  
  max items 12
- `split` string  
  A split from describe_metrics, e.g. home_away.  
  max length 32
- `entity_ids` array of string  
  Only these players or teams (plr_, tm_).  
  max items 20
- `from_season` string  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `sort` string  
  A metric, '-' first for most first; default the first metric, most first.  
  max length 64
- `min_sample` integer  
  Override the catalogue's qualifier (a minimum of games).  
  min 0
- `metric_version` string  
  Pin the catalogue's version (semver).  
  max length 16
- `as_of` string  
  Answer as Kelly knew it at this time (RFC 3339); default now.  
  format date-time
- `snapshot_id` string  
  A snapshot_id an earlier history result returned, to read the same data again.  
  pattern ^snap_[0-9]{1,18}$
- `response_format` string  
  concise (default: key columns, 25 rows) or detailed (IDs, every column, up to 200 rows).  
  One of: `concise`, `detailed` (open: new values may be added).
- `limit` integer  
  Rows per page, 1 to 200; default 25.  
  min 1 · max 200
- `cursor` string  
  A result's next value, for the next page.
- `season_type` string  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).

### Response
`200` The stats facts.

- `object` const · required  
  Always stats.  
  Always `"stats"`.
- `snapshot_id` string · required · nullable  
  The lake snapshot read; pass it back to read the same data.  
  pattern ^snap_[0-9]{1,18}$
- `read_from` string  
  lake, lake+neon or neon (the fallback).  
  One of: `lake`, `lake+neon`, `neon` (open: new values may be added).
- `data_through` object · required  
  The newest final game included, per sport.
- `stale` boolean · required  
  A freshness target was missed.
- `table` object · required · nullable  
  Rows as columns plus rows, units in the columns. Concise results leave out ID columns; detailed ones keep them.
  - `columns` array of object · required  
    The columns, in row order.
    - `name` string · required  
      The column's name.
    - `label` string · required  
      Its label, as a person reads it.
    - `type` string · required  
      string, integer, number, boolean, date or id.  
      One of: `string`, `integer`, `number`, `boolean`, `date`, `id` (open: new values may be added).
    - `unit` string  
      The stat's unit (yd, pts, fraction).
    - `metric_id` string  
      The stat's catalogue ID ({competition}.{stat_key}).
    - `metric_version` string  
      The stat definition's version (semver).
    - `source_key` string  
      The key in sources its values come from.
  - `rows` array of array · required  
    The rows on this page.
  - `row_count` integer · required  
    Rows on this page.
  - `total_rows` integer · required  
    Rows in the whole result.
  - `withheld` array of object  
    Columns this surface may not carry.
    - `column` string · required  
      Its name.
    - `reason` string · required  
      Why: the Rights Register entry that keeps it off this surface.
- `sources` array of object · required  
  Every source the values came from, by precedence.
  - `key` string · required  
    The key columns point at (s1, s2...).
  - `source` string · required  
    The source's name in Kelly's Rights Register.
  - `licence` string · required  
    Its licence or terms, in short.
  - `attribution` string · nullable  
    The credit line it requires.
  - `snapshot_id` string · required · nullable  
    The lake snapshot read.  
    pattern ^snap_[0-9]{1,18}$
  - `recorded_at` string · required · nullable  
    When Kelly recorded the values.  
    format date-time
  - `official` boolean · required  
    The league's official figures.
  - `reconstructed` boolean · required  
    Rebuilt from play-by-play rather than a box score.
  - `disagrees` boolean · required  
    Another source differs beyond tolerance.
  - `precedence` integer · required  
    Its rank when sources disagree; 1 is served.
- `coverage_notes` array of object · required  
  What's missing or unofficial in the span.
  - `metric_id` string · required  
    The stat's catalogue ID.
  - `seasons` string · required  
    The seasons, one or a range.
  - `status` string · required  
    absent, incomplete, unofficial, reconstructed or tier_locked.  
    One of: `official`, `unofficial`, `reconstructed`, `incomplete`, `absent`, `tier_locked` (open: new values may be added).
  - `text` string · required  
    One sentence to state in the answer.
- `ambiguity` object · required · nullable  
  Set when the input could mean more than one thing: no rows, and the question to ask the person.
  - `param` string · required  
    The input that's unclear.
  - `question` string · required  
    The question to ask.
  - `candidates` array of object · required  
    The choices.
    - `id` string  
      Its ID.
    - `label` string  
      How a person tells it apart.
- `sample` object · required · nullable  
  A trend's sample: the count, its 95% Wilson interval, a baseline and how many filters made it.
  - `n` integer · required  
    Games, pushes included.
  - `wins` integer · required  
    Wins (covers, overs).
  - `losses` integer · required  
    Losses.
  - `pushes` integer · required  
    Pushes.
  - `rate` number · required · nullable  
    Wins over decided games.
  - `ci_low` number · required · nullable  
    The interval's low end.
  - `ci_high` number · required · nullable  
    The interval's high end.
  - `ci_method` const · required  
    Always wilson_95.  
    Always `"wilson_95"`.
  - `baseline` object · required · nullable  
    The same kind of bet with no filters, over the same seasons.
    - `label` string · required  
      What the baseline counts.
    - `n` integer · required  
      Decided games in it.
    - `rate` number · required · nullable  
      Its rate.
  - `filters_applied` integer · required  
    Filters that narrowed the sample.
  - `small_sample` boolean · required  
    Too few games to read much into.
- `query` object  
  The query as run, normalised; send it back with a cursor to page.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`unknown_metric`](/problems/unknown_metric) · [`invalid_filter`](/problems/invalid_filter) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout)

### Example
```http
POST https://api.askkelly.ai/v1/stats:find
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "competition": "nba",
  "entity": "player",
  "grain": "career",
  "metrics": [
    "points"
  ],
  "limit": 2
}
```

```json
{
  "object": "stats",
  "snapshot_id": "snap_52",
  "data_through": {},
  "stale": false,
  "table": {
    "columns": [
      {
        "name": "player",
        "label": "Player",
        "type": "string"
      },
      {
        "name": "points",
        "label": "Points",
        "type": "integer",
        "unit": "pts",
        "metric_id": "nba.points",
        "metric_version": "1.0.0"
      },
      {
        "name": "games",
        "label": "Games",
        "type": "integer"
      }
    ],
    "rows": [
      [
        "Pam Two",
        900,
        70
      ],
      [
        "Pat One",
        96,
        3
      ]
    ],
    "row_count": 2,
    "total_rows": 3
  },
  "sources": [
    {
      "key": "s1",
      "source": "balldontlie",
      "licence": "BALLDONTLIE Terms of Service, last updated September 17, 2026, §6: Data may be used for lawful commercial purposes, incl",
      "snapshot_id": "snap_52",
      "recorded_at": null,
      "official": true,
      "reconstructed": false,
      "disagrees": false,
      "precedence": 1
    }
  ],
  "coverage_notes": [],
  "ambiguity": null,
  "sample": null,
  "read_from": "lake",
  "query": {
    "competition": "nba",
    "entity": "player",
    "grain": "career",
    "metrics": [
      "nba.points"
    ],
    "filters": [],
    "having": [],
    "split": null,
    "entity_ids": [],
    "from_season": null,
    "to_season": null,
    "sort": "-nba.points",
    "min_sample": null,
    "season_type": "regular",
    "metric_version": null
  },
  "summary": "3 player rows for nba.points (career grain); first: Pam Two, as of 2026-11-06T00:00:00Z.",
  "assumptions": [
    "Regular season only (season_type=regular).",
    "Every season Kelly covers for these stats.",
    "Each season's line from the source Kelly serves first by precedence (balldontlie, kelly), else the sum of its games.",
    "All seasons Kelly holds.",
    "Stat catalogue 1.0.0; a missing value is not zero, and games without it are left out of its total."
  ],
  "has_more": true,
  "next_cursor": "eyJvIjoyLCJzIjoic25hcF81MiJ9",
  "as_of": "2026-11-06T00:00:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_c99de431a1085e376fa11fcd",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

```http
POST https://api.askkelly.ai/v1/stats:find
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "competition": "nba",
  "entity": "player",
  "grain": "decade",
  "metrics": [
    "points"
  ]
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "code": "invalid_request",
  "detail": "grain: 'decade' is not one of ['game', 'season', 'career']",
  "param": "grain",
  "doc_url": "https://docs.askkelly.ai/problems/invalid_request",
  "request_id": "req_b1df340af500bc88454d3e3c",
  "retryable": false,
  "display_message": "Something in that request was not understood."
}
```

`GET /v1/players/{player_id}/history`

## Get a player's history
public, no key needed · 1 credit, not charged during the beta · MCP tool `get_player_history` · status live

A player's career totals, season lines, splits or game log, with team stints, each value with its source.

### Parameters
- `player_id` string · path · required  
  A player ID (plr_…) from resolve_entity.

- `view` string · query  
  seasons (default), career, splits or game_log.  
  One of: `seasons`, `career`, `splits`, `game_log` (open: new values may be added).
- `metrics` array of string · query  
  Stat IDs or names; default the catalogue's set for the position.  
  min items 1 · max items 8
- `split` string · query  
  With view splits, e.g. home_away.  
  max length 32
- `opponent_id` string · query  
  Only games against this team (tm_…).
- `last_n` integer · query  
  With view game_log: the last n games.  
  min 1 · max 500
- `filters` array of string · query  
  Rows to keep, each '<field> <op> <value>' with op = != > >= < <= in between, e.g. 'passing_yards >= 300', 'home = false', 'spread between 6.5..7.5'.  
  max items 12
- `from_season` string · query  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string · query  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `as_of` string · query  
  Answer as Kelly knew it at this time (RFC 3339); default now.  
  format date-time
- `snapshot_id` string · query  
  A snapshot_id an earlier history result returned, to read the same data again.  
  pattern ^snap_[0-9]{1,18}$
- `response_format` string · query  
  concise (default: key columns, 25 rows) or detailed (IDs, every column, up to 200 rows).  
  One of: `concise`, `detailed` (open: new values may be added).
- `limit` integer · query  
  Rows per page, 1 to 200; default 25.  
  min 1 · max 200
- `cursor` string · query  
  A result's next value, for the next page.
- `season_type` string · query  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).

### Response
`200` The player history facts.

- `object` const · required  
  Always player_history.  
  Always `"player_history"`.
- `snapshot_id` string · required · nullable  
  The lake snapshot read; pass it back to read the same data.  
  pattern ^snap_[0-9]{1,18}$
- `read_from` string  
  lake, lake+neon or neon (the fallback).  
  One of: `lake`, `lake+neon`, `neon` (open: new values may be added).
- `data_through` object · required  
  The newest final game included, per sport.
- `stale` boolean · required  
  A freshness target was missed.
- `table` object · required · nullable  
  Rows as columns plus rows, units in the columns. Concise results leave out ID columns; detailed ones keep them.
  - `columns` array of object · required  
    The columns, in row order.
    - `name` string · required  
      The column's name.
    - `label` string · required  
      Its label, as a person reads it.
    - `type` string · required  
      string, integer, number, boolean, date or id.  
      One of: `string`, `integer`, `number`, `boolean`, `date`, `id` (open: new values may be added).
    - `unit` string  
      The stat's unit (yd, pts, fraction).
    - `metric_id` string  
      The stat's catalogue ID ({competition}.{stat_key}).
    - `metric_version` string  
      The stat definition's version (semver).
    - `source_key` string  
      The key in sources its values come from.
  - `rows` array of array · required  
    The rows on this page.
  - `row_count` integer · required  
    Rows on this page.
  - `total_rows` integer · required  
    Rows in the whole result.
  - `withheld` array of object  
    Columns this surface may not carry.
    - `column` string · required  
      Its name.
    - `reason` string · required  
      Why: the Rights Register entry that keeps it off this surface.
- `sources` array of object · required  
  Every source the values came from, by precedence.
  - `key` string · required  
    The key columns point at (s1, s2...).
  - `source` string · required  
    The source's name in Kelly's Rights Register.
  - `licence` string · required  
    Its licence or terms, in short.
  - `attribution` string · nullable  
    The credit line it requires.
  - `snapshot_id` string · required · nullable  
    The lake snapshot read.  
    pattern ^snap_[0-9]{1,18}$
  - `recorded_at` string · required · nullable  
    When Kelly recorded the values.  
    format date-time
  - `official` boolean · required  
    The league's official figures.
  - `reconstructed` boolean · required  
    Rebuilt from play-by-play rather than a box score.
  - `disagrees` boolean · required  
    Another source differs beyond tolerance.
  - `precedence` integer · required  
    Its rank when sources disagree; 1 is served.
- `coverage_notes` array of object · required  
  What's missing or unofficial in the span.
  - `metric_id` string · required  
    The stat's catalogue ID.
  - `seasons` string · required  
    The seasons, one or a range.
  - `status` string · required  
    absent, incomplete, unofficial, reconstructed or tier_locked.  
    One of: `official`, `unofficial`, `reconstructed`, `incomplete`, `absent`, `tier_locked` (open: new values may be added).
  - `text` string · required  
    One sentence to state in the answer.
- `ambiguity` object · required · nullable  
  Set when the input could mean more than one thing: no rows, and the question to ask the person.
  - `param` string · required  
    The input that's unclear.
  - `question` string · required  
    The question to ask.
  - `candidates` array of object · required  
    The choices.
    - `id` string  
      Its ID.
    - `label` string  
      How a person tells it apart.
- `sample` object · required · nullable  
  A trend's sample: the count, its 95% Wilson interval, a baseline and how many filters made it.
  - `n` integer · required  
    Games, pushes included.
  - `wins` integer · required  
    Wins (covers, overs).
  - `losses` integer · required  
    Losses.
  - `pushes` integer · required  
    Pushes.
  - `rate` number · required · nullable  
    Wins over decided games.
  - `ci_low` number · required · nullable  
    The interval's low end.
  - `ci_high` number · required · nullable  
    The interval's high end.
  - `ci_method` const · required  
    Always wilson_95.  
    Always `"wilson_95"`.
  - `baseline` object · required · nullable  
    The same kind of bet with no filters, over the same seasons.
    - `label` string · required  
      What the baseline counts.
    - `n` integer · required  
      Decided games in it.
    - `rate` number · required · nullable  
      Its rate.
  - `filters_applied` integer · required  
    Filters that narrowed the sample.
  - `small_sample` boolean · required  
    Too few games to read much into.
- `player` object  
  The player.
  - `id` string  
    Kelly ID.
  - `name` string  
    Name.
  - `position` string · nullable  
    Position.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found) · [`unknown_metric`](/problems/unknown_metric) · [`invalid_filter`](/problems/invalid_filter) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout)

### Example
```http
GET https://api.askkelly.ai/v1/players/plr_znvh1bpfvdj2d79szye4/history
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "player_history",
  "snapshot_id": "snap_52",
  "data_through": {},
  "stale": false,
  "table": {
    "columns": [
      {
        "name": "player",
        "label": "Player",
        "type": "string"
      },
      {
        "name": "season",
        "label": "Season",
        "type": "string"
      },
      {
        "name": "games",
        "label": "Games",
        "type": "integer"
      },
      {
        "name": "games_played",
        "label": "Games played",
        "type": "integer",
        "unit": "games",
        "metric_id": "nba.games_played",
        "metric_version": "1.0.0"
      },
      {
        "name": "games_started",
        "label": "Games started",
        "type": "integer",
        "unit": "games",
        "metric_id": "nba.games_started",
        "metric_version": "1.0.0"
      },
      {
        "name": "minutes",
        "label": "Minutes",
        "type": "integer",
        "unit": "min",
        "metric_id": "nba.minutes",
        "metric_version": "1.0.0"
      },
      {
        "name": "points",
        "label": "Points",
        "type": "integer",
        "unit": "pts",
        "metric_id": "nba.points",
        "metric_version": "1.0.0"
      },
      {
        "name": "rebounds",
        "label": "Rebounds",
        "type": "integer",
        "unit": "reb",
        "metric_id": "nba.rebounds",
        "metric_version": "1.0.0"
      },
      {
        "name": "offensive_rebounds",
        "label": "Offensive rebounds",
        "type": "integer",
        "unit": "reb",
        "metric_id": "nba.offensive_rebounds",
        "metric_version": "1.0.0"
      },
      {
        "name": "defensive_rebounds",
        "label": "Defensive rebounds",
        "type": "integer",
        "unit": "reb",
        "metric_id": "nba.defensive_rebounds",
        "metric_version": "1.0.0"
      }
    ],
    "rows": [
      [
        "Pat One",
        "2025-26",
        3,
        3,
        null,
        114,
        96,
        10,
        null,
        null
      ]
    ],
    "row_count": 1,
    "total_rows": 1
  },
  "sources": [
    {
      "key": "s1",
      "source": "balldontlie",
      "licence": "BALLDONTLIE Terms of Service, last updated September 17, 2026, §6: Data may be used for lawful commercial purposes, incl",
      "snapshot_id": "snap_52",
      "recorded_at": null,
      "official": true,
      "reconstructed": false,
      "disagrees": false,
      "precedence": 1
    }
  ],
  "coverage_notes": [
    {
      "metric_id": "nba.defensive_rebounds",
      "seasons": "2025-26",
      "status": "incomplete",
      "text": "3 of 3 games have no value"
    },
    {
      "metric_id": "nba.offensive_rebounds",
      "seasons": "2025-26",
      "status": "incomplete",
      "text": "3 of 3 games have no value"
    },
    {
      "metric_id": "nba.rebounds",
      "seasons": "2025-26",
      "status": "incomplete",
      "text": "2 of 3 games have no value"
    }
  ],
  "ambiguity": null,
  "sample": null,
  "read_from": "lake",
  "player": {
    "id": "plr_znvh1bpfvdj2d79szye4",
    "name": "Pat One",
    "position": "G"
  },
  "summary": "Pat One's seasons: 1 rows, as of 2026-11-06T00:00:00Z.",
  "assumptions": [
    "Regular season only (season_type=regular).",
    "The catalogue's default stats for a nba player.",
    "Every season Kelly covers for these stats.",
    "Each season's line from the source Kelly serves first by precedence (balldontlie, kelly), else the sum of its games.",
    "All seasons Kelly holds.",
    "Stat catalogue 1.0.0; a missing value is not zero, and games without it are left out of its total."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-11-06T00:00:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_83516e3943bf7e73af4fff52",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

`GET /v1/teams/{team_id}/history`

## Get a team's history
public, no key needed · 1 credit, not charged during the beta · MCP tool `get_team_history` · status live

A franchise's seasons (record, points, finish, playoffs, coach), head-to-head against one opponent, coaches or games, with the franchise's names and cities over time.

### Parameters
- `team_id` string · path · required  
  A team ID (tm_…) from resolve_entity.

- `view` string · query  
  seasons (default), head_to_head, coaches or games.  
  One of: `seasons`, `head_to_head`, `coaches`, `games` (open: new values may be added).
- `opponent_id` string · query  
  The opponent (tm_…), required with head_to_head.
- `from_season` string · query  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string · query  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `as_of` string · query  
  Answer as Kelly knew it at this time (RFC 3339); default now.  
  format date-time
- `snapshot_id` string · query  
  A snapshot_id an earlier history result returned, to read the same data again.  
  pattern ^snap_[0-9]{1,18}$
- `response_format` string · query  
  concise (default: key columns, 25 rows) or detailed (IDs, every column, up to 200 rows).  
  One of: `concise`, `detailed` (open: new values may be added).
- `limit` integer · query  
  Rows per page, 1 to 200; default 25.  
  min 1 · max 200
- `cursor` string · query  
  A result's next value, for the next page.
- `season_type` string · query  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).

### Response
`200` The team history facts.

- `object` const · required  
  Always team_history.  
  Always `"team_history"`.
- `snapshot_id` string · required · nullable  
  The lake snapshot read; pass it back to read the same data.  
  pattern ^snap_[0-9]{1,18}$
- `read_from` string  
  lake, lake+neon or neon (the fallback).  
  One of: `lake`, `lake+neon`, `neon` (open: new values may be added).
- `data_through` object · required  
  The newest final game included, per sport.
- `stale` boolean · required  
  A freshness target was missed.
- `table` object · required · nullable  
  Rows as columns plus rows, units in the columns. Concise results leave out ID columns; detailed ones keep them.
  - `columns` array of object · required  
    The columns, in row order.
    - `name` string · required  
      The column's name.
    - `label` string · required  
      Its label, as a person reads it.
    - `type` string · required  
      string, integer, number, boolean, date or id.  
      One of: `string`, `integer`, `number`, `boolean`, `date`, `id` (open: new values may be added).
    - `unit` string  
      The stat's unit (yd, pts, fraction).
    - `metric_id` string  
      The stat's catalogue ID ({competition}.{stat_key}).
    - `metric_version` string  
      The stat definition's version (semver).
    - `source_key` string  
      The key in sources its values come from.
  - `rows` array of array · required  
    The rows on this page.
  - `row_count` integer · required  
    Rows on this page.
  - `total_rows` integer · required  
    Rows in the whole result.
  - `withheld` array of object  
    Columns this surface may not carry.
    - `column` string · required  
      Its name.
    - `reason` string · required  
      Why: the Rights Register entry that keeps it off this surface.
- `sources` array of object · required  
  Every source the values came from, by precedence.
  - `key` string · required  
    The key columns point at (s1, s2...).
  - `source` string · required  
    The source's name in Kelly's Rights Register.
  - `licence` string · required  
    Its licence or terms, in short.
  - `attribution` string · nullable  
    The credit line it requires.
  - `snapshot_id` string · required · nullable  
    The lake snapshot read.  
    pattern ^snap_[0-9]{1,18}$
  - `recorded_at` string · required · nullable  
    When Kelly recorded the values.  
    format date-time
  - `official` boolean · required  
    The league's official figures.
  - `reconstructed` boolean · required  
    Rebuilt from play-by-play rather than a box score.
  - `disagrees` boolean · required  
    Another source differs beyond tolerance.
  - `precedence` integer · required  
    Its rank when sources disagree; 1 is served.
- `coverage_notes` array of object · required  
  What's missing or unofficial in the span.
  - `metric_id` string · required  
    The stat's catalogue ID.
  - `seasons` string · required  
    The seasons, one or a range.
  - `status` string · required  
    absent, incomplete, unofficial, reconstructed or tier_locked.  
    One of: `official`, `unofficial`, `reconstructed`, `incomplete`, `absent`, `tier_locked` (open: new values may be added).
  - `text` string · required  
    One sentence to state in the answer.
- `ambiguity` object · required · nullable  
  Set when the input could mean more than one thing: no rows, and the question to ask the person.
  - `param` string · required  
    The input that's unclear.
  - `question` string · required  
    The question to ask.
  - `candidates` array of object · required  
    The choices.
    - `id` string  
      Its ID.
    - `label` string  
      How a person tells it apart.
- `sample` object · required · nullable  
  A trend's sample: the count, its 95% Wilson interval, a baseline and how many filters made it.
  - `n` integer · required  
    Games, pushes included.
  - `wins` integer · required  
    Wins (covers, overs).
  - `losses` integer · required  
    Losses.
  - `pushes` integer · required  
    Pushes.
  - `rate` number · required · nullable  
    Wins over decided games.
  - `ci_low` number · required · nullable  
    The interval's low end.
  - `ci_high` number · required · nullable  
    The interval's high end.
  - `ci_method` const · required  
    Always wilson_95.  
    Always `"wilson_95"`.
  - `baseline` object · required · nullable  
    The same kind of bet with no filters, over the same seasons.
    - `label` string · required  
      What the baseline counts.
    - `n` integer · required  
      Decided games in it.
    - `rate` number · required · nullable  
      Its rate.
  - `filters_applied` integer · required  
    Filters that narrowed the sample.
  - `small_sample` boolean · required  
    Too few games to read much into.
- `team` object  
  The team.
  - `id` string  
    Kelly ID.
  - `name` string  
    Name.
  - `competition` string · nullable  
    Its competition.
- `franchise` array of object  
  The franchise's names and cities over time.
- `head_to_head` object  
  Totals against the opponent: games, wins, losses, ties, points for and against.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found) · [`unknown_metric`](/problems/unknown_metric) · [`invalid_filter`](/problems/invalid_filter) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout)

### Example
```http
GET https://api.askkelly.ai/v1/teams/tm_b4w5y9xy5f9sgg1cmkvy/history?view=head_to_head&opponent_id=tm_205kvyzpxcr3et677thx
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "team_history",
  "snapshot_id": "snap_52",
  "data_through": {},
  "stale": false,
  "table": {
    "columns": [
      {
        "name": "season",
        "label": "Season",
        "type": "string"
      },
      {
        "name": "games",
        "label": "Games",
        "type": "integer"
      },
      {
        "name": "wins",
        "label": "Wins",
        "type": "integer"
      },
      {
        "name": "losses",
        "label": "Losses",
        "type": "integer"
      },
      {
        "name": "ties",
        "label": "Ties",
        "type": "integer"
      },
      {
        "name": "score_for",
        "label": "Score for",
        "type": "integer"
      },
      {
        "name": "score_against",
        "label": "Score against",
        "type": "integer"
      }
    ],
    "rows": [
      [
        "2025-26",
        3,
        2,
        0,
        1,
        335,
        319
      ]
    ],
    "row_count": 1,
    "total_rows": 1
  },
  "sources": [
    {
      "key": "s1",
      "source": "balldontlie",
      "licence": "BALLDONTLIE Terms of Service, last updated September 17, 2026, §6: Data may be used for lawful commercial purposes, incl",
      "snapshot_id": "snap_52",
      "recorded_at": null,
      "official": true,
      "reconstructed": false,
      "disagrees": false,
      "precedence": 1
    }
  ],
  "coverage_notes": [],
  "ambiguity": null,
  "sample": null,
  "read_from": "lake",
  "team": {
    "id": "tm_b4w5y9xy5f9sgg1cmkvy",
    "name": "Home Hawks",
    "competition": "nba"
  },
  "franchise": [
    {
      "name": "Home Hawks",
      "from_season": "2025-26",
      "to_season": "2025-26",
      "games": 3
    }
  ],
  "head_to_head": {
    "games": 3,
    "wins": 2,
    "losses": 0,
    "ties": 1,
    "score_for": 335,
    "score_against": 319
  },
  "summary": "Home Hawks against that opponent: 2-0-1 in 3 games.",
  "assumptions": [
    "Regular season only (season_type=regular)."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-11-06T00:00:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_bb01d8a7b03b179cf1434175",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

```http
GET https://api.askkelly.ai/v1/teams/tm_b4w5y9xy5f9sgg1cmkvy/history
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "team_history",
  "snapshot_id": "snap_52",
  "data_through": {},
  "stale": false,
  "table": {
    "columns": [
      {
        "name": "season",
        "label": "Season",
        "type": "string"
      },
      {
        "name": "games",
        "label": "Games",
        "type": "integer"
      },
      {
        "name": "wins",
        "label": "Wins",
        "type": "integer"
      },
      {
        "name": "losses",
        "label": "Losses",
        "type": "integer"
      },
      {
        "name": "ties",
        "label": "Ties",
        "type": "integer"
      },
      {
        "name": "win_pct",
        "label": "Win %",
        "type": "number",
        "unit": "fraction"
      },
      {
        "name": "score_for",
        "label": "Score for",
        "type": "integer"
      },
      {
        "name": "score_against",
        "label": "Score against",
        "type": "integer"
      },
      {
        "name": "margin",
        "label": "Margin",
        "type": "integer"
      }
    ],
    "rows": [
      [
        "2025-26",
        3,
        2,
        0,
        1,
        0.833,
        335,
        319,
        16
      ]
    ],
    "row_count": 1,
    "total_rows": 1
  },
  "sources": [
    {
      "key": "s1",
      "source": "balldontlie",
      "licence": "BALLDONTLIE Terms of Service, last updated September 17, 2026, §6: Data may be used for lawful commercial purposes, incl",
      "snapshot_id": "snap_52",
      "recorded_at": null,
      "official": true,
      "reconstructed": false,
      "disagrees": false,
      "precedence": 1
    }
  ],
  "coverage_notes": [],
  "ambiguity": null,
  "sample": null,
  "read_from": "lake",
  "team": {
    "id": "tm_b4w5y9xy5f9sgg1cmkvy",
    "name": "Home Hawks",
    "competition": "nba"
  },
  "franchise": [
    {
      "name": "Home Hawks",
      "from_season": "2025-26",
      "to_season": "2025-26",
      "games": 3
    }
  ],
  "summary": "Home Hawks's seasons: 1 rows, as of 2026-11-06T00:00:00Z.",
  "assumptions": [
    "Regular season only (season_type=regular)."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-11-06T00:00:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_a62840c10a1d308fe4c7a2fe",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

`GET /v1/games/{game_id}/history`

## Get a past game
public, no key needed · 1 credit, not charged during the beta · MCP tool `get_game_history` · status live

Any past game's line score, box score, closing lines and context.

### Parameters
- `game_id` string · path · required  
  A game ID (gm_…) from resolve_entity.

- `include` array of string · query  
  Parts; default line_score and box_score.
- `as_of` string · query  
  Answer as Kelly knew it at this time (RFC 3339); default now.  
  format date-time
- `snapshot_id` string · query  
  A snapshot_id an earlier history result returned, to read the same data again.  
  pattern ^snap_[0-9]{1,18}$
- `response_format` string · query  
  concise (default: key columns, 25 rows) or detailed (IDs, every column, up to 200 rows).  
  One of: `concise`, `detailed` (open: new values may be added).
- `limit` integer · query  
  Rows per page, 1 to 200; default 25.  
  min 1 · max 200
- `cursor` string · query  
  A result's next value, for the next page.
- `season_type` string · query  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).

### Response
`200` The game history facts.

- `object` const · required  
  Always game_history.  
  Always `"game_history"`.
- `snapshot_id` string · required · nullable  
  The lake snapshot read; pass it back to read the same data.  
  pattern ^snap_[0-9]{1,18}$
- `read_from` string  
  lake, lake+neon or neon (the fallback).  
  One of: `lake`, `lake+neon`, `neon` (open: new values may be added).
- `data_through` object · required  
  The newest final game included, per sport.
- `stale` boolean · required  
  A freshness target was missed.
- `table` object · required · nullable  
  Rows as columns plus rows, units in the columns. Concise results leave out ID columns; detailed ones keep them.
  - `columns` array of object · required  
    The columns, in row order.
    - `name` string · required  
      The column's name.
    - `label` string · required  
      Its label, as a person reads it.
    - `type` string · required  
      string, integer, number, boolean, date or id.  
      One of: `string`, `integer`, `number`, `boolean`, `date`, `id` (open: new values may be added).
    - `unit` string  
      The stat's unit (yd, pts, fraction).
    - `metric_id` string  
      The stat's catalogue ID ({competition}.{stat_key}).
    - `metric_version` string  
      The stat definition's version (semver).
    - `source_key` string  
      The key in sources its values come from.
  - `rows` array of array · required  
    The rows on this page.
  - `row_count` integer · required  
    Rows on this page.
  - `total_rows` integer · required  
    Rows in the whole result.
  - `withheld` array of object  
    Columns this surface may not carry.
    - `column` string · required  
      Its name.
    - `reason` string · required  
      Why: the Rights Register entry that keeps it off this surface.
- `sources` array of object · required  
  Every source the values came from, by precedence.
  - `key` string · required  
    The key columns point at (s1, s2...).
  - `source` string · required  
    The source's name in Kelly's Rights Register.
  - `licence` string · required  
    Its licence or terms, in short.
  - `attribution` string · nullable  
    The credit line it requires.
  - `snapshot_id` string · required · nullable  
    The lake snapshot read.  
    pattern ^snap_[0-9]{1,18}$
  - `recorded_at` string · required · nullable  
    When Kelly recorded the values.  
    format date-time
  - `official` boolean · required  
    The league's official figures.
  - `reconstructed` boolean · required  
    Rebuilt from play-by-play rather than a box score.
  - `disagrees` boolean · required  
    Another source differs beyond tolerance.
  - `precedence` integer · required  
    Its rank when sources disagree; 1 is served.
- `coverage_notes` array of object · required  
  What's missing or unofficial in the span.
  - `metric_id` string · required  
    The stat's catalogue ID.
  - `seasons` string · required  
    The seasons, one or a range.
  - `status` string · required  
    absent, incomplete, unofficial, reconstructed or tier_locked.  
    One of: `official`, `unofficial`, `reconstructed`, `incomplete`, `absent`, `tier_locked` (open: new values may be added).
  - `text` string · required  
    One sentence to state in the answer.
- `ambiguity` object · required · nullable  
  Set when the input could mean more than one thing: no rows, and the question to ask the person.
  - `param` string · required  
    The input that's unclear.
  - `question` string · required  
    The question to ask.
  - `candidates` array of object · required  
    The choices.
    - `id` string  
      Its ID.
    - `label` string  
      How a person tells it apart.
- `sample` object · required · nullable  
  A trend's sample: the count, its 95% Wilson interval, a baseline and how many filters made it.
  - `n` integer · required  
    Games, pushes included.
  - `wins` integer · required  
    Wins (covers, overs).
  - `losses` integer · required  
    Losses.
  - `pushes` integer · required  
    Pushes.
  - `rate` number · required · nullable  
    Wins over decided games.
  - `ci_low` number · required · nullable  
    The interval's low end.
  - `ci_high` number · required · nullable  
    The interval's high end.
  - `ci_method` const · required  
    Always wilson_95.  
    Always `"wilson_95"`.
  - `baseline` object · required · nullable  
    The same kind of bet with no filters, over the same seasons.
    - `label` string · required  
      What the baseline counts.
    - `n` integer · required  
      Decided games in it.
    - `rate` number · required · nullable  
      Its rate.
  - `filters_applied` integer · required  
    Filters that narrowed the sample.
  - `small_sample` boolean · required  
    Too few games to read much into.
- `game` object  
  The game: name, start, status, competition, season, teams, final score, venue.
- `line_score` object · nullable  
  A table for this part of the game.
  - `columns` array of object · required  
    The columns, in row order.
    - `name` string · required  
      The column's name.
    - `label` string · required  
      Its label, as a person reads it.
    - `type` string · required  
      string, integer, number, boolean, date or id.  
      One of: `string`, `integer`, `number`, `boolean`, `date`, `id` (open: new values may be added).
    - `unit` string  
      The stat's unit (yd, pts, fraction).
    - `metric_id` string  
      The stat's catalogue ID ({competition}.{stat_key}).
    - `metric_version` string  
      The stat definition's version (semver).
    - `source_key` string  
      The key in sources its values come from.
  - `rows` array of array · required  
    The rows on this page.
  - `row_count` integer · required  
    Rows on this page.
  - `total_rows` integer · required  
    Rows in the whole result.
  - `withheld` array of object  
    Columns this surface may not carry.
    - `column` string · required  
      Its name.
    - `reason` string · required  
      Why: the Rights Register entry that keeps it off this surface.
- `box_score` object · nullable  
  A table for this part of the game.
  - `columns` array of object · required  
    The columns, in row order.
    - `name` string · required  
      The column's name.
    - `label` string · required  
      Its label, as a person reads it.
    - `type` string · required  
      string, integer, number, boolean, date or id.  
      One of: `string`, `integer`, `number`, `boolean`, `date`, `id` (open: new values may be added).
    - `unit` string  
      The stat's unit (yd, pts, fraction).
    - `metric_id` string  
      The stat's catalogue ID ({competition}.{stat_key}).
    - `metric_version` string  
      The stat definition's version (semver).
    - `source_key` string  
      The key in sources its values come from.
  - `rows` array of array · required  
    The rows on this page.
  - `row_count` integer · required  
    Rows on this page.
  - `total_rows` integer · required  
    Rows in the whole result.
  - `withheld` array of object  
    Columns this surface may not carry.
    - `column` string · required  
      Its name.
    - `reason` string · required  
      Why: the Rights Register entry that keeps it off this surface.
- `context` object · nullable  
  A table for this part of the game.
  - `columns` array of object · required  
    The columns, in row order.
    - `name` string · required  
      The column's name.
    - `label` string · required  
      Its label, as a person reads it.
    - `type` string · required  
      string, integer, number, boolean, date or id.  
      One of: `string`, `integer`, `number`, `boolean`, `date`, `id` (open: new values may be added).
    - `unit` string  
      The stat's unit (yd, pts, fraction).
    - `metric_id` string  
      The stat's catalogue ID ({competition}.{stat_key}).
    - `metric_version` string  
      The stat definition's version (semver).
    - `source_key` string  
      The key in sources its values come from.
  - `rows` array of array · required  
    The rows on this page.
  - `row_count` integer · required  
    Rows on this page.
  - `total_rows` integer · required  
    Rows in the whole result.
  - `withheld` array of object  
    Columns this surface may not carry.
    - `column` string · required  
      Its name.
    - `reason` string · required  
      Why: the Rights Register entry that keeps it off this surface.
- `lines` object · nullable  
  A table for this part of the game.
  - `columns` array of object · required  
    The columns, in row order.
    - `name` string · required  
      The column's name.
    - `label` string · required  
      Its label, as a person reads it.
    - `type` string · required  
      string, integer, number, boolean, date or id.  
      One of: `string`, `integer`, `number`, `boolean`, `date`, `id` (open: new values may be added).
    - `unit` string  
      The stat's unit (yd, pts, fraction).
    - `metric_id` string  
      The stat's catalogue ID ({competition}.{stat_key}).
    - `metric_version` string  
      The stat definition's version (semver).
    - `source_key` string  
      The key in sources its values come from.
  - `rows` array of array · required  
    The rows on this page.
  - `row_count` integer · required  
    Rows on this page.
  - `total_rows` integer · required  
    Rows in the whole result.
  - `withheld` array of object  
    Columns this surface may not carry.
    - `column` string · required  
      Its name.
    - `reason` string · required  
      Why: the Rights Register entry that keeps it off this surface.
- `scoring_summary` array of object  
  Derived scoring summaries; play rows stay internal.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found) · [`unknown_metric`](/problems/unknown_metric) · [`invalid_filter`](/problems/invalid_filter) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout)

### Example
```http
GET https://api.askkelly.ai/v1/games/gm_1hnx5nrmk4xjpz6fzyfz/history
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "game_history",
  "snapshot_id": "snap_52",
  "data_through": {},
  "stale": false,
  "table": null,
  "sources": [
    {
      "key": "s1",
      "source": "balldontlie",
      "licence": "BALLDONTLIE Terms of Service, last updated September 17, 2026, §6: Data may be used for lawful commercial purposes, incl",
      "snapshot_id": "snap_52",
      "recorded_at": null,
      "official": true,
      "reconstructed": false,
      "disagrees": false,
      "precedence": 1
    }
  ],
  "coverage_notes": [],
  "ambiguity": null,
  "sample": null,
  "read_from": "lake",
  "game": {
    "game_id": "gm_1hnx5nrmk4xjpz6fzyfz",
    "name": "Away Owls at Home Hawks",
    "date": "2025-10-21",
    "start_time": "2025-10-21T23:30:00Z",
    "competition": "nba",
    "season_label": "2025-26",
    "season_type": "regular",
    "neutral_site": false,
    "home_team_id": "tm_b4w5y9xy5f9sgg1cmkvy",
    "away_team_id": "tm_205kvyzpxcr3et677thx",
    "home_team": "Home Hawks",
    "away_team": "Away Owls",
    "home_score": 110,
    "away_score": 100
  },
  "box_score": {
    "columns": [
      {
        "name": "competition_id",
        "label": "Competition id",
        "type": "string"
      },
      {
        "name": "competition",
        "label": "Competition",
        "type": "string"
      },
      {
        "name": "sport",
        "label": "Sport",
        "type": "string"
      },
      {
        "name": "season_id",
        "label": "Season id",
        "type": "string"
      },
      {
        "name": "season_label",
        "label": "Season",
        "type": "string"
      },
      {
        "name": "season_type",
        "label": "Season type",
        "type": "string"
      },
      {
        "name": "game_date",
        "label": "Date",
        "type": "date"
      },
      {
        "name": "start_time",
        "label": "Start time",
        "type": "string"
      },
      {
        "name": "home",
        "label": "Home",
        "type": "boolean"
      },
      {
        "name": "neutral",
        "label": "Neutral",
        "type": "string"
      },
      {
        "name": "result",
        "label": "Result",
        "type": "string"
      },
      {
        "name": "started",
        "label": "Started",
        "type": "string"
      },
      {
        "name": "valid_at",
        "label": "Valid at",
        "type": "string"
      },
      {
        "name": "source_ts",
        "label": "Source ts",
        "type": "string"
      },
      {
        "name": "recorded_at",
        "label": "Recorded at",
        "type": "string"
      },
      {
        "name": "assumed_known_at",
        "label": "Assumed known at",
        "type": "string"
      },
      {
        "name": "known_at",
        "label": "Known at",
        "type": "string"
      },
      {
        "name": "minutes",
        "label": "Minutes",
        "type": "integer",
        "unit": "min",
        "metric_id": "nba.minutes",
        "metric_version": "1.0.0"
      },
      {
        "name": "points",
        "label": "Points",
        "type": "integer",
        "unit": "pts",
        "metric_id": "nba.points",
        "metric_version": "1.0.0"
      },
      {
        "name": "rebounds",
        "label": "Rebounds",
        "type": "integer",
        "unit": "reb",
        "metric_id": "nba.rebounds",
        "metric_version": "1.0.0"
      },
      {
        "name": "offensive_rebounds",
        "label": "Offensive rebounds",
        "type": "integer",
        "unit": "reb",
        "metric_id": "nba.offensive_rebounds",
        "metric_version": "1.0.0"
      },
      {
        "name": "defensive_rebounds",
        "label": "Defensive rebounds",
        "type": "integer",
        "unit": "reb",
        "metric_id": "nba.defensive_rebounds",
        "metric_version": "1.0.0"
      },
      {
        "name": "assists",
        "label": "Assists",
        "type": "integer",
        "unit": "ast",
        "metric_id": "nba.assists",
        "metric_version": "1.0.0"
      },
      {
        "name": "steals",
        "label": "Steals",
        "type": "integer",
        "unit": "stl",
        "metric_id": "nba.steals",
        "metric_version": "1.0.0"
      },
      {
        "name": "blocks",
        "label": "Blocks",
        "type": "integer",
        "unit": "blk",
        "metric_id": "nba.blocks",
        "metric_version": "1.0.0"
      },
      {
        "name": "turnovers",
        "label": "Turnovers",
        "type": "integer",
        "unit": "tov",
        "metric_id": "nba.turnovers",
        "metric_version": "1.0.0"
      },
      {
        "name": "fouls",
        "label": "Personal fouls",
        "type": "integer",
        "unit": "pf",
        "metric_id": "nba.fouls",
        "metric_version": "1.0.0"
      },
      {
        "name": "fg_made",
        "label": "Field goals made",
        "type": "integer",
        "unit": "fg",
        "metric_id": "nba.fg_made",
        "metric_version": "1.0.0"
      },
      {
        "name": "fg_attempted",
        "label": "Field goals attempted",
        "type": "integer",
        "unit": "fga",
        "metric_id": "nba.fg_attempted",
        "metric_version": "1.0.0"
      },
      {
        "name": "fg_pct",
        "label": "Field goal percentage",
        "type": "number",
        "unit": "fraction",
        "metric_id": "nba.fg_pct",
        "metric_version": "1.0.0"
      },
      {
        "name": "fg3_made",
        "label": "Three-pointers made",
        "type": "integer",
        "unit": "fg3",
        "metric_id": "nba.fg3_made",
        "metric_version": "1.0.0"
      },
      {
        "name": "fg3_attempted",
        "label": "Three-pointers attempted",
        "type": "integer",
        "unit": "fg3a",
        "metric_id": "nba.fg3_attempted",
        "metric_version": "1.0.0"
      },
      {
        "name": "fg3_pct",
        "label": "Three-point percentage",
        "type": "number",
        "unit": "fraction",
        "metric_id": "nba.fg3_pct",
        "metric_version": "1.0.0"
      },
      {
        "name": "ft_made",
        "label": "Free throws made",
        "type": "integer",
        "unit": "ft",
        "metric_id": "nba.ft_made",
        "metric_version": "1.0.0"
      },
      {
        "name": "ft_attempted",
        "label": "Free throws attempted",
        "type": "integer",
        "unit": "fta",
        "metric_id": "nba.ft_attempted",
        "metric_version": "1.0.0"
      },
      {
        "name": "ft_pct",
        "label": "Free throw percentage",
        "type": "number",
        "unit": "fraction",
        "metric_id": "nba.ft_pct",
        "metric_version": "1.0.0"
      },
      {
        "name": "plus_minus",
        "label": "Plus-minus",
        "type": "integer",
        "unit": "pts",
        "metric_id": "nba.plus_minus",
        "metric_version": "1.0.0"
      },
      {
        "name": "effective_fg_pct",
        "label": "Effective field goal percentage",
        "type": "number",
        "unit": "fraction",
        "metric_id": "nba.effective_fg_pct",
        "metric_version": "1.0.0"
      },
      {
        "name": "true_shooting_pct",
        "label": "True shooting percentage",
        "type": "number",
        "unit": "fraction",
        "metric_id": "nba.true_shooting_pct",
        "metric_version": "1.0.0"
      },
      {
        "name": "assist_to_turnover",
        "label": "Assist-to-turnover ratio",
        "type": "number",
        "unit": "ratio",
        "metric_id": "nba.assist_to_turnover",
        "metric_version": "1.0.0"
      }
    ],
    "rows": [
      [
        "cmp_mm0mp7dsd2retmqgfps5",
        "nba",
        "basketball",
        "ssn_7zj2aaf4knqg0p3bzrj8",
        "2025-26",
        "regular",
        "2025-10-21",
        "2025-10-21T23:30:00Z",
        false,
        false,
        "L",
        true,
        "2025-10-21T23:30:00Z",
        "2025-10-21T23:30:00Z",
        "2025-11-01T09:00:00Z",
        null,
        "2025-11-01T09:00:00Z",
        40,
        28,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        10,
        22,
        null,
        null,
        null,
        null,
        null,
        6,
        null,
        null,
        null,
        null,
        null
      ],
      [
        "cmp_mm0mp7dsd2retmqgfps5",
        "nba",
        "basketball",
        "ssn_7zj2aaf4knqg0p3bzrj8",
        "2025-26",
        "regular",
        "2025-10-21",
        "2025-10-21T23:30:00Z",
        true,
        false,
        "W",
        true,
        "2025-10-21T23:30:00Z",
        "2025-10-21T23:30:00Z",
        "2025-11-01T09:00:00Z",
        null,
        "2025-11-01T09:00:00Z",
        30,
        12,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        5,
        9,
        null,
        null,
        null,
        null,
        null,
        2,
        null,
        null,
        null,
        null,
        null
      ],
      [
        "cmp_mm0mp7dsd2retmqgfps5",
        "nba",
        "basketball",
        "ssn_7zj2aaf4knqg0p3bzrj8",
        "2025-26",
        "regular",
        "2025-10-21",
        "2025-10-21T23:30:00Z",
        true,
        false,
        "W",
        true,
        "2025-10-21T23:30:00Z",
        "2025-10-21T23:30:00Z",
        "2025-11-01T09:00:00Z",
        null,
        "2025-11-01T09:00:00Z",
        36,
        30,
        10,
        null,
        null,
        null,
        null,
        2,
        null,
        null,
        11,
        20,
        null,
        null,
        null,
        null,
        null,
        8,
        null,
        null,
        null,
        null,
        null
      ]
    ],
    "row_count": 3,
    "total_rows": 3
  },
  "summary": "Away Owls at Home Hawks on 2025-10-21: 100-110.",
  "assumptions": [
    "Kelly's lake doesn't hold the line score yet."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-11-06T00:00:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_6a3ef0d12db67b8853eda7ce",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

```http
GET https://api.askkelly.ai/v1/games/gm_zzzzzzzzzzzzzzzzzzzz/history
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/not_found",
  "title": "Not found",
  "status": 404,
  "code": "not_found",
  "detail": "No game with that ID; resolve_entity finds one by teams and date.",
  "param": "game_id",
  "doc_url": "https://docs.askkelly.ai/problems/not_found",
  "request_id": "req_b702bda388f13c4c3ea39778",
  "retryable": false,
  "display_message": "That could not be found."
}
```

`GET /v1/records`

## Get records
public, no key needed · 1 credit, not charged during the beta · MCP tool `get_records` · status live

All-time (career), season and single-game records for a stat, with the qualifier applied; withheld when the span has games without the stat.

### Parameters
- `competition` string · query · required  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...  
  pattern ^[a-z0-9_]{2,24}$
- `metric_id` string · query · required  
  The stat's ID or name.  
  min length 1 · max length 64
- `scope` string · query · required  
  single_game, season or career.  
  One of: `single_game`, `season`, `career` (open: new values may be added).
- `entity` string · query  
  player (default) or team.  
  One of: `player`, `team` (open: new values may be added).
- `filters` array of string · query  
  Rows to keep, each '<field> <op> <value>' with op = != > >= < <= in between, e.g. 'passing_yards >= 300', 'home = false', 'spread between 6.5..7.5'.  
  max items 12
- `from_season` string · query  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string · query  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `min_sample` integer · query  
  Override the qualifier.  
  min 0
- `active_only` boolean · query  
  Only players or teams active now.
- `as_of` string · query  
  Answer as Kelly knew it at this time (RFC 3339); default now.  
  format date-time
- `snapshot_id` string · query  
  A snapshot_id an earlier history result returned, to read the same data again.  
  pattern ^snap_[0-9]{1,18}$
- `response_format` string · query  
  concise (default: key columns, 25 rows) or detailed (IDs, every column, up to 200 rows).  
  One of: `concise`, `detailed` (open: new values may be added).
- `limit` integer · query  
  Rows per page, 1 to 200; default 25.  
  min 1 · max 200
- `cursor` string · query  
  A result's next value, for the next page.
- `season_type` string · query  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).

### Response
`200` The records facts.

- `object` const · required  
  Always records.  
  Always `"records"`.
- `snapshot_id` string · required · nullable  
  The lake snapshot read; pass it back to read the same data.  
  pattern ^snap_[0-9]{1,18}$
- `read_from` string  
  lake, lake+neon or neon (the fallback).  
  One of: `lake`, `lake+neon`, `neon` (open: new values may be added).
- `data_through` object · required  
  The newest final game included, per sport.
- `stale` boolean · required  
  A freshness target was missed.
- `table` object · required · nullable  
  Rows as columns plus rows, units in the columns. Concise results leave out ID columns; detailed ones keep them.
  - `columns` array of object · required  
    The columns, in row order.
    - `name` string · required  
      The column's name.
    - `label` string · required  
      Its label, as a person reads it.
    - `type` string · required  
      string, integer, number, boolean, date or id.  
      One of: `string`, `integer`, `number`, `boolean`, `date`, `id` (open: new values may be added).
    - `unit` string  
      The stat's unit (yd, pts, fraction).
    - `metric_id` string  
      The stat's catalogue ID ({competition}.{stat_key}).
    - `metric_version` string  
      The stat definition's version (semver).
    - `source_key` string  
      The key in sources its values come from.
  - `rows` array of array · required  
    The rows on this page.
  - `row_count` integer · required  
    Rows on this page.
  - `total_rows` integer · required  
    Rows in the whole result.
  - `withheld` array of object  
    Columns this surface may not carry.
    - `column` string · required  
      Its name.
    - `reason` string · required  
      Why: the Rights Register entry that keeps it off this surface.
- `sources` array of object · required  
  Every source the values came from, by precedence.
  - `key` string · required  
    The key columns point at (s1, s2...).
  - `source` string · required  
    The source's name in Kelly's Rights Register.
  - `licence` string · required  
    Its licence or terms, in short.
  - `attribution` string · nullable  
    The credit line it requires.
  - `snapshot_id` string · required · nullable  
    The lake snapshot read.  
    pattern ^snap_[0-9]{1,18}$
  - `recorded_at` string · required · nullable  
    When Kelly recorded the values.  
    format date-time
  - `official` boolean · required  
    The league's official figures.
  - `reconstructed` boolean · required  
    Rebuilt from play-by-play rather than a box score.
  - `disagrees` boolean · required  
    Another source differs beyond tolerance.
  - `precedence` integer · required  
    Its rank when sources disagree; 1 is served.
- `coverage_notes` array of object · required  
  What's missing or unofficial in the span.
  - `metric_id` string · required  
    The stat's catalogue ID.
  - `seasons` string · required  
    The seasons, one or a range.
  - `status` string · required  
    absent, incomplete, unofficial, reconstructed or tier_locked.  
    One of: `official`, `unofficial`, `reconstructed`, `incomplete`, `absent`, `tier_locked` (open: new values may be added).
  - `text` string · required  
    One sentence to state in the answer.
- `ambiguity` object · required · nullable  
  Set when the input could mean more than one thing: no rows, and the question to ask the person.
  - `param` string · required  
    The input that's unclear.
  - `question` string · required  
    The question to ask.
  - `candidates` array of object · required  
    The choices.
    - `id` string  
      Its ID.
    - `label` string  
      How a person tells it apart.
- `sample` object · required · nullable  
  A trend's sample: the count, its 95% Wilson interval, a baseline and how many filters made it.
  - `n` integer · required  
    Games, pushes included.
  - `wins` integer · required  
    Wins (covers, overs).
  - `losses` integer · required  
    Losses.
  - `pushes` integer · required  
    Pushes.
  - `rate` number · required · nullable  
    Wins over decided games.
  - `ci_low` number · required · nullable  
    The interval's low end.
  - `ci_high` number · required · nullable  
    The interval's high end.
  - `ci_method` const · required  
    Always wilson_95.  
    Always `"wilson_95"`.
  - `baseline` object · required · nullable  
    The same kind of bet with no filters, over the same seasons.
    - `label` string · required  
      What the baseline counts.
    - `n` integer · required  
      Decided games in it.
    - `rate` number · required · nullable  
      Its rate.
  - `filters_applied` integer · required  
    Filters that narrowed the sample.
  - `small_sample` boolean · required  
    Too few games to read much into.
- `complete` boolean  
  Every game in the span has the stat.
- `qualifier` string · nullable  
  The qualifier applied.
- `withheld_reason` string · nullable  
  Why no records are given.
- `follow_ups` array of object  
  Calls that would answer.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found) · [`unknown_metric`](/problems/unknown_metric) · [`invalid_filter`](/problems/invalid_filter) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout)

### Example
```http
GET https://api.askkelly.ai/v1/records?competition=nba&metric_id=points&scope=single_game
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "records",
  "snapshot_id": "snap_52",
  "data_through": {},
  "stale": false,
  "table": {
    "columns": [
      {
        "name": "player",
        "label": "Player",
        "type": "string"
      },
      {
        "name": "season",
        "label": "Season",
        "type": "string"
      },
      {
        "name": "game_date",
        "label": "Date",
        "type": "date"
      },
      {
        "name": "opponent",
        "label": "Opponent",
        "type": "string"
      },
      {
        "name": "home",
        "label": "Home",
        "type": "boolean"
      },
      {
        "name": "result",
        "label": "Result",
        "type": "string"
      },
      {
        "name": "points",
        "label": "Points",
        "type": "integer",
        "unit": "pts",
        "metric_id": "nba.points",
        "metric_version": "1.0.0"
      },
      {
        "name": "games",
        "label": "Games",
        "type": "integer"
      }
    ],
    "rows": [
      [
        "Pat One",
        "2025-26",
        "2025-10-25",
        "Away Owls",
        true,
        "T",
        41,
        1
      ],
      [
        "Pip Three",
        "2025-26",
        "2025-10-22",
        "Home Hawks",
        true,
        "L",
        31,
        1
      ],
      [
        "Pat One",
        "2025-26",
        "2025-10-21",
        "Away Owls",
        true,
        "W",
        30,
        1
      ],
      [
        "Pip Three",
        "2025-26",
        "2025-10-21",
        "Home Hawks",
        false,
        "L",
        28,
        1
      ],
      [
        "Pat One",
        "2025-26",
        "2025-10-22",
        "Away Owls",
        false,
        "W",
        25,
        1
      ],
      [
        "Pam Two",
        "2025-26",
        "2025-10-21",
        "Away Owls",
        true,
        "W",
        12,
        1
      ]
    ],
    "row_count": 6,
    "total_rows": 6
  },
  "sources": [
    {
      "key": "s1",
      "source": "balldontlie",
      "licence": "BALLDONTLIE Terms of Service, last updated September 17, 2026, §6: Data may be used for lawful commercial purposes, incl",
      "snapshot_id": "snap_52",
      "recorded_at": null,
      "official": true,
      "reconstructed": false,
      "disagrees": false,
      "precedence": 1
    }
  ],
  "coverage_notes": [],
  "ambiguity": null,
  "sample": null,
  "read_from": "lake",
  "complete": true,
  "qualifier": null,
  "summary": "Single game Points records (nba): first Pat One, as of 2026-11-06T00:00:00Z.",
  "assumptions": [
    "Regular season only (season_type=regular).",
    "Every season Kelly covers for these stats.",
    "One row per game: the source Kelly serves first by precedence (balldontlie, kelly).",
    "All seasons Kelly holds.",
    "Stat catalogue 1.0.0; a missing value is not zero, and games without it are left out of its total."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-11-06T00:00:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_e58a33b9a51abe061e391757",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

```http
GET https://api.askkelly.ai/v1/records?competition=nba&metric_id=dunks_per_moon&scope=season
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/unknown_metric",
  "title": "Unknown stat",
  "status": 422,
  "code": "unknown_metric",
  "detail": "'dunks_per_moon' isn't a nba stat in Kelly's catalogue. describe_metrics lists them.",
  "param": "metric_id",
  "doc_url": "https://docs.askkelly.ai/problems/unknown_metric",
  "request_id": "req_28fec2a8301ca00dcff899ca",
  "retryable": false,
  "display_message": "Kelly doesn't track that stat."
}
```

`POST /v1/lines:history`

## Get a betting trend
public, no key needed · 1 credit, not charged during the beta · MCP tool `get_line_history` · status live

How a kind of bet did over past games (against the spread, over/under or straight up), with the sample size, a 95% Wilson interval, a baseline and how many filters made it.

### Parameters
Body, `application/json` (required):

- `competition` string  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...  
  pattern ^[a-z0-9_]{2,24}$
- `market` string  
  spread, total or moneyline.  
  One of: `spread`, `total`, `moneyline` (open: new values may be added).
- `side` string  
  favourite, underdog, home, away, over or under.  
  One of: `favourite`, `underdog`, `home`, `away`, `over`, `under` (open: new values may be added).
- `team_id` string  
  Only this team's games (tm_…).
- `line` string  
  close (default) or open.  
  One of: `open`, `close` (open: new values may be added).
- `filters` array of string  
  Games to keep (spread, total, price, rest_days, divisional, primetime...), each '<field> <op> <value>' with op = != > >= < <= in between, e.g. 'passing_yards >= 300', 'home = false', 'spread between 6.5..7.5'.  
  max items 12
- `from_season` string  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `from_date` string  
  First date (YYYY-MM-DD).  
  format date
- `to_date` string  
  Last date.  
  format date
- `include_games` boolean  
  Add the games, one row each.
- `as_of` string  
  Answer as Kelly knew it at this time (RFC 3339); default now.  
  format date-time
- `snapshot_id` string  
  A snapshot_id an earlier history result returned, to read the same data again.  
  pattern ^snap_[0-9]{1,18}$
- `response_format` string  
  concise (default: key columns, 25 rows) or detailed (IDs, every column, up to 200 rows).  
  One of: `concise`, `detailed` (open: new values may be added).
- `limit` integer  
  Rows per page, 1 to 200; default 25.  
  min 1 · max 200
- `cursor` string  
  A result's next value, for the next page.
- `season_type` string  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).

### Response
`200` The line history facts.

- `object` const · required  
  Always line_history.  
  Always `"line_history"`.
- `snapshot_id` string · required · nullable  
  The lake snapshot read; pass it back to read the same data.  
  pattern ^snap_[0-9]{1,18}$
- `read_from` string  
  lake, lake+neon or neon (the fallback).  
  One of: `lake`, `lake+neon`, `neon` (open: new values may be added).
- `data_through` object · required  
  The newest final game included, per sport.
- `stale` boolean · required  
  A freshness target was missed.
- `table` object · required · nullable  
  Rows as columns plus rows, units in the columns. Concise results leave out ID columns; detailed ones keep them.
  - `columns` array of object · required  
    The columns, in row order.
    - `name` string · required  
      The column's name.
    - `label` string · required  
      Its label, as a person reads it.
    - `type` string · required  
      string, integer, number, boolean, date or id.  
      One of: `string`, `integer`, `number`, `boolean`, `date`, `id` (open: new values may be added).
    - `unit` string  
      The stat's unit (yd, pts, fraction).
    - `metric_id` string  
      The stat's catalogue ID ({competition}.{stat_key}).
    - `metric_version` string  
      The stat definition's version (semver).
    - `source_key` string  
      The key in sources its values come from.
  - `rows` array of array · required  
    The rows on this page.
  - `row_count` integer · required  
    Rows on this page.
  - `total_rows` integer · required  
    Rows in the whole result.
  - `withheld` array of object  
    Columns this surface may not carry.
    - `column` string · required  
      Its name.
    - `reason` string · required  
      Why: the Rights Register entry that keeps it off this surface.
- `sources` array of object · required  
  Every source the values came from, by precedence.
  - `key` string · required  
    The key columns point at (s1, s2...).
  - `source` string · required  
    The source's name in Kelly's Rights Register.
  - `licence` string · required  
    Its licence or terms, in short.
  - `attribution` string · nullable  
    The credit line it requires.
  - `snapshot_id` string · required · nullable  
    The lake snapshot read.  
    pattern ^snap_[0-9]{1,18}$
  - `recorded_at` string · required · nullable  
    When Kelly recorded the values.  
    format date-time
  - `official` boolean · required  
    The league's official figures.
  - `reconstructed` boolean · required  
    Rebuilt from play-by-play rather than a box score.
  - `disagrees` boolean · required  
    Another source differs beyond tolerance.
  - `precedence` integer · required  
    Its rank when sources disagree; 1 is served.
- `coverage_notes` array of object · required  
  What's missing or unofficial in the span.
  - `metric_id` string · required  
    The stat's catalogue ID.
  - `seasons` string · required  
    The seasons, one or a range.
  - `status` string · required  
    absent, incomplete, unofficial, reconstructed or tier_locked.  
    One of: `official`, `unofficial`, `reconstructed`, `incomplete`, `absent`, `tier_locked` (open: new values may be added).
  - `text` string · required  
    One sentence to state in the answer.
- `ambiguity` object · required · nullable  
  Set when the input could mean more than one thing: no rows, and the question to ask the person.
  - `param` string · required  
    The input that's unclear.
  - `question` string · required  
    The question to ask.
  - `candidates` array of object · required  
    The choices.
    - `id` string  
      Its ID.
    - `label` string  
      How a person tells it apart.
- `sample` object · required · nullable  
  A trend's sample: the count, its 95% Wilson interval, a baseline and how many filters made it.
  - `n` integer · required  
    Games, pushes included.
  - `wins` integer · required  
    Wins (covers, overs).
  - `losses` integer · required  
    Losses.
  - `pushes` integer · required  
    Pushes.
  - `rate` number · required · nullable  
    Wins over decided games.
  - `ci_low` number · required · nullable  
    The interval's low end.
  - `ci_high` number · required · nullable  
    The interval's high end.
  - `ci_method` const · required  
    Always wilson_95.  
    Always `"wilson_95"`.
  - `baseline` object · required · nullable  
    The same kind of bet with no filters, over the same seasons.
    - `label` string · required  
      What the baseline counts.
    - `n` integer · required  
      Decided games in it.
    - `rate` number · required · nullable  
      Its rate.
  - `filters_applied` integer · required  
    Filters that narrowed the sample.
  - `small_sample` boolean · required  
    Too few games to read much into.
- `query` object  
  The trend's filters as run.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`unknown_metric`](/problems/unknown_metric) · [`invalid_filter`](/problems/invalid_filter) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout)

### Example
```http
POST https://api.askkelly.ai/v1/lines:history
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "competition": "nba",
  "market": "spread",
  "side": "home",
  "include_games": true
}
```

```json
{
  "object": "line_history",
  "snapshot_id": "snap_52",
  "data_through": {},
  "stale": false,
  "table": {
    "columns": [
      {
        "name": "game_date",
        "label": "Date",
        "type": "date"
      },
      {
        "name": "season",
        "label": "Season",
        "type": "string"
      },
      {
        "name": "home",
        "label": "Home",
        "type": "boolean"
      },
      {
        "name": "points_for",
        "label": "Points for",
        "type": "integer",
        "unit": "pts"
      },
      {
        "name": "points_against",
        "label": "Points against",
        "type": "integer",
        "unit": "pts"
      },
      {
        "name": "spread_close",
        "label": "Closing spread",
        "type": "number"
      },
      {
        "name": "total_close",
        "label": "Closing total",
        "type": "number"
      },
      {
        "name": "result",
        "label": "Result",
        "type": "string"
      },
      {
        "name": "ats_result",
        "label": "Against the spread",
        "type": "string"
      },
      {
        "name": "ou_result",
        "label": "Over/under",
        "type": "string"
      },
      {
        "name": "graded",
        "label": "Graded",
        "type": "string"
      }
    ],
    "rows": [
      [
        "2025-10-25",
        "2025-26",
        true,
        120,
        120,
        null,
        null,
        "T",
        null,
        null,
        null
      ],
      [
        "2025-10-22",
        "2025-26",
        true,
        99,
        105,
        null,
        null,
        "L",
        null,
        null,
        null
      ],
      [
        "2025-10-21",
        "2025-26",
        true,
        110,
        100,
        -4.5,
        215.5,
        "W",
        "cover",
        "under",
        "win"
      ]
    ],
    "row_count": 3,
    "total_rows": 3
  },
  "sources": [
    {
      "key": "s1",
      "source": "kelly",
      "licence": "Kelly's own computation and metadata",
      "snapshot_id": "snap_52",
      "recorded_at": null,
      "official": true,
      "reconstructed": false,
      "disagrees": false,
      "precedence": 1
    }
  ],
  "coverage_notes": [],
  "ambiguity": null,
  "sample": {
    "n": 1,
    "wins": 1,
    "losses": 0,
    "pushes": 0,
    "rate": 1,
    "ci_low": 0.2065493143772375,
    "ci_high": 1,
    "ci_method": "wilson_95",
    "baseline": {
      "label": "Every nba close spread (home), same seasons",
      "n": 1,
      "rate": 1
    },
    "filters_applied": 0,
    "small_sample": true
  },
  "read_from": "lake",
  "query": {
    "competition": "nba",
    "market": "spread",
    "side": "home",
    "team_id": null,
    "from_season": null,
    "to_season": null,
    "from_date": null,
    "to_date": null,
    "season_type": "regular",
    "spread_min": null,
    "spread_max": null,
    "total_min": null,
    "total_max": null,
    "rest_min": null,
    "rest_max": null,
    "home": null,
    "back_to_back": null
  },
  "summary": "1 of 1 covered (100.0%, 95% interval 20.7% to 100.0%); baseline 100.0% — a small sample.",
  "assumptions": [
    "Regular season only (season_type=regular).",
    "Closing lines (Kelly's consensus close)."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-11-06T00:00:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_d8d33be84363c069528ba7ea",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

`POST /v1/views:query`

## Get a stats table
public, no key needed · 1 credit, not charged during the beta · MCP tool `get_view` · status live

One table from a view spec (registry/contracts/views/view-spec.schema.json): players or teams by game, season or career with the columns, filters, totals tests, split, sort and mode asked for; rank, percentile, sample size, small-sample flags and 95% intervals beside each number; total, per-game, league-average and difference rows computed; streaks and best stretches; sources, coverage notes and the snapshot read.

### Parameters
Body, `application/json` (required):

- `competition` string  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...  
  pattern ^[a-z0-9_]{2,24}$
- `columns` array of string  
  Stat keys (passing_yards) or dimensions (opponent, game_date), in display order, 1 to 40. Teams also take points_for, points_against, point_diff, wins, losses, ties, win_pct, ats_wins, ats_losses, ats_pushes, ats_pct, overs, unders, ou_pushes, over_pct and the opponent's figure for any team stat as opp_<key> (opp_passing_yards).  
  min items 1 · max items 40
- `calcs` array of string  
  Up to 20 formula columns over the rows, each 'key:formula', e.g. 'ypa:passing_yards / passing_attempts'; 'key~Label:formula' names its header. A formula reads totals; a stat it names that isn't a column is read for it. list_functions has the functions. Sort by a calc's key.  
  max items 20
- `kind` string  
  table (default), streak or span.  
  One of: `table`, `streak`, `span` (open: new values may be added).
- `entity` string  
  player (default) or team.  
  One of: `player`, `team` (open: new values may be added).
- `grain` string  
  game, season (default) or career.  
  One of: `game`, `season`, `career` (open: new values may be added).
- `entity_ids` array of string  
  Up to 20 players or teams (plr_, tm_); none ranks every one (a finder).  
  max items 20
- `from_season` string  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `season_type` string  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).
- `sort` array of string  
  Up to 3 columns, '-' first for highest first.  
  max items 3
- `filters` array of string  
  Games to keep, each '<field> <op> <value>' (op = != > >= < <= in between), e.g. 'passing_yards >= 300', 'home = false'.  
  max items 12
- `having` array of string  
  Tests on a row's own totals, e.g. 'passing_yards >= 4000' for 4,000-yard seasons.  
  max items 8
- `split` string  
  A split from describe_metrics, e.g. home_away.  
  max length 32
- `mode` string  
  tot (default), pg (per game), season (per full season) or p100 (per 100 of the rate base).  
  One of: `tot`, `pg`, `season`, `p100` (open: new values may be added).
- `context` string  
  none (default), rank or pct beside each stat.  
  One of: `none`, `rank`, `pct` (open: new values may be added).
- `heat` string  
  off (default), league or rows.  
  One of: `off`, `league`, `rows` (open: new values may be added).
- `diff` array of string  
  Two row keys: adds a difference row.  
  min items 2 · max items 2
- `condition` array of string  
  kind streak: up to 4 tests every game must meet.  
  max items 4
- `length` integer  
  kind span: games in the stretch, 2 to 162.  
  min 2 · max 162
- `min_sample` integer  
  Override the qualifier for the comparison set (a minimum of games).  
  min 1 · max 10000
- `limit` integer  
  Rows per page, 1 to 200; default 50.  
  min 1 · max 200
- `cursor` string  
  A result's next value, for the next page.  
  max length 64
- `as_of` string  
  Answer as Kelly knew it at this time (RFC 3339); default now.  
  format date-time
- `snapshot_id` string  
  A snapshot_id an earlier result returned, to read the same data again.  
  pattern ^snap_[0-9]{1,18}$

### Response
`200` The view facts.

- `object` const · required  
  Always view.  
  Always `"view"`.
- `v` const  
  The view contract version.  
  Always `1`.  
  default 1
- `spec` object · required  
  The spec as the engine read it (defaults filled, filters normalised).
  - `v` const  
    The contract version.  
    Always `1`.  
    default 1
  - `kind` string  
    table: rows of stats. streak: runs of games in a row that meet every condition. span: the best stretch of `length` games by the first sort column.  
    One of: `table`, `streak`, `span` (open: new values may be added).  
    default "table"
  - `competition` string · required  
    The competition slug, e.g. nfl, nba, ncaaf.
  - `entity` string  
    Rows are players or teams; in racing (horse_racing, greyhounds, harness) runners, horses, jockeys, trainers or tracks.  
    One of: `player`, `team`, `runner`, `horse`, `jockey`, `trainer`, `track` (open: new values may be added).  
    default "player"
  - `grain` string  
    One row per game, per season, or per career.  
    One of: `game`, `season`, `career` (open: new values may be added).  
    default "season"
  - `entity_ids` array of string  
    Up to 20 IDs: plr_ or tm_; in racing rnr_ (runner), anm_ (horse), rpn_ (jockey, trainer) or ven_ (track). Empty: every player or team (a finder).  
    default []
  - `from_season` string · nullable  
    First season, a label like 2025 or 2025-26.  
    default null
  - `to_season` string · nullable  
    Last season.  
    default null
  - `season_type` string  
    regular, postseason or both.  
    One of: `regular`, `postseason`, `both` (open: new values may be added).  
    default "regular"
  - `columns` array of string · required  
    Catalogue stat keys (passing_yards) or dimensions (opponent), in display order. 1 to 40.
  - `calcs` array of object  
    Up to 20 formula columns over the view's rows, shown after the columns. Each is an object or its text 'key[.mode][~label]:formula'. Errors come back in calc_errors, not as a refusal.  
    default []
    - `key` string · required  
      The calc's column key: lowercase letters, digits and _, not one of the columns. Sort by it like any column.
    - `formula` string · required  
      The formula, e.g. passing_yards / passing_attempts or ROLLING_AVG(passing_yards, 3). Excel syntax unless mode says otherwise.
    - `label` string · nullable  
      The column header; the formula when null. No ':' (the URL form uses it).  
      default null
    - `mode` string  
      The formula's input language (ADR-K591 D1): excel unless the formula is written in another.  
      One of: `excel`, `sheets`, `sql`, `polars`, `pandas`, `dplyr`, `dax`, `tableau`, `pine` (open: new values may be added).  
      default "excel"
  - `sort` array of string  
    Up to 3 columns, '-' first for highest first. Multi-sort in order.  
    default []
  - `filters` array of string  
    Up to 12 filters in the history grammar: '<field> <op> <value>', op one of = != < <= > >= in between. 'active = true' keeps players or teams with a season in the latest season ('active = false': retired).  
    default []
  - `having` array of string  
    Up to 8 tests on a row's own totals, after grouping: 'passing_yards >= 4000' keeps 4,000-yard seasons (filters test each game).  
    default []
  - `split` string · nullable  
    A catalogue split (home_away, opponent, month…): one row per split value.  
    default null
  - `mode` string  
    tot: totals. pg: per game. season: per full season (17 games in the NFL, 82 in the NBA; the engine names it). p100: per 100 of the competition's rate base (dropbacks, possessions; the engine names it).  
    One of: `tot`, `pg`, `season`, `p100` (open: new values may be added).  
    default "tot"
  - `context` string  
    Beside each stat: nothing, its rank, or its percentile, in the comparison set the result names.  
    One of: `none`, `rank`, `pct` (open: new values may be added).  
    default "none"
  - `heat` string  
    Heat position for each stat cell: off, against the league comparison set, or against the other rows shown.  
    One of: `off`, `league`, `rows` (open: new values may be added).  
    default "off"
  - `diff` array of string  
    Two row keys: adds a difference row (first minus second).  
    default []
  - `condition` array of string  
    kind=streak: up to 4 filters each game must meet.  
    default []
  - `length` integer · nullable  
    kind=span: games in the stretch, 2 to 162.  
    default null
  - `min_sample` integer · nullable  
    Overrides the catalogue's qualifier for the comparison set.  
    default null
  - `limit` integer  
    Rows per page, 1 to 200.  
    default 50
  - `cursor` string · nullable  
    A result's next value, unchanged.  
    default null
  - `as_of` string · nullable  
    Read the data as of this time (ISO 8601).  
    format date-time · default null
  - `snapshot_id` string · nullable  
    Read one lake snapshot, e.g. snap_1234.  
    default null
- `query` string · required  
  The spec's readable URL query against the page's base view.
- `link` string · nullable  
  The view on askkelly.ai.  
  default null
- `canonical` string · nullable  
  The base page path: the canonical link (G3).  
  default null
- `mode_label` string · required  
  Totals, Per game, Per 17, Per 100 dropbacks…
- `columns` array of object · required  
  The columns, in the spec's order.
  - `key` string · required  
    The column key from the spec.
  - `label` string · required  
    Its label, as a person reads it.
  - `short` string · nullable  
    A short header (Yds, Cmp%), when the catalogue has one.  
    default null
  - `type` string · required  
    The value type of its cells.  
    One of: `string`, `integer`, `number`, `boolean`, `date`, `id` (open: new values may be added).
  - `unit` string · nullable  
    The unit (yards, percent…), when the catalogue has one.  
    default null
  - `metric_id` string · nullable  
    The catalogue ID ({competition}.{key}); null for a dimension.  
    default null
  - `metric_version` string · nullable  
    The catalogue version of the metric's definition.  
    default null
  - `kind` string · nullable  
    The catalogue kind: count, measure, ratio, rate, derived…  
    default null
  - `scaled` boolean  
    True when the mode changes it (a count shown per game).  
    default false
  - `better` one of several shapes  
    Which way is better, for rank, heat and sort arrows; null when neither.  
    default null
  - `denominator` string · nullable  
    The column key of its count (attempts behind completion %).  
    default null
  - `definition` string · nullable  
    The catalogue's one-line definition, for the header menu.  
    default null
  - `locked` boolean  
    True when the Rights Register withholds it on this surface: no values.  
    default false
  - `locked_reason` string · nullable  
    Why the column is locked, as a person reads it.  
    default null
  - `no_export` boolean  
    True when the page may show it but it never goes into a download, a cell copy or a bulk export (per-book prices under licence); set from the Rights Register, and the API and MCP apply the same rule to their exports.  
    default false
  - `coverage` string · nullable  
    A coverage note's text when some seasons have no value.  
    default null
  - `formula` string · nullable  
    The catalogue's formula over summed parts (passing_completions / passing_attempts), for 'Explain this number'.  
    default null
  - `source` string · nullable  
    The key in the result's sources its values come from, when one source serves the whole column.  
    default null
  - `since` string · nullable  
    The first season with values in Kelly's history (from coverage).  
    default null
  - `sortable` boolean  
    False when the column can't be sorted or filtered on (a calc built on an edge, D16).  
    default true
  - `decimals` one of several shapes  
    Fraction digits to show: 3 for a fraction or an average, 1 for a per-600 rate, 2 for a count shown per game or per season; null to show the value as sent. Display only: copies and downloads keep the full value.  
    default null
- `rows` array of object · required  
  This page of rows, in the spec's sort.
  - `key` string · required  
    Stable row key (plr_x, plr_x:2024, gm_y, a split value); diff names two.
  - `label` string · nullable  
    Summary rows: Total, Per game, Per 17, League average, Difference.  
    default null
  - `cells` array of object · required  
    One value per column, in the result's column order; null = no value (never zero).
  - `ctx` one of several shapes  
    One context per cell, or null when none apply.  
    default null
  - `decimals` one of several shapes  
    Fraction digits per cell where a summary row is in another mode than the table (a Per game row under totals shows 2, a Total row under per game shows 0); a null cell, or a row without the list, follows its column's `decimals`.  
    default null
  - `href` string · nullable  
    The row's own page on askkelly.ai (/players/josh-allen, a game page), when it has one.  
    default null
  - `group` string · nullable  
    The group the row belongs to (a season in a game log, a split family); a page keeps sorting within groups.  
    default null
- `summary_rows` array of object · required  
  Summary rows, keys from total, per_game, per_season, league, diff, in that order, each only when it applies.
  - `key` string · required  
    Stable row key (plr_x, plr_x:2024, gm_y, a split value); diff names two.
  - `label` string · nullable  
    Summary rows: Total, Per game, Per 17, League average, Difference.  
    default null
  - `cells` array of object · required  
    One value per column, in the result's column order; null = no value (never zero).
  - `ctx` one of several shapes  
    One context per cell, or null when none apply.  
    default null
  - `decimals` one of several shapes  
    Fraction digits per cell where a summary row is in another mode than the table (a Per game row under totals shows 2, a Total row under per game shows 0); a null cell, or a row without the list, follows its column's `decimals`.  
    default null
  - `href` string · nullable  
    The row's own page on askkelly.ai (/players/josh-allen, a game page), when it has one.  
    default null
  - `group` string · nullable  
    The group the row belongs to (a season in a game log, a split family); a page keeps sorting within groups.  
    default null
- `total_rows` integer · required  
  Rows matching the view across every page.
- `next` string · nullable  
  Pass as cursor for the next page; null on the last page.  
  default null
- `compare_set` one of several shapes  
  The set the rank and heat compare against.  
  default null
- `sources` array of object · required  
  history.shape Source objects: licence, attribution, precedence.
- `coverage_notes` array of object  
  history.shape coverage notes: seasons or fields with gaps.
- `calc_errors` array of object  
  One entry per calc that couldn't be computed; its column is kept with null cells.
  - `key` string · required · nullable  
    The calc's key; null for the whole set (too many calcs).
  - `code` string · required  
    The formula language's error code: syntax, not_in_view, type, shape, budget…
  - `message` string · required  
    What went wrong, as a person reads it.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `snapshot_id` string · nullable  
  The lake snapshot the view was read from.  
  default null
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `data_through` object  
  The last date each source covers.
- `stale` boolean  
  True when a source is behind its schedule.  
  default false
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`unknown_metric`](/problems/unknown_metric) · [`invalid_filter`](/problems/invalid_filter) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout)

### Example
```http
POST https://api.askkelly.ai/v1/views:query
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "competition": "nba",
  "entity": "player",
  "grain": "career",
  "columns": [
    "points"
  ],
  "calcs": [
    "ppg~Points per game:points / games"
  ],
  "sort": [
    "-ppg"
  ],
  "limit": 2
}
```

```json
{
  "object": "view",
  "v": 1,
  "spec": {
    "v": 1,
    "kind": "table",
    "competition": "nba",
    "entity": "player",
    "grain": "career",
    "entity_ids": [],
    "from_season": null,
    "to_season": null,
    "season_type": "regular",
    "columns": [
      "points"
    ],
    "calcs": [
      {
        "key": "ppg",
        "formula": "points / games",
        "label": "Points per game",
        "mode": "excel"
      }
    ],
    "sort": [
      "-ppg"
    ],
    "filters": [],
    "having": [],
    "split": null,
    "mode": "tot",
    "context": "none",
    "heat": "off",
    "diff": [],
    "condition": [],
    "length": null,
    "min_sample": null,
    "limit": 2,
    "cursor": null,
    "as_of": null,
    "snapshot_id": null
  },
  "query": "g=career&calc=ppg~Points%20per%20game:points%20%2F%20games&sort=-ppg&n=2",
  "link": null,
  "canonical": null,
  "mode_label": "Totals",
  "columns": [
    {
      "key": "points",
      "label": "Points",
      "short": null,
      "type": "integer",
      "unit": "pts",
      "metric_id": "nba.points",
      "metric_version": "1.0.0",
      "kind": "count",
      "scaled": false,
      "better": "high",
      "denominator": null,
      "definition": "Points scored: 2 a field goal inside the arc, 3 beyond it, 1 a free throw.",
      "locked": false,
      "locked_reason": null,
      "no_export": false,
      "coverage": null,
      "formula": null,
      "source": "s1",
      "since": "1946-47",
      "sortable": true,
      "decimals": null
    },
    {
      "key": "ppg",
      "label": "Points per game",
      "short": null,
      "type": "number",
      "unit": "pts/games",
      "metric_id": null,
      "metric_version": null,
      "kind": "calc",
      "scaled": false,
      "better": null,
      "denominator": null,
      "definition": "Your formula: points / games",
      "locked": false,
      "locked_reason": null,
      "no_export": false,
      "coverage": null,
      "formula": "points / games",
      "source": null,
      "since": null,
      "sortable": true,
      "decimals": null
    }
  ],
  "rows": [
    {
      "key": "plr_znvh1bpfvdj2d79szye4",
      "label": "Pat One",
      "cells": [
        96,
        32
      ],
      "ctx": null,
      "href": "/players/pat-one-znvh1bpfvdj2d79szye4",
      "group": null
    },
    {
      "key": "plr_d9b91wfaa4ym1y788aq8",
      "label": "Pip Three",
      "cells": [
        59,
        29.5
      ],
      "ctx": null,
      "href": "/players/pip-three-d9b91wfaa4ym1y788aq8",
      "group": null
    }
  ],
  "summary_rows": [],
  "total_rows": 3,
  "next": "eyJvIjoyLCJzIjoic25hcF81MiJ9",
  "compare_set": null,
  "sources": [
    {
      "key": "s1",
      "source": "balldontlie",
      "licence": "BALLDONTLIE Terms of Service, last updated September 17, 2026, §6: Data may be used for lawful commercial purposes, incl",
      "snapshot_id": "snap_52",
      "recorded_at": null,
      "official": true,
      "reconstructed": false,
      "disagrees": false,
      "precedence": 1
    }
  ],
  "coverage_notes": [],
  "calc_errors": [],
  "assumptions": [
    "Each season's line from the source Kelly serves first by precedence (balldontlie, kelly), else the sum of its games.",
    "All seasons Kelly holds.",
    "Stat catalogue 1.0.0; a missing value is not zero, and games without it are left out of its total.",
    "Read for the calcs, not shown: games."
  ],
  "snapshot_id": "snap_52",
  "as_of": "2026-11-06T00:00:00Z",
  "data_through": {},
  "stale": false,
  "summary": "3 player career rows, most points per game first (totals): Pat One, 32.",
  "has_more": true,
  "next_cursor": "eyJvIjoyLCJzIjoic25hcF81MiJ9",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_66e61ed3eefabd8d1d36be88",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

```http
POST https://api.askkelly.ai/v1/views:query
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "competition": "nba",
  "entity": "player",
  "grain": "career",
  "columns": [
    "points",
    "games"
  ],
  "sort": [
    "-points"
  ],
  "limit": 2
}
```

```json
{
  "object": "view",
  "v": 1,
  "spec": {
    "v": 1,
    "kind": "table",
    "competition": "nba",
    "entity": "player",
    "grain": "career",
    "entity_ids": [],
    "from_season": null,
    "to_season": null,
    "season_type": "regular",
    "columns": [
      "points",
      "games"
    ],
    "calcs": [],
    "sort": [
      "-points"
    ],
    "filters": [],
    "having": [],
    "split": null,
    "mode": "tot",
    "context": "none",
    "heat": "off",
    "diff": [],
    "condition": [],
    "length": null,
    "min_sample": null,
    "limit": 2,
    "cursor": null,
    "as_of": null,
    "snapshot_id": null
  },
  "query": "g=career&sort=-points&n=2",
  "link": null,
  "canonical": null,
  "mode_label": "Totals",
  "columns": [
    {
      "key": "points",
      "label": "Points",
      "short": null,
      "type": "integer",
      "unit": "pts",
      "metric_id": "nba.points",
      "metric_version": "1.0.0",
      "kind": "count",
      "scaled": false,
      "better": "high",
      "denominator": null,
      "definition": "Points scored: 2 a field goal inside the arc, 3 beyond it, 1 a free throw.",
      "locked": false,
      "locked_reason": null,
      "no_export": false,
      "coverage": null,
      "formula": null,
      "source": "s1",
      "since": "1946-47",
      "sortable": true,
      "decimals": null
    },
    {
      "key": "games",
      "label": "Games",
      "short": null,
      "type": "integer",
      "unit": null,
      "metric_id": null,
      "metric_version": null,
      "kind": null,
      "scaled": false,
      "better": null,
      "denominator": null,
      "definition": null,
      "locked": false,
      "locked_reason": null,
      "no_export": false,
      "coverage": null,
      "formula": null,
      "source": null,
      "since": null,
      "sortable": true,
      "decimals": null
    }
  ],
  "rows": [
    {
      "key": "plr_emrxad012xnt6nbe4vy4",
      "label": "Pam Two",
      "cells": [
        900,
        70
      ],
      "ctx": null,
      "href": "/players/pam-two-emrxad012xnt6nbe4vy4",
      "group": null
    },
    {
      "key": "plr_znvh1bpfvdj2d79szye4",
      "label": "Pat One",
      "cells": [
        96,
        3
      ],
      "ctx": null,
      "href": "/players/pat-one-znvh1bpfvdj2d79szye4",
      "group": null
    }
  ],
  "summary_rows": [],
  "total_rows": 3,
  "next": "eyJvIjoyLCJzIjoic25hcF81MiJ9",
  "compare_set": null,
  "sources": [
    {
      "key": "s1",
      "source": "balldontlie",
      "licence": "BALLDONTLIE Terms of Service, last updated September 17, 2026, §6: Data may be used for lawful commercial purposes, incl",
      "snapshot_id": "snap_52",
      "recorded_at": null,
      "official": true,
      "reconstructed": false,
      "disagrees": false,
      "precedence": 1
    }
  ],
  "coverage_notes": [],
  "calc_errors": [],
  "assumptions": [
    "Each season's line from the source Kelly serves first by precedence (balldontlie, kelly), else the sum of its games.",
    "All seasons Kelly holds.",
    "Stat catalogue 1.0.0; a missing value is not zero, and games without it are left out of its total."
  ],
  "snapshot_id": "snap_52",
  "as_of": "2026-11-06T00:00:00Z",
  "data_through": {},
  "stale": false,
  "summary": "3 player career rows, most points first (totals): Pam Two, 900.",
  "has_more": true,
  "next_cursor": "eyJvIjoyLCJzIjoic25hcF81MiJ9",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_257348adf3bb68434c3ddc93",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

```http
POST https://api.askkelly.ai/v1/views:query
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "competition": "nba",
  "grain": "game",
  "columns": [
    "points"
  ]
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "code": "invalid_request",
  "detail": "every game of every player is too broad: add entity_ids, a filter or from_season",
  "param": "spec",
  "doc_url": "https://docs.askkelly.ai/problems/invalid_request",
  "request_id": "req_a7a069fff56f97236196e9db",
  "retryable": false,
  "display_message": "Something in that request was not understood."
}
```

```http
POST https://api.askkelly.ai/v1/views:query
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "competition": "nba",
  "entity": "player",
  "grain": "season",
  "columns": [
    "season",
    "points",
    "games"
  ],
  "sort": [
    "-points"
  ],
  "context": "rank",
  "min_sample": 1
}
```

```json
{
  "object": "view",
  "v": 1,
  "spec": {
    "v": 1,
    "kind": "table",
    "competition": "nba",
    "entity": "player",
    "grain": "season",
    "entity_ids": [],
    "from_season": null,
    "to_season": null,
    "season_type": "regular",
    "columns": [
      "season",
      "points",
      "games"
    ],
    "calcs": [],
    "sort": [
      "-points"
    ],
    "filters": [],
    "having": [],
    "split": null,
    "mode": "tot",
    "context": "rank",
    "heat": "off",
    "diff": [],
    "condition": [],
    "length": null,
    "min_sample": 1,
    "limit": 50,
    "cursor": null,
    "as_of": null,
    "snapshot_id": null
  },
  "query": "sort=-points&ctx=rank&min=1",
  "link": null,
  "canonical": null,
  "mode_label": "Totals",
  "columns": [
    {
      "key": "season",
      "label": "Season",
      "short": null,
      "type": "string",
      "unit": null,
      "metric_id": null,
      "metric_version": null,
      "kind": null,
      "scaled": false,
      "better": null,
      "denominator": null,
      "definition": null,
      "locked": false,
      "locked_reason": null,
      "no_export": false,
      "coverage": null,
      "formula": null,
      "source": null,
      "since": null,
      "sortable": true,
      "decimals": null
    },
    {
      "key": "points",
      "label": "Points",
      "short": null,
      "type": "integer",
      "unit": "pts",
      "metric_id": "nba.points",
      "metric_version": "1.0.0",
      "kind": "count",
      "scaled": false,
      "better": "high",
      "denominator": null,
      "definition": "Points scored: 2 a field goal inside the arc, 3 beyond it, 1 a free throw.",
      "locked": false,
      "locked_reason": null,
      "no_export": false,
      "coverage": null,
      "formula": null,
      "source": "s1",
      "since": "1946-47",
      "sortable": true,
      "decimals": null
    },
    {
      "key": "games",
      "label": "Games",
      "short": null,
      "type": "integer",
      "unit": null,
      "metric_id": null,
      "metric_version": null,
      "kind": null,
      "scaled": false,
      "better": null,
      "denominator": null,
      "definition": null,
      "locked": false,
      "locked_reason": null,
      "no_export": false,
      "coverage": null,
      "formula": null,
      "source": null,
      "since": null,
      "sortable": true,
      "decimals": null
    }
  ],
  "rows": [
    {
      "key": "plr_emrxad012xnt6nbe4vy4:2025-26",
      "label": "Pam Two",
      "cells": [
        "2025-26",
        900,
        70
      ],
      "ctx": [
        null,
        {
          "n": null,
          "small": false,
          "rank": 1,
          "of": 3,
          "pct": 100,
          "lo": null,
          "hi": null,
          "heat": null
        },
        null
      ],
      "href": "/players/pam-two-emrxad012xnt6nbe4vy4",
      "group": null
    },
    {
      "key": "plr_znvh1bpfvdj2d79szye4:2025-26",
      "label": "Pat One",
      "cells": [
        "2025-26",
        96,
        3
      ],
      "ctx": [
        null,
        {
          "n": null,
          "small": false,
          "rank": 2,
          "of": 3,
          "pct": 50,
          "lo": null,
          "hi": null,
          "heat": null
        },
        null
      ],
      "href": "/players/pat-one-znvh1bpfvdj2d79szye4",
      "group": null
    },
    {
      "key": "plr_d9b91wfaa4ym1y788aq8:2025-26",
      "label": "Pip Three",
      "cells": [
        "2025-26",
        59,
        2
      ],
      "ctx": [
        null,
        {
          "n": null,
          "small": false,
          "rank": 3,
          "of": 3,
          "pct": 0,
          "lo": null,
          "hi": null,
          "heat": null
        },
        null
      ],
      "href": "/players/pip-three-d9b91wfaa4ym1y788aq8",
      "group": null
    }
  ],
  "summary_rows": [
    {
      "key": "league",
      "label": "League average",
      "cells": [
        null,
        351.666667,
        null
      ],
      "ctx": null,
      "decimals": [
        null,
        1,
        null
      ],
      "href": null,
      "group": null
    }
  ],
  "total_rows": 3,
  "next": null,
  "compare_set": {
    "label": "NBA players in the same season",
    "n": 3,
    "qualifier": "At least 1 games"
  },
  "sources": [
    {
      "key": "s1",
      "source": "balldontlie",
      "licence": "BALLDONTLIE Terms of Service, last updated September 17, 2026, §6: Data may be used for lawful commercial purposes, incl",
      "snapshot_id": "snap_52",
      "recorded_at": null,
      "official": true,
      "reconstructed": false,
      "disagrees": false,
      "precedence": 1
    }
  ],
  "coverage_notes": [],
  "calc_errors": [],
  "assumptions": [
    "Each season's line from the source Kelly serves first by precedence (balldontlie, kelly), else the sum of its games.",
    "All seasons Kelly holds.",
    "At least 1 games (min_sample).",
    "Stat catalogue 1.0.0; a missing value is not zero, and games without it are left out of its total."
  ],
  "snapshot_id": "snap_52",
  "as_of": "2026-11-06T00:00:00Z",
  "data_through": {},
  "stale": false,
  "summary": "3 player season rows, most points first (totals): Pam Two, 900.",
  "has_more": false,
  "next_cursor": null,
  "source": "kelly",
  "attribution": null,
  "request_id": "req_cf5911a9a448cf448dc0f487",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

`POST /v1/views:parse`

## Turn words into a stats table
public, no key needed · 0 credits, not charged during the beta · MCP tool `parse_view` · status live

Plain words to a view spec, starting from the current table's fields: the spec, what was understood and the words it couldn't place, never guessed.

### Parameters
Body, `application/json` (required):

- `text` string  
  The person's words, up to 300 characters.  
  min length 1 · max length 300
- `competition` string  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...  
  pattern ^[a-z0-9_]{2,24}$
- `columns` array of string  
  Stat keys (passing_yards) or dimensions (opponent, game_date), in display order, 1 to 40. Teams also take points_for, points_against, point_diff, wins, losses, ties, win_pct, ats_wins, ats_losses, ats_pushes, ats_pct, overs, unders, ou_pushes, over_pct and the opponent's figure for any team stat as opp_<key> (opp_passing_yards).  
  min items 1 · max items 40
- `calcs` array of string  
  Up to 20 formula columns over the rows, each 'key:formula', e.g. 'ypa:passing_yards / passing_attempts'; 'key~Label:formula' names its header. A formula reads totals; a stat it names that isn't a column is read for it. list_functions has the functions. Sort by a calc's key.  
  max items 20
- `kind` string  
  table (default), streak or span.  
  One of: `table`, `streak`, `span` (open: new values may be added).
- `entity` string  
  player (default) or team.  
  One of: `player`, `team` (open: new values may be added).
- `grain` string  
  game, season (default) or career.  
  One of: `game`, `season`, `career` (open: new values may be added).
- `entity_ids` array of string  
  Up to 20 players or teams (plr_, tm_); none ranks every one (a finder).  
  max items 20
- `from_season` string  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `season_type` string  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).
- `sort` array of string  
  Up to 3 columns, '-' first for highest first.  
  max items 3
- `filters` array of string  
  Games to keep, each '<field> <op> <value>' (op = != > >= < <= in between), e.g. 'passing_yards >= 300', 'home = false'.  
  max items 12
- `having` array of string  
  Tests on a row's own totals, e.g. 'passing_yards >= 4000' for 4,000-yard seasons.  
  max items 8
- `split` string  
  A split from describe_metrics, e.g. home_away.  
  max length 32
- `mode` string  
  tot (default), pg (per game), season (per full season) or p100 (per 100 of the rate base).  
  One of: `tot`, `pg`, `season`, `p100` (open: new values may be added).
- `context` string  
  none (default), rank or pct beside each stat.  
  One of: `none`, `rank`, `pct` (open: new values may be added).
- `heat` string  
  off (default), league or rows.  
  One of: `off`, `league`, `rows` (open: new values may be added).
- `diff` array of string  
  Two row keys: adds a difference row.  
  min items 2 · max items 2
- `condition` array of string  
  kind streak: up to 4 tests every game must meet.  
  max items 4
- `length` integer  
  kind span: games in the stretch, 2 to 162.  
  min 2 · max 162
- `min_sample` integer  
  Override the qualifier for the comparison set (a minimum of games).  
  min 1 · max 10000
- `limit` integer  
  Rows per page, 1 to 200; default 50.  
  min 1 · max 200
- `cursor` string  
  A result's next value, for the next page.  
  max length 64
- `as_of` string  
  Answer as Kelly knew it at this time (RFC 3339); default now.  
  format date-time
- `snapshot_id` string  
  A snapshot_id an earlier result returned, to read the same data again.  
  pattern ^snap_[0-9]{1,18}$

### Response
`200` The view parse facts.

- `object` const · required  
  Always view_parse.  
  Always `"view_parse"`.
- `spec` object · required  
  The spec to send to get_view.
  - `v` const  
    The contract version.  
    Always `1`.  
    default 1
  - `kind` string  
    table: rows of stats. streak: runs of games in a row that meet every condition. span: the best stretch of `length` games by the first sort column.  
    One of: `table`, `streak`, `span` (open: new values may be added).  
    default "table"
  - `competition` string · required  
    The competition slug, e.g. nfl, nba, ncaaf.
  - `entity` string  
    Rows are players or teams; in racing (horse_racing, greyhounds, harness) runners, horses, jockeys, trainers or tracks.  
    One of: `player`, `team`, `runner`, `horse`, `jockey`, `trainer`, `track` (open: new values may be added).  
    default "player"
  - `grain` string  
    One row per game, per season, or per career.  
    One of: `game`, `season`, `career` (open: new values may be added).  
    default "season"
  - `entity_ids` array of string  
    Up to 20 IDs: plr_ or tm_; in racing rnr_ (runner), anm_ (horse), rpn_ (jockey, trainer) or ven_ (track). Empty: every player or team (a finder).  
    default []
  - `from_season` string · nullable  
    First season, a label like 2025 or 2025-26.  
    default null
  - `to_season` string · nullable  
    Last season.  
    default null
  - `season_type` string  
    regular, postseason or both.  
    One of: `regular`, `postseason`, `both` (open: new values may be added).  
    default "regular"
  - `columns` array of string · required  
    Catalogue stat keys (passing_yards) or dimensions (opponent), in display order. 1 to 40.
  - `calcs` array of object  
    Up to 20 formula columns over the view's rows, shown after the columns. Each is an object or its text 'key[.mode][~label]:formula'. Errors come back in calc_errors, not as a refusal.  
    default []
    - `key` string · required  
      The calc's column key: lowercase letters, digits and _, not one of the columns. Sort by it like any column.
    - `formula` string · required  
      The formula, e.g. passing_yards / passing_attempts or ROLLING_AVG(passing_yards, 3). Excel syntax unless mode says otherwise.
    - `label` string · nullable  
      The column header; the formula when null. No ':' (the URL form uses it).  
      default null
    - `mode` string  
      The formula's input language (ADR-K591 D1): excel unless the formula is written in another.  
      One of: `excel`, `sheets`, `sql`, `polars`, `pandas`, `dplyr`, `dax`, `tableau`, `pine` (open: new values may be added).  
      default "excel"
  - `sort` array of string  
    Up to 3 columns, '-' first for highest first. Multi-sort in order.  
    default []
  - `filters` array of string  
    Up to 12 filters in the history grammar: '<field> <op> <value>', op one of = != < <= > >= in between. 'active = true' keeps players or teams with a season in the latest season ('active = false': retired).  
    default []
  - `having` array of string  
    Up to 8 tests on a row's own totals, after grouping: 'passing_yards >= 4000' keeps 4,000-yard seasons (filters test each game).  
    default []
  - `split` string · nullable  
    A catalogue split (home_away, opponent, month…): one row per split value.  
    default null
  - `mode` string  
    tot: totals. pg: per game. season: per full season (17 games in the NFL, 82 in the NBA; the engine names it). p100: per 100 of the competition's rate base (dropbacks, possessions; the engine names it).  
    One of: `tot`, `pg`, `season`, `p100` (open: new values may be added).  
    default "tot"
  - `context` string  
    Beside each stat: nothing, its rank, or its percentile, in the comparison set the result names.  
    One of: `none`, `rank`, `pct` (open: new values may be added).  
    default "none"
  - `heat` string  
    Heat position for each stat cell: off, against the league comparison set, or against the other rows shown.  
    One of: `off`, `league`, `rows` (open: new values may be added).  
    default "off"
  - `diff` array of string  
    Two row keys: adds a difference row (first minus second).  
    default []
  - `condition` array of string  
    kind=streak: up to 4 filters each game must meet.  
    default []
  - `length` integer · nullable  
    kind=span: games in the stretch, 2 to 162.  
    default null
  - `min_sample` integer · nullable  
    Overrides the catalogue's qualifier for the comparison set.  
    default null
  - `limit` integer  
    Rows per page, 1 to 200.  
    default 50
  - `cursor` string · nullable  
    A result's next value, unchanged.  
    default null
  - `as_of` string · nullable  
    Read the data as of this time (ISO 8601).  
    format date-time · default null
  - `snapshot_id` string · nullable  
    Read one lake snapshot, e.g. snap_1234.  
    default null
- `query` string · required  
  The spec as a readable URL query beside the base view (ADR-K575 §4).
- `complete` boolean · required  
  Every word was placed and the spec is valid.
- `understood` array of string · required  
  The phrases it placed, in order.
- `unknown` array of string · required  
  Words it couldn't place; ask, never guess.
- `problem` string · required · nullable  
  Why the words can't make a valid view, when they can't.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large)

### Example
```http
POST https://api.askkelly.ai/v1/views:parse
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "competition": "nba",
  "text": "seasons with at least 500 points",
  "columns": [
    "points",
    "games"
  ]
}
```

```json
{
  "object": "view_parse",
  "spec": {
    "v": 1,
    "kind": "table",
    "competition": "nba",
    "entity": "player",
    "grain": "season",
    "entity_ids": [],
    "from_season": null,
    "to_season": null,
    "season_type": "regular",
    "columns": [
      "points",
      "games"
    ],
    "calcs": [],
    "sort": [
      "-points"
    ],
    "filters": [],
    "having": [
      "points >= 500"
    ],
    "split": null,
    "mode": "tot",
    "context": "none",
    "heat": "off",
    "diff": [],
    "condition": [],
    "length": null,
    "min_sample": null,
    "limit": 50,
    "cursor": null,
    "as_of": null,
    "snapshot_id": null
  },
  "query": "sort=-points&h=points>=500",
  "complete": true,
  "understood": [
    "at least 500 points",
    "seasons"
  ],
  "unknown": [],
  "problem": null,
  "summary": "Showing at least 500 points; seasons.",
  "assumptions": [],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_02da57d435bb8d505ae6d1f3",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`POST /v1/rules:test`

## Test a betting rule
public, no key needed · 1 credit, not charged during the beta · MCP tool `test_rule` · status live

A betting rule tested on past games, point in time: every game the rule's formula matched, bet at Kelly's consensus price at the weekly sheet's edition or the close and graded. Verdict v2 (nine checks in three groups, each with a zone), the honest forward ROI beside the past ROI, the record, units, ROI intervals, the exact and clustered p-value adjusted for the rules tried, the deflated sample, the rule against its own base, CLV, stress tests (half a point worse, -110, the other side), splits, each condition's impact and every bet in date order. Racing (horse_racing, greyhounds, harness): every runner the rule matches, bet at the off to win, place, each way or to lay, settled at SP, Betfair SP or the tote with dead heats, non-runners, Rule 4 and commission. A rule that reads anything not known at the bet moment, or Kelly's own edge, is refused as rule_not_testable with fixes.

### Parameters
Body, `application/json` (required):

- `formula` string  
  The rule: a formula true or false on each team-game (or each runner in a race, for horse_racing, greyhounds and harness), starting with =.  
  min length 2 · max length 2000
- `competition` string  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...; racing: horse_racing, greyhounds or harness (seasons are calendar years).  
  pattern ^[a-z0-9_]{2,24}$
- `seasons` array of string  
  Seasons to test, oldest first (1 to 25), e.g. ["2021", "2022"]; or use from_season and to_season.  
  min items 1 · max items 25
- `from_season` string  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `market` string  
  spread (default), moneyline, over, under, draw or teaser (each match is a teased leg; legs from the same week go on tickets; see the teaser_ options). Soccer (epl, laliga, bundesliga, seriea, ligue1, mls, ucl): moneyline is three-way (a draw loses), spread is the Asian handicap (quarter lines settle half won or half lost) and draw bets the draw in the matched game. Racing: win (default), place, each_way, lay or lay_place, every runner the rule matches is a bet at the off.  
  One of: `spread`, `moneyline`, `over`, `under`, `draw`, `teaser`, `win`, `place`, `each_way`, `lay`, `lay_place` (open: new values may be added).
- `side` string  
  rule (default) bets the team the rule matched; fade bets the other side.  
  One of: `rule`, `fade` (open: new values may be added).
- `bet_moment` string  
  close (default), edition (football: the weekly sheet's Monday 10 AM ET line) or day_before (other sports: 24 hours before the start).  
  One of: `close`, `edition`, `day_before` (open: new values may be added).
- `season_type` string  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).
- `stake` string  
  risk (default): 1 unit risked a bet; to_win: each bet sized to win 1 unit.  
  One of: `risk`, `to_win` (open: new values may be added).
- `price` string  
  consensus (default): Kelly's price at the bet moment; flat_110: every bet at -110.  
  One of: `consensus`, `flat_110` (open: new values may be added).
- `tests` integer  
  Rules tried on this data outside Kelly, this one included (default 1). Kelly counts the account's own; this may only raise that count.  
  min 1 · max 100000
- `detail` string  
  full (default) or summary (no bets list, splits or condition impact).  
  One of: `full`, `summary` (open: new values may be added).
- `base_formula` string  
  The base the rule filters, e.g. =AND(NOT(home), spread_close > 0); it must hold on every game the rule bets. Default: Kelly takes the rule's who-or-when conditions.  
  min length 2 · max length 2000
- `plan_roi` number  
  Also report the bets needed to prove this ROI (a fraction, 0.05 is 5%).
- `ci_level` number  
  The ROI interval's level, 0.8 to 0.99 (default 0.95).  
  min 0.8 · max 0.99
- `max_stale_minutes` integer  
  Leave out a price whose snapshot is older than this at the bet moment (default 60 at the close, 360 earlier; never under 10 for games before October 2022).  
  min 5 · max 10080
- `bankroll_units` number  
  Bankroll in units for the ruin chance and the staking replays (default 100).  
  max 1000000
- `ruin_share` number  
  Share of the bankroll whose loss counts as ruin (default 0.5; 1 = all of it).  
  max 1
- `horizon_bets` integer  
  Bets ahead the ruin chance looks (default 500).  
  min 1 · max 1000
- `paths` integer  
  Simulated futures for the ruin chance (default 5000).  
  min 1000 · max 10000
- `staking_plans` array of string  
  Staking plans to replay: flat, to_win, percent, kelly (default all four).  
  min items 1 · max items 4
- `percent` number  
  Share of the bankroll the percent plan bets (default 0.02).  
  max 0.5
- `kelly_fraction` number  
  Multiple of the Kelly criterion the kelly plan bets; omitted, the honest multiple from the record's sample size.  
  max 1
- `kelly_cap` number  
  Most of the bankroll the kelly plan puts on one bet (default 0.05).  
  max 1
- `max_bets_per_day` integer  
  Cap: bets a day (ET).  
  min 1 · max 1000
- `max_bets_per_game` integer  
  Cap: bets a game.  
  min 1 · max 10
- `max_bets_per_team_week` integer  
  Cap: bets on a team a week.  
  min 1 · max 50
- `max_open_stake` number  
  Cap: share of the bankroll at risk at once.  
  max 1
- `daily_stop_loss_units` number  
  Cap: no more bets that day once this many units are lost.  
  max 100000
- `cap_priority` string  
  Which bets a cap keeps: earliest (default) or random.  
  One of: `earliest`, `random` (open: new values may be added).
- `warm_up` string  
  as_written (default) grades every bet; require_full grades only bets whose windows had all the earlier games they read (ROLLING_AVG(margin, 5) needs 5).  
  One of: `as_written`, `require_full` (open: new values may be added).
- `teaser_points` number  
  Teaser only: points each leg moves; football 6 (default), 6.5 or 7, basketball 4, 4.5 or 5.  
  One of: `4`, `4.5`, `5`, `6`, `6.5`, `7` (open: new values may be added).
- `teaser_legs` integer  
  Teaser only: legs a ticket, 2 (default) to 4.  
  min 2 · max 4
- `teaser_price` integer  
  Teaser only: the ticket's American price, e.g. -120. Kelly holds no historical teaser prices; the default is a common book table (2 legs at 6 points: -120).  
  min -1000 · max 10000
- `teaser_push` string  
  Teaser only: how the book settles a pushed leg: reduce (default; the ticket drops to fewer legs, one leg left is refunded), lose, or ticket_push (the ticket is refunded).  
  One of: `reduce`, `lose`, `ticket_push` (open: new values may be added).
- `teaser_pairing` string  
  Teaser only: all_pairs (default; every combination of a week's legs, each leg one unit in total) or chronological (a week's legs in kickoff order).  
  One of: `all_pairs`, `chronological` (open: new values may be added).
- `teaser_leg` string  
  Teaser only: what each leg teases: spread (default), over or under.  
  One of: `spread`, `over`, `under` (open: new values may be added).
- `settle` string  
  Racing only: the price bets settle at: sp (industry SP; win default, each_way), bsp (Betfair SP; place, lay and lay_place default) or tote.  
  One of: `sp`, `bsp`, `tote` (open: new values may be added).
- `commission` number  
  Racing only: Betfair commission on a winning BSP bet's winnings, as a share (default 0.05).  
  min 0 · max 0.2
- `ew_places` integer  
  Racing each_way only: places paid, instead of the standard terms by field size.  
  min 1 · max 8
- `ew_fraction` number  
  Racing each_way only: the place fraction of the win odds (0.2 is 1/5, 0.25 is 1/4), instead of the standard terms.  
  max 1
- `output` string  
  rule (default): the formula is true or false on each game. probability: it gives the side's chance from 0 to 1 (moneyline or spread, back side, edition or close), scored as calibration and bet at edge_threshold.  
  One of: `rule`, `probability` (open: new values may be added).
- `edge_threshold` number  
  output probability only: the expected return a bet needs, chance × decimal price − 1; 0.02 (default) bets where the formula sees a 2% edge.
- `robustness_off` array of string  
  Robustness blocks to leave out (all of them with "all"); every block runs by default.  
  max items 10
- `ablation` string  
  shapley (default): each condition's share of the extra units (Shapley values); leave_one_out: only the rule without each condition.  
  One of: `shapley`, `leave_one_out` (open: new values may be added).
- `break_date` string  
  A date to test for a change in the edge (a Chow test), e.g. 2023-09-01.  
  format date
- `random_baseline_sims` integer  
  Random rules drawn for the baseline (default 2,000).  
  min 100 · max 10000
- `monte_carlo_sims` integer  
  Reorderings of the bets (default 10,000; fewer, never under 2,000, for long records).  
  min 100 · max 20000
- `monte_carlo_mode` string  
  block (default: whole bet-days resampled in runs of about a week), iid or permutation.  
  One of: `block`, `iid`, `permutation` (open: new values may be added).
- `skip_prob` number  
  Chance each bet is missed in the Monte Carlo and noise runs (default 0).  
  min 0 · max 0.5
- `trim_winners` number  
  Share of the biggest winners removed before the Monte Carlo (default 0).  
  min 0 · max 0.2
- `noise_runs` integer  
  Runs a noise family (default 200).  
  min 10 · max 1000
- `input_scale` number  
  Noise on the numbers the rule compares, as a share of their spread (default 0.10).  
  min 0 · max 0.5
- `line_prob` number  
  Chance each bet's line moves half a point either way in the line noise (default 0.5).  
  min 0 · max 1
- `save` boolean  
  true keeps this rule as a version of a saved rule named name (or of rule_id): the same rule again keeps its version, a different one is the next.
- `name` string  
  The saved rule's name, for a new one (1 to 120 characters).  
  min length 1 · max length 120
- `rule_id` string  
  Add this test as a version of a rule already saved (rl_…).  
  pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$
- `transfer` boolean  
  Also run the rule on its other market (spread and moneyline; over and under) and on other leagues, with its numbers moved to the same percentile there, pooled across leagues (transfer). Evidence beside the verdict; these runs don't count toward rules tried.
- `transfer_leagues` array of string  
  Leagues to carry it to (default: sibling leagues first, then the rest).  
  min items 1 · max items 13
- `transfer_markets` string  
  auto (default) adds the other market of the rule's own league; none leaves it out.  
  One of: `auto`, `none` (open: new values may be added).
- `transfer_thresholds` string  
  both (default), literal (the rule's numbers as written) or quantile (each number moved to the same percentile of its field in the other league).  
  One of: `both`, `literal`, `quantile` (open: new values may be added).
- `translation_id` string  
  The translation_id a translate_rule result gave, when the formula came from the person's words; it is kept with the test.  
  pattern ^tx_[0-9a-hjkmnp-tv-z]{20}$
- `share` boolean  
  true also makes a frozen report link for this run (report_url), for anyone with the link; needs an account.
- `charts` boolean  
  true adds the equity, drawdown and rolling ROI charts as Kelly Chart Specs (detail full).

### Response
`200` The rule test facts.

- `object` const · required  
  Always rule_test.  
  Always `"rule_test"`.
- `verdict` object · required  
  Verdict v2: the leak gate, nine checks in three groups and the headline.
  - `version` integer  
    2.
  - `headline` string · required  
    The verdict in words.
  - `gate` object  
    The leak gate: a rule reading anything not known at the bet moment is refused first; leak_test is the cut-data rerun's status (clean or not_run).
  - `held_back_by` array of string  
    Why a rule with no failed check isn't holds_up (honest forward ROI at or under 0, PBO over 0.5 across 10 or more variants).
  - `level` string · required  
    too_few, no_profit, no_evidence, luck, promising or holds_up.  
    One of: `too_few`, `no_profit`, `no_evidence`, `luck`, `promising`, `holds_up` (open: new values may be added).
  - `passed` integer · required  
    Checks passed.
  - `applicable` integer · required  
    Checks that apply.
  - `checks` array of object · required  
    The checks, in a fixed order.
    - `key` string · required  
      The check; a teaser keeps v1's six (newest_30, seasons_won, price_worse among them).  
      One of: `enough_bets`, `not_luck`, `beats_base`, `half_point_worse`, `nearby_holds`, `not_concentrated`, `beats_close`, `still_working`, `since_saved`, `calibrated`, `newest_30`, `seasons_won`, `price_worse` (open: new values may be added).
    - `group` string  
      real (is it real?), pressure or still_working; not on a teaser's checks.  
      One of: `real`, `pressure`, `still_working` (open: new values may be added).
    - `label` string · required  
      The check, in words.
    - `status` string · required  
      pass, fail or na (it can't apply).  
      One of: `pass`, `fail`, `na` (open: new values may be added).
    - `zone` string  
      green, yellow (within one standard error of the threshold), red, or na.  
      One of: `green`, `yellow`, `red`, `na` (open: new values may be added).
    - `value` string · required  
      The figure behind it, in words.
    - `statistic` number | integer · nullable  
      The number the check compares.
    - `threshold` number | integer · nullable  
      What it is compared with.
    - `basis` string  
      seasons_won or newest_30 while the full check is still being built; points when Beats the close is judged on points beaten (audit F3).
- `overall` object · required  
  Every graded bet.
  - `record` string  
    Wins-losses(-pushes).
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `bets` integer  
    Graded bets.
  - `decisions` integer  
    Wins plus losses.
  - `units` number · nullable  
    Units won or lost.
  - `roi` number · nullable  
    Units over units risked.
  - `roi_interval` array of number · nullable  
    ROI's 95% interval at 1 unit risked a bet.
  - `win_rate` number · nullable  
    Wins over decisions.
  - `break_even` number · nullable  
    The win rate that breaks even at these prices.
  - `significance` object · nullable  
    The record test (kmath.records.record_test) and verdict v2's statistics (kmath.significance): the p-value, adjusted for the rules tried, and the anytime-valid test.
    - `p_value` number · nullable  
      The larger of the exact and the clustered one-sided p against no skill at these prices (F12, F23).
    - `method` string · nullable  
      exact_binomial, exact_simulation, saddlepoint or z_score.
    - `z` number · nullable  
      The score z: units over the square root of Σ(d − 1).
    - `t_stat` number · nullable  
      The t statistic with the sample variance.
    - `p_value_exact` number · nullable  
      The exact (or z) tail alone.
    - `p_value_clustered` number · nullable  
      The tail with bets clustered by slate and team-season (F23).
    - `p_value_vs_vig` number · nullable  
      Against a random bet at the no-vig close (needs closes).
    - `p_adjusted` number · nullable  
      The p-value adjusted for the rules tried (Romano-Wolf on the ledger's rules, Bonferroni on the count otherwise; F14).
    - `adjust_method` string · nullable  
      romano_wolf, holm or none.
    - `tests` integer · nullable  
      Rules tried in this family, this one included.
    - `tests_effective` number · nullable  
      Effective tests (Li-Ji): near-duplicate rules count as fewer.
    - `reality_check_p` number · nullable  
      White's Reality Check p (when the ledger holds the rules' units).
    - `spa_p` number · nullable  
      Hansen's SPA p (when the ledger holds the rules' units).
    - `clears_t3` boolean · nullable  
      z at or above 3 (Harvey-Liu-Zhu's bar).
    - `haircut` number · nullable  
      Harvey-Liu haircut: the share of the ROI the rules tried take away.
    - `haircut_roi` number · nullable  
      ROI after the haircut, per decision.
    - `anytime_valid` object · nullable  
      The record as a bet against no skill (F17): e-value, anytime p, ROI range.
      - `e_value` number · nullable  
        The e-value now.
      - `p_value` number · nullable  
        1 over the largest e-value so far.
      - `max_e` number · nullable  
        The largest e-value along the path.
      - `roi_cs95` array of number · nullable  
        An ROI range valid at every bet.
  - `roi_ci95` array of number · nullable  
    ROI's 95% score interval, clustered (F13, F23).
  - `units_ci95` array of number · nullable  
    Units' 95% interval: decisions times the ROI interval.
  - `roi_ci` object · nullable  
    ROI intervals at ci_level: score (the one shown), BCa, block bootstrap over slates and anytime-valid (F13).
  - `deflated` object · nullable  
    Per-bet Sharpe, PSR and DSR at the effective tests, and the bets needed: deflated (sample_needed), single test and 80% power, each times the design effect (F15).
    - `sample_needed` integer · nullable  
      Decisions needed, deflated for the rules tried; null with no edge to prove.
    - `sample_needed_single` integer · nullable  
      Decisions needed for one rule tried.
    - `sample_needed_power80` integer · nullable  
      Decisions for 80% power at this ROI.
    - `sample_needed_plan` integer · nullable  
      Decisions for 80% power at plan_roi.
    - `dsr` number · nullable  
      Deflated Sharpe ratio.
    - `psr` number · nullable  
      Probabilistic Sharpe ratio.
  - `sample_needed` object · nullable  
    Bets needed to tell this win rate from break-even (one-sided, with 80% power, ...).
  - `small_sample` boolean  
    Under 30 decisions.
  - `few_decisions` boolean  
    Under 5 decisions.
- `honest` object · nullable  
  The honest forward ROI (F22, the headline ROI): empirical Bayes toward a prior mean (the rule's own closing-line value when at least half its bets have a close, else the usual two-way margin), less the winner's curse for the rules tried and the out-of-sample decay.
  - `roi` number · nullable  
    Honest forward ROI.
  - `ci80` array of number · nullable  
    80% range.
  - `raw_roi` number · nullable  
    The past ROI per decision, beside it.
  - `prior_mean` number · nullable  
    The prior mean the ROI is shrunk toward (prior.source says which).
  - `prior_sd` number · nullable  
    The spread of true ROIs (0.02 until fitted on the ledger).
  - `shrink` number · nullable  
    Weight on the prior, se²/(se² + τ²).
  - `selection_adj` number · nullable  
    Winner's-curse correction for the rules tried.
  - `decay_factor` number · nullable  
    Out-of-sample decay on the excess (0.74).
  - `stabilizes_at_bets` integer · nullable  
    Decisions at which the record and the prior weigh the same.
  - `uses_clv` boolean  
    The prior mean is the rule's own closing-line value.
  - `prior_basis` string  
    fitted (prior_sd from the ledger's fit) or seed.
  - `prior` object  
    Where the prior mean comes from.
    - `source` string  
      clv (the rule's mean closing-line value), margin (the two-way margin, -4.55%) or fitted.
    - `mean` number · nullable  
      The prior mean used.
    - `closes` integer  
      Decided bets with a no-vig close.
    - `capped` boolean  
      A closing-line value above 0 was held at 0: under 50 bets have a close.
    - `words` string  
      The prior, said plainly.
- `dependence` object · nullable  
  Bets clustered by slate (the date; the week in the NFL and college football) and team-season (F23).
  - `clusters` integer  
    Slates.
  - `design_effect` number  
    Clustered over iid variance.
  - `effective_bets` integer  
    Decisions over the design effect (at least 1).
  - `method` string  
    cr1_twoway, cr1_slate, cr1_larger_oneway, wild_bootstrap or wild_bootstrap_webb.
- `base` object · nullable  
  The rule against the rest of its own base (F19): the who-or-when conditions alone, or base_formula.
  - `formula` string · nullable  
    The base, or null for the whole market.
  - `source` string  
    auto, user or market.  
    One of: `auto`, `user`, `market` (open: new values may be added).
  - `status` string  
    measured or na.  
    One of: `measured`, `na` (open: new values may be added).
  - `roi` number · nullable  
    The base's ROI per decision.
  - `lift` number · nullable  
    Rule ROI less base ROI.
  - `p_value_vs_base` number · nullable  
    Season-stratified permutation p of the rule within its base.
  - `units_from_base` number · nullable  
    Units the base alone would have made on the rule's stakes.
  - `units_from_filter` number · nullable  
    The rule's units less units_from_base.
- `clv` object · required  
  Closing-line value as evidence (F21): each bet's no-vig CLV, q_close x price - 1, on bets Kelly holds a close for. Empty when betting at the close.
  - `bets_with_close` integer  
    Bets with a close.
  - `bets_without_close` integer  
    Bets without one.
  - `reference` string  
    The close used: consensus (the no-vig average across books).
  - `devig` string  
    How the vig was removed: multiplicative.
  - `lines_converted` integer  
    Bets whose close was carried from the closing line to the bet's line (NFL spreads and totals).
  - `coverage` number · nullable  
    Share of bets with a close probability (null with no bets).
  - `closes_stale` integer  
    Closes left out as older than 60 minutes at the start, or seen after it (audit F9): those bets keep their result but have no CLV.
  - `points_coverage` number · nullable  
    Share of bets with points beaten (spreads and totals).
  - `points_test` object · nullable  
    The clustered test on points beaten (audit F3).
    - `bets` integer  
      Bets with points beaten.
    - `mean` number · nullable  
      Mean points the bet's line beat the close by.
    - `std_error_clustered` number · nullable  
      Standard error clustered by slate and team-season.
    - `df_clustered` integer  
      Degrees of freedom: the fewer clusters less one.
    - `ci95_clustered` array of number · nullable  
      Clustered 95% interval.  
      min items 2 · max items 2
    - `p_value_clustered` number · nullable  
      One-sided p of mean points beaten > 0.
    - `cluster_method` string  
      How the standard error was clustered.
  - `basis` string  
    What Beats the close is judged on: probability, or points when under 80% of bets have a close probability and more have points beaten (audit F3).  
    One of: `probability`, `points` (open: new values may be added).
  - `mean` number · nullable  
    Mean CLV (fraction): the bets' expected ROI if the close is right.
  - `ci95` array of number · nullable  
    Clustered 95% interval on the mean.  
    min items 2 · max items 2
  - `p_value` number · nullable  
    One-sided clustered p of mean CLV > 0.
  - `beat_close_share` number · nullable  
    Share of bets with CLV above 0, ties counted.
  - `beat_rate` number · nullable  
    Share of bets that beat the close, ties left out.
  - `beat_rate_ci95` array of number · nullable  
    Wilson 95% interval on beat_rate.  
    min items 2 · max items 2
  - `sign_test_p` number · nullable  
    Exact one-sided sign test against half.
  - `mean_prob` number · nullable  
    Mean of the close's no-vig probability less the bet moment's.
  - `mean_points` number · nullable  
    Mean points the bet's line beat the closing line by (spreads and totals).
  - `points_bets` integer  
    Bets mean_points is over.
  - `profit_slope` number · nullable  
    Per-bet units regressed on CLV: near 1 when CLV turned into profit.
  - `profit_slope_se` number · nullable  
    Its slate-clustered standard error.
  - `sample_needed` integer · nullable  
    Bets CLV needs for a 95% interval to clear 0 at this mean and spread (null unless the mean is above 0).
  - `sample_needed_roi` integer · nullable  
    Bets profit would need at the same edge.
  - `significance` object · nullable  
    The CLV mean's tests (null under two bets).
    - `t` number · nullable  
      Mean over its iid standard error.
    - `ci95` array of number · nullable  
      Student 95% interval (iid).  
      min items 2 · max items 2
    - `std_error` number · nullable  
      iid standard error.
    - `bets_needed` number · nullable  
      Bets a t of 2 needs at this mean and spread.
    - `std_error_clustered` number · nullable  
      Standard error clustered by slate and team-season (F23).
    - `df_clustered` integer  
      Degrees of freedom: the fewer clusters less one.
    - `ci95_clustered` array of number · nullable  
      Clustered 95% interval.  
      min items 2 · max items 2
    - `p_value_clustered` number · nullable  
      One-sided p of mean CLV > 0 (wild cluster bootstrap under 42 slates, else Student t); beats_close reads it.
    - `cluster_method` string  
      How the standard error was clustered.
    - `design_effect` number · nullable  
      Clustered variance over iid variance.
  - `note` string  
    Why the block is empty, when it is.
- `luck` object  
  The luck-adjusted result (F20): the units the market's fair probabilities expected the decided bets to make against what they made. Pushes count zero both ways.
  - `reading` string  
    luck (bets before the close: the gap is outcome noise) or versus_the_market (bets at the close: the gap is the rule's edge on the closing market).  
    One of: `luck`, `versus_the_market` (open: new values may be added).
  - `close_source` string  
    consensus.
  - `devig` string  
    multiplicative.
  - `bets` integer  
    Decided bets with a fair probability.
  - `bets_without_prob` integer  
    Decided bets without one.
  - `left_out` object  
    Bets left out.
    - `push` integer  
      Pushes.
    - `half` integer  
      Half results (quarter lines).
  - `lines_converted` integer  
    Bets whose close was carried to the bet's line.
  - `expected_units` number · nullable  
    Sum of stake x (q x (price - 1) - (1 - q)).
  - `actual_units` number · nullable  
    Units the bets made.
  - `luck_units` number · nullable  
    actual_units less expected_units.
  - `luck_se_units` number · nullable  
    luck's standard error given the probabilities.
  - `expected_wins` number · nullable  
    Sum of q.
  - `actual_wins` integer · nullable  
    Wins.
  - `luck_percentile` number · nullable  
    Where the wins sit among the market's (Poisson-binomial, mid-p): 0.95 is luckier than (95) of (100) identical paths.
  - `expected_roi` number · nullable  
    expected_units over units risked.
  - `actual_roi` number · nullable  
    actual_units over units risked.
  - `theta` number · nullable  
    Per-bet units regressed on expected units (30 bets or more): near 1 when the close is calibrated on these bets.
  - `by_season` array of object  
    Each season, in calendar order; luck_units add up to the total.
    - `season` string  
      Season.
    - `bets` integer  
      Decided bets with a probability.
    - `expected_units` number  
      Units the market expected.
    - `actual_units` number  
      Units made.
    - `luck_units` number  
      actual_units less expected_units.
- `capacity` object · nullable  
  F8: the limits Kelly measured at the bet moment (ADR-K783); evidence beside the verdict, never in it. No book publishes its limits, so only measured ones are shown.
  - `available` boolean  
    Whether measured limits are shown for this market and moment.
  - `market` string · nullable  
    The market as line history names it (spreads, totals, h2h).
  - `before_start` string · nullable  
    The time before the start the bet moment falls in.  
    One of: `0_1h`, `1_12h`, `12_36h`, `36_72h`, `72h_plus` (open: new values may be added).
  - `books` array of object  
    Per book, highest median first.
    - `book` string · nullable  
      The book as the vendor names it.
    - `vendor` string · nullable  
      Who measured it.
    - `currency` string · nullable  
      The stake currency, null when the vendor doesn't say.
    - `median` number · nullable  
      The median limit.
    - `p25` number · nullable  
      Its 25th percentile.
    - `p75` number · nullable  
      Its 75th percentile.
    - `min` number · nullable  
      The smallest.
    - `max` number · nullable  
      The largest.
    - `snapshots` integer  
      Limit readings behind it.
    - `games` integer  
      Games behind it.
    - `first_seen` string · nullable  
      The first reading's date.
    - `last_seen` string · nullable  
      The last reading's date.
  - `max_stake_per_bet` object · nullable  
    The highest book median: the most one book typically took on one bet.
    - `book` string · nullable  
      The book.
    - `amount` number · nullable  
      The median limit.
    - `currency` string · nullable  
      Its currency.
  - `per_season_at_limit` number · nullable  
    max_stake_per_bet times the rule's bets a season.
  - `bets_per_season` number · nullable  
    The rule's bets a season.
  - `limits_held` integer  
    Limit readings Kelly holds for this market and moment.
  - `reason` string · nullable  
    Why none are shown, when available is false.
- `stress` object · required  
  The same bets graded harder.
  - `half_point_worse` object · nullable  
    Every line half a point worse (none for moneylines).
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
  - `flat_110` object · nullable  
    Every bet at -110 (none for moneylines).
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
  - `other_side` object  
    The other side of every bet.
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
  - `break_even` object · nullable  
    F7: how much worse the price or line can get before the profit is gone.
    - `price_multiplier` number · nullable  
      The share of each payout (d - 1) that breaks even (under 1: the room to spare).
    - `american_avg` number · nullable  
      The flat American price that breaks even.
    - `decimal_avg` number · nullable  
      The same, decimal.
    - `line_points` number · nullable  
      The most points worse (in halves, up to 3) the line could be with a profit left; 0 when none; null for moneylines.
  - `grid` array of object · nullable  
    F7: the bets at -105 to -120 with the line 0 to 1 point worse (moneylines: payouts cut 0-6%); left out at detail summary.
    - `vig` integer · nullable  
      Every bet at this American price.
    - `line_shift` number · nullable  
      Points the line moved (negative: worse).
    - `price_multiplier` number · nullable  
      Moneylines: the share of each payout kept.
    - `units` number · nullable  
      Units.
    - `roi` number · nullable  
      ROI.
  - `slippage_mc` object · nullable  
    F7: each bet's line worsened by a draw from the market's own Monday-to-close moves, 1,000 seeded runs; null without such moves.
    - `runs` integer  
      Runs.
    - `roi_p05` number · nullable  
      5th percentile ROI.
    - `roi_p50` number · nullable  
      Median ROI.
    - `profitable_share` number · nullable  
      Share of runs with a profit.
    - `moves_from` integer  
      Line moves the draws come from.
    - `move_median` number · nullable  
      Their median size, points.
  - `price_worse` object · nullable  
    Teasers: every ticket ten cents worse (price_american). Racing: every bet's winnings 5% smaller.
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
- `legs` object · nullable  
  Teasers: every teased leg, judged against the per-leg break-even (1/D)^(1/n).
  - `record` string  
    Legs won-lost(-pushed).
  - `decisions` integer  
    Legs won plus lost.
  - `cover_rate` number · nullable  
    Legs won over legs decided.
  - `break_even_per_leg` number  
    The cover rate a leg needs at the ticket's price.
  - `significance` object · nullable  
    The legs' record test against the per-leg break-even.
  - `sample_needed` object · nullable  
    Legs needed to tell this cover rate from the break-even.
- `teaser` object · nullable  
  Teasers: the options tested. Prices are assumed: Kelly holds no historical teaser prices.
  - `points` number  
    Points each leg moved.
  - `legs` integer  
    Legs a ticket.
  - `price` object  
    The ticket's price (American and decimal).
  - `reduced_prices` object  
    Prices for tickets reduced by a pushed leg, by legs left (American).
  - `push` string  
    reduce, lose or ticket_push.  
    One of: `reduce`, `lose`, `ticket_push` (open: new values may be added).
  - `pairing` string  
    all_pairs or chronological.  
    One of: `all_pairs`, `chronological` (open: new values may be added).
  - `leg_market` string  
    spread, over or under.  
    One of: `spread`, `over`, `under` (open: new values may be added).
  - `break_even_per_leg` number  
    (1/D)^(1/n) at the ticket's price.
  - `price_assumed` boolean  
    Always true: the price is the person's or a common book table.
  - `tickets` integer  
    Tickets formed.
- `random_baseline` object · nullable  
  F18: the rule against random bets of the same count on the same games, matched by season and price bucket.
  - `sims` integer  
    Random rules drawn.
  - `bets` integer  
    The rule's bets.
  - `pool` integer  
    Bets the market offered.
  - `percentile` number · nullable  
    Share of random rules with a lower ROI.
  - `beats_per_100` integer  
    Random rules out of 100 the rule beats.
  - `p_value` number · nullable  
    (1 + random rules at or above) / (sims + 1).
  - `analytic_p` number · nullable  
    The finite-population normal cross-check.
  - `random_roi_median` number · nullable  
    Median random ROI (about minus the vig).
  - `random_roi_p05` number · nullable  
    5th percentile random ROI.
  - `random_roi_p95` number · nullable  
    95th percentile.
  - `best_of_tests` object  
    Would the best of M random rules (M = rules tried) do this well?
    - `tests` integer  
      M.
    - `p_value` number · nullable  
      1 - F(ROI)^M.
  - `histogram` object · nullable  
    Random ROIs in 30 bins (edges, counts); full detail only.
- `decay` object · nullable  
  F24: is the rule still making money? Rolling ROI and CLV, one unknown break (sup-F, block permutation p), a CUSUM alarm, a known-date test, the trend and the decay ratio.
  - `bets` integer  
    Graded bets.
  - `window` integer · nullable  
    Rolling window, bets.
  - `rolling` array of object · nullable  
    Up to 200 points; full detail only.
  - `break` object · nullable  
    The most likely date the edge changed.
    - `at` string  
      Date.
    - `bet_index` integer  
      Bets before it.
    - `sup_f` number · nullable  
      sup-F.
    - `p_value` number · nullable  
      Block permutation p-value.
    - `at_edge` boolean  
      Within the first or last 15%: not a confirmed break.
    - `roi_before` number · nullable  
      ROI before.
    - `roi_after` number · nullable  
      ROI after.
    - `bets_after` integer  
      Bets after.
  - `cusum` object · nullable  
    Page's lower CUSUM alarm.
  - `known_break` object · nullable  
    A Chow test at break_date.
  - `trend_per_100_bets` number · nullable  
    Profit per bet's change per 100 bets (1 unit risked).
  - `decay_ratio` number · nullable  
    ROI after the break (or the newest 30%) over ROI before.
  - `clv_break` object · nullable  
    The break test on CLV.
  - `roi_newest_30` number · nullable  
    ROI of the newest 30% of bets.
- `ablation` object · nullable  
  F27: each top-level AND condition's Shapley share of the units beyond the base's ROI.
  - `base` object  
    Every game with a line: decisions and ROI.
  - `total` number · nullable  
    The rule's units beyond the base's ROI (the Shapley values add up to it).
  - `clauses` array of object  
    One a condition, in the order written.
    - `condition` string  
      The condition.
    - `shapley_units` number · nullable  
      Its share of the extra units.
    - `share` number · nullable  
      Of the total.
    - `label` string  
      dead, harmful, load_bearing or helps.  
      One of: `dead`, `harmful`, `load_bearing`, `helps` (open: new values may be added).
    - `fix` object · nullable  
      Remove it: the rule without it.
  - `pairs` array of object  
    Pairs (up to 6 conditions).
  - `method` string  
    exact or sampled.  
    One of: `exact`, `sampled` (open: new values may be added).
- `nearby` object · nullable  
  F28: every number in the rule moved two steps each way (steps fixed by the field).
  - `numbers` array of object  
    The rule's numbers.
  - `variants` integer  
    Variants in the grid.
  - `distinct_bet_sets` integer  
    Variants with their own bets.
  - `roi_median` number · nullable  
    Median ROI of the variants.
  - `roi_p05` number · nullable  
    5th percentile.
  - `roi_p95` number · nullable  
    95th percentile.
  - `plateau_share` number · nullable  
    Share of one-step neighbours that made money.
  - `spike_ratio` number · nullable  
    (ROI - median) / IQR of the variants.
  - `reading` string · nullable  
    plateau, slope or spike.
  - `na` string · nullable  
    Why there are no numbers to move.
- `monte_carlo` object · nullable  
  F31: drawdowns and losing runs the same bets give in other orders.
  - `sims` integer  
    Simulations.
  - `mode` string  
    block, iid or permutation.
  - `max_drawdown_units` object  
    Max drawdown, units.
    - `p05` number · nullable  
      5th percentile.
    - `p50` number · nullable  
      Median.
    - `p95` number · nullable  
      95th percentile.
    - `actual` number · nullable  
      The real order's figure.
  - `longest_losing_run` object  
    Longest losing run, bets.
    - `p05` number · nullable  
      5th percentile.
    - `p50` number · nullable  
      Median.
    - `p95` number · nullable  
      95th percentile.
    - `actual` number · nullable  
      The real order's figure.
  - `final_units` object  
    Final units.
    - `p05` number · nullable  
      5th percentile.
    - `p50` number · nullable  
      Median.
    - `p95` number · nullable  
      95th percentile.
    - `actual` number · nullable  
      The real order's figure.
  - `prob_below_zero` number · nullable  
    Share of runs finishing below zero.
  - `worst_100_bets_units_p05` number · nullable  
    5th percentile of the worst 100-bet stretch.
- `noise` object · nullable  
  F32: jittered inputs, lines moved half a point either way, and an earlier bet moment.
  - `inputs` object · nullable  
    The rule's compared numbers jittered.
    - `runs` integer  
      Runs.
    - `profitable_runs` integer  
      Runs with a profit.
    - `profitable_share` number · nullable  
      Share.
    - `roi_median` number · nullable  
      Median ROI.
    - `roi_p05` number · nullable  
      5th percentile ROI.
    - `overlap_median` number · nullable  
      Median Jaccard overlap of the bets with the rule's.
  - `lines` object · nullable  
    Lines (moneylines: payouts) moved at random.
  - `delay` object · nullable  
    The rule bet at the earlier moment.
- `concentration` object · nullable  
  F34: the profit without the best season, team, opponent, month and weekday.
  - `by` array of object  
    Groupings in a fixed order.
    - `group` string  
      season, team, opponent, month or weekday.
    - `best` object · nullable  
      The best group (3+ bets).
    - `without_best` object · nullable  
      The rule without it.
    - `effective_groups` number · nullable  
      1 / Herfindahl of the profitable groups' shares.
    - `p_more_concentrated` number · nullable  
      Permutation p-value (teams and opponents).
  - `trim_top_0_05` object · nullable  
    Without the top 5% of bets (moneylines) or bet-days.
- `split_dimensions` array of object · nullable  
  F35: the rule by fixed dimensions with shrunk ROI and intervals.
  - `dimension` string  
    The dimension.
  - `heterogeneity_p` number · nullable  
    Chi-square p-value of win rates across its levels.
  - `heterogeneity_q` number · nullable  
    Benjamini-Hochberg q across the dimensions.
  - `real_difference` boolean  
    q < 0.10.
  - `where_profit` string · nullable  
    The level with the most shrunk extra units, when real.
  - `cells` array of object · nullable  
    Levels in a fixed order; full detail only.
- `robustness` object  
  The suite's run: the verdict v2 checks it feeds and its seed.
  - `checks` array of object  
    half_point_worse, nearby_holds, not_concentrated and still_working.
    - `key` string · required  
      The check.  
      One of: `half_point_worse`, `nearby_holds`, `not_concentrated`, `still_working` (open: new values may be added).
    - `label` string · required  
      The check, in words.
    - `status` string · required  
      pass, fail or na.  
      One of: `pass`, `fail`, `na` (open: new values may be added).
    - `value` string · required  
      The figure behind it, in words.
    - `statistic` number · nullable  
      The figure the status compares.
    - `threshold` number · nullable  
      What it is compared with.
  - `fast_path` boolean  
    The rule's numbers were re-bet from its compiled columns.
  - `seed` integer  
    The seed (a hash of the rule and its options).
  - `evaluations` integer  
    Formula evaluations the suite ran.
  - `off` array of string  
    Blocks switched off.
- `path` object  
  The units path in date order: drawdown and longest losing run; at detail full its series (F47).
  - `max_drawdown_units` number  
    The deepest fall from a peak, units.
  - `longest_losing_run` integer  
    Most losses in a row (pushes don't break it).
  - `series` object · nullable  
    Bet-indexed lines of the graded bets (detail full): `index` the bet numbers kept (past 600 bets thinned by LTTB, the deepest drawdown always kept), `dates`, `units`, `drawdown`, `base_units` (the market base's ROI at the same stakes, null unless measured), `band_p025` and `band_p975` (the no-skill range: 1,000 seeded runs of the same bets at their fair chances; null under 20 bets or for racing), `rolling_roi_100` with its no-skill range `rolling_p025` and `rolling_p975`, and `markers` (season starts, the holdout).
    - `x` string  
      Always bet_index.  
      One of: `bet_index` (open: new values may be added).
    - `index` array of integer  
      Bet numbers (1 is the first graded bet).
    - `dates` array of string  
      Each kept bet's date (YYYY-MM-DD, UTC).
    - `units` array of number  
      Units to date.
    - `drawdown` array of number  
      Units below the running peak (0 or below).
    - `base_units` array of number · nullable  
      The market base at the same stakes.
    - `band_p025` array of number · nullable  
      No-skill 2.5th percentile.
    - `band_p975` array of number · nullable  
      No-skill 97.5th percentile.
    - `rolling_roi_100` array of number  
      ROI over the last 100 bets (null before).
    - `rolling_p025` array of number  
      Its no-skill 2.5th percentile.
    - `rolling_p975` array of number  
      Its no-skill 97.5th percentile.
    - `markers` array of object  
      Where each season and the holdout start.
      - `type` string  
        season or holdout.  
        One of: `season`, `holdout` (open: new values may be added).
      - `at` integer  
        The bet number it starts at.
      - `label` string · nullable  
        The season, or newest 30%.
  - `downsampled` boolean  
    The series were thinned to 600 points.
  - `expected_max_drawdown_zero_edge` number · nullable  
    The median deepest drawdown of the no-skill runs, units.
- `holdout` object · nullable  
  The latest 30% of bets against the earlier 70%.
- `seasons` array of object  
  Seasons in calendar order.
- `splits` array of object · nullable  
  Home, away, favorite, underdog and line bands, in a fixed order; null at detail summary.
  - `record` string  
    Wins-losses(-pushes).
  - `bets` integer  
    Bets graded or not.
  - `decisions` integer  
    Wins plus losses.
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `units` number · nullable  
    Units won or lost at the staking asked for.
  - `roi` number · nullable  
    Units over units risked.
  - `p_value` number · nullable  
    The record's own p-value against no skill at its prices.
  - `p_adjusted` number · nullable  
    On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
  - `shown_rows` integer  
    On splits and condition-removed rows: the rows p_adjusted counts.
- `without` array of object · nullable  
  One row a top-level AND condition: the rule's record without it; null at detail summary.
  - `record` string  
    Wins-losses(-pushes).
  - `bets` integer  
    Bets graded or not.
  - `decisions` integer  
    Wins plus losses.
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `units` number · nullable  
    Units won or lost at the staking asked for.
  - `roi` number · nullable  
    Units over units risked.
  - `p_value` number · nullable  
    The record's own p-value against no skill at its prices.
  - `p_adjusted` number · nullable  
    On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
  - `shown_rows` integer  
    On splits and condition-removed rows: the rows p_adjusted counts.
  - `p_value_vs_rule` number · nullable  
    The rule against the bets the condition removes (F19).
  - `p_value_vs_rule_adjusted` number · nullable  
    p_value_vs_rule, Holm-adjusted over the conditions shown.
- `bets` array of object  
  Every bet in date order (left out at detail summary).
  - `key` string  
    {game_id}:{team_id} (racing: {race_id}:{runner_id}).
  - `starts_at` string  
    Kickoff (RFC 3339).  
    format date-time
  - `season` string  
    The season.
  - `label` string  
    Date, team and opponent.
  - `price` object · nullable  
    The price at the bet moment, decimal.
  - `line` number · nullable  
    The bet's line as graded (the team's spread, the total).
  - `result` string · nullable  
    win, loss or push (soccer quarter lines: half_win or half_loss); null until played.
  - `close_prob` number · nullable  
    The fair closing probability of the same side, for CLV.
  - `units_to_date` number  
    Units after this bet, in date order.
  - `how_graded` string · nullable  
    How the bet was graded, in words.
  - `units` number · nullable  
    Units the bet won or lost at the run's staking (racing: its exact profit or loss with dead heats, each way, Rule 4 and commission); null until played.
  - `drawdown_to_date` number · nullable  
    Units to date less their running peak (0 or below); null until played.
  - `side` string · nullable  
    home or away (spread, moneyline), over, under or draw.
  - `market` string  
    The market graded (the other total when fading a total).
  - `bet_moment` string  
    When the bet was taken: edition, day_before or close.
  - `clv_prob` number · nullable  
    The fair closing chance less the fair chance at the bet moment, when Kelly holds both.
  - `sample` string · nullable  
    holdout for the latest 30% of graded bets by time, else in_sample; null with no holdout or until played.  
    One of: `in_sample`, `holdout` (open: new values may be added).
  - `why` array of object  
    Why it matched: up to six conditions (F46).
    - `clause` string  
      The condition as written.
    - `value` number | boolean | string · nullable  
      The compared expression's number for a comparison (rest_days - opponent.rest_days for rest_days - opponent.rest_days >= 3), else true or false.
  - `settlement` array of string  
    The settlement rules that decided the bet (IDs in settlement.rules).
- `leak_test` object  
  The leak test (F3): the rule and each part of it evaluated again on a sample of rows with the data cut at the bet moment. A leak refuses the test (422 rule_not_testable, problem leak_found), so a report always says clean or not_run.
  - `status` string · required  
    clean, leak_found or not_run.  
    One of: `clean`, `leak_found`, `not_run` (open: new values may be added).
  - `rows_checked` integer · required  
    Rows rebuilt at the bet moment.
  - `matched_checked` integer  
    Of them, rows the rule matched.
  - `matches_flipped` integer  
    Rows whose match changed with the data cut.
  - `parts` array of object · required  
    Parts that changed, in the formula's order (empty when clean).
    - `name` string  
      The part, as written (rule is the whole rule).
    - `rows_changed` integer  
      Rows where it changed.
    - `max_change` number · nullable  
      The largest change in a number.
    - `example` string  
      One changed row, {game_id}:{team_id}.
- `warm_up` object  
  The warm-up check (F4): bets taken before the rule's windows had the earlier games they read (one season at a time; windows never reach into last season).
  - `policy` string  
    The policy graded in the report.  
    One of: `as_written`, `require_full` (open: new values may be added).
  - `games_needed` integer  
    Earlier games every window needs (0: the rule has no window).
  - `windows` array of object  
    Each window in the formula's order.
    - `expr` string  
      The window, as written.
    - `games_needed` integer · nullable  
      Earlier games it reads (null: season to date).
    - `short_rows` integer  
      Rows in scope with fewer earlier games this season.
    - `short_bets` integer  
      Bets the rule took with fewer.
  - `short_bets` integer  
    Bets taken with a window short.
  - `by_policy` array of object · nullable  
    as_written, then require_full; null when the rule has no window.
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
  - `warning` boolean  
    Short bets are over 10% of the bets, or leaving them out moves ROI by more than half its 95% interval's half-width.
- `settlement` object  
  How bets were settled (F9): Kelly's own grading rules as data, and each rule's bets.
  - `profile` string  
    The rules profile (kelly_standard).
  - `rules_version` string  
    The rules table's date.
  - `applied` array of object  
    Rules that decided at least one bet, in table order.
    - `rule` string  
      Rule ID.
    - `bets` integer  
      Bets.
  - `rules` array of object  
    The rules for this league and market.
    - `id` string  
      Rule ID.
    - `text` string  
      The rule in words.
    - `effective_from` string  
      The date Kelly's grader took it up.
- `coverage` object  
  Coverage (F10): from every game in scope to the bets graded, each season's priced share, blank inputs and whether the rows left out for no line differ from the bets kept.
  - `flow` array of object  
    The steps in order; rule_true rows = decisions + every row out after it.
    - `step` string  
      in_scope, rule_true, one_bet_a_game, full_windows, priced, graded or decisions.
    - `games` integer  
      Games (in_scope only).
    - `rows` integer  
      Rows.
    - `out` object  
      Rows that left at this step, by reason.
  - `by_season` array of object  
    Every season asked for, in order.
    - `season` string  
      Season.
    - `games` integer  
      Games in scope.
    - `rows` integer  
      Rows.
    - `rule_true` integer  
      Rows the rule matched.
    - `bets` integer  
      Bets graded.
    - `priced_share` number · nullable  
      Share of rows with a price at the bet moment.
  - `inputs_missing` array of object  
    Inputs read bare on the row, with blanks.
    - `attribute` string  
      The input.
    - `rows_blank` integer  
      Rows with no value.
    - `share` number · nullable  
      Share of rows in scope.
  - `left_out_differs` object  
    Rows left out for no line against the bets kept: standardized mean difference over home, neutral site and rest days; flagged over 0.1 with 10 or more left out.
    - `flag` boolean  
      They differ.
    - `max_smd` number · nullable  
      The largest difference.
    - `covariate` string · nullable  
      Where it is.
    - `left_out` integer  
      Rows.
    - `kept` integer  
      Rows.
    - `by_covariate` array of object  
      Each covariate's difference.
- `moment` object  
  The bet moment's clock (F5): its target time, the prices' snapshot age at it and where the lines came from.
  - `bet_moment` string  
    edition, day_before or close.
  - `target` string · nullable  
    The moment's time for a game, in words.
  - `max_stale_minutes` integer  
    Oldest price kept, in minutes before the target.
  - `floor_minutes_before_oct_2022` integer  
    The limit's floor for games before October 2022 (the Odds API's 10-minute snapshots).
  - `rows_priced` integer  
    Rows the rule took that had a price.
  - `rows_aged` integer  
    Rows whose price carries its snapshot time and was kept.
  - `median_snapshot_age_minutes` number · nullable  
    Median minutes from snapshot to target, kept rows.
  - `max_snapshot_age_minutes` number · nullable  
    Oldest kept snapshot, in minutes before the target.
  - `stale_price` integer  
    Rows left out: price older than max_stale_minutes.
  - `after_moment` integer  
    Rows left out: price seen after the target.
  - `age_unknown` integer  
    Rows kept whose price has no snapshot time (Kelly's own frozen lines).
  - `line_sources` object  
    Kept rows by line source (sheet_line, odds_api_early, odds_api_close).
- `left_out` object · required  
  Games the rule matched but didn't bet.
  - `no_line` integer  
    No Kelly line at the bet moment.
  - `both_sides` integer  
    The rule matched both teams.
  - `stale_price` integer  
    The price was older than max_stale_minutes at the bet moment, or seen after it (F5).
  - `unpaired` integer  
    Teasers: legs left off a ticket (a week with too few, or the leftover in chronological pairing).
  - `no_price` integer  
    Racing: runners with no price to settle at.
  - `non_runners` integer  
    Racing: non-runners (void).
  - `void_races` integer  
    Racing: abandoned or void races.
- `risk` object  
  Risk of ruin (F36, kmath.backtest.rule_ruin): the chance of losing ruin_share of the bankroll within horizon_bets bets betting like the record, with its win rate taken as exact and allowing for its sample (a Beta posterior draw a path); the Lundberg bound; the bankroll curve.
  - `bankroll_units` number  
    Bankroll in units.
  - `ruin_share` number  
    Share of the bankroll whose loss counts as ruin.
  - `horizon_bets` integer  
    Bets ahead.
  - `ruin_if_rate_exact` number · nullable  
    Ruin chance if the record's win rate were exact.
  - `ruin_allowing_error` number · nullable  
    Ruin chance allowing for how little the record's sample tells.
  - `estimation_premium` number · nullable  
    The second less the first.
  - `lose_all_ever` number · nullable  
    Lundberg bound on ever losing the whole bankroll at the exact rate.
  - `lose_all_ever_allowing_error` number · nullable  
    The same, averaged over the win rate's posterior.
  - `drawdown_p95_units` number · nullable  
    95th percentile of the worst drop over the horizon, units.
  - `down_after_horizon` number · nullable  
    Chance of being down after the horizon.
  - `bankroll_for_ruin_005_units` number · nullable  
    Smallest bankroll whose ruin chance is at most 0.05.
  - `curve` array of object · nullable  
    Ruin chance by bankroll size; null at detail summary.
  - `status` string  
    ok, or too_few (under 30 decisions: closed form only).  
    One of: `ok`, `too_few` (open: new values may be added).
- `staking_plans` object  
  Staking plans replayed over the real bet order (F37, kmath.backtest.staking_replay). The Kelly criterion's fractions and the kelly plan are stake mode: on askkelly.ai only, for a signed-in, attested person; elsewhere null with withheld (D34).
  - `kelly` object  
    The Kelly criterion at the record's win rate and mean price, the Baker-McHale multiple for its sample size and the fraction bet.
    - `full_fraction` number · nullable  
      Full Kelly criterion (stake mode; null off askkelly.ai).
    - `shrink` number · nullable  
      The shrink for the sample size.
    - `honest_fraction` number · nullable  
      The fraction bet: shrink × full, capped; 0 unless the verdict is promising or holds up (stake mode; null off askkelly.ai).
    - `withheld` string  
      Why the stake-mode figures are null.  
      One of: `stake_first_party_only` (open: new values may be added).
  - `plans` array of object  
    Each plan asked for, in the order asked.
    - `plan` string  
      flat, to_win, percent or kelly.  
      One of: `flat`, `to_win`, `percent`, `kelly` (open: new values may be added).
- `risk_adjusted` object  
  Risk-adjusted stats per unit risked (F40, kmath.backtest.risk_adjusted), with 95% intervals from a day-block bootstrap; at detail summary only sharpe_per_bet and profit_factor.
  - `sharpe_per_bet` number · nullable  
    Mean return over its standard deviation, a bet.
  - `profit_factor` number · nullable  
    Units won over units lost (null with no losing bet).
- `caps` object · nullable  
  Exposure caps applied in time order (F39); the record and checks are on the capped ledger.
  - `skipped` integer  
    Bets the caps skipped.
  - `by_reason` object  
    Skipped bets by cap.
  - `uncapped` object  
    The record without the caps.
  - `random_priority_mean_roi` number · nullable  
    Mean ROI over random tie-breaks.
- `rule` object · required  
  The rule and the options it was tested with.
  - `rule_hash` string  
    The rule's identity: SHA-256 of its canonical formula (spacing, case and the order of AND and OR conditions don't change it) with the competition, market, side, bet moment, seasons, season type, stake and price. Detail and tests are not part of it.  
    pattern ^sha256:[0-9a-f]{64}$
  - `translation_id` string  
    The rules:translate result this formula came from (F43), when the request named one.  
    pattern ^tx_[0-9a-hjkmnp-tv-z]{20}$
  - `reads` array of object  
    Every name the rule reads, once.
    - `name` string  
      The attribute, with its relation (opponent.rest_days).
    - `known` string  
      Its moment: static, pregame, edition, close or final (a window's input is read before the game).
    - `windowed` boolean  
      A backward window reads it (earlier games only).
  - `formula_version` string  
    The formula language version the rule was read with (F45).
  - `catalogue_version` string · nullable  
    The stat catalogue version its names were bound against.
- `report` object  
  A shared report's own facts (get_rule_report only, F54).
  - `report_id` string  
    The report.
  - `report_url` string  
    Its page.  
    format uri
  - `visibility` string  
    unlisted or public.  
    One of: `unlisted`, `public` (open: new values may be added).
  - `author_rules_tried` integer  
    The author's rules tried on this market when shared.
  - `shared_at` string  
    When it was shared.  
    format date-time
  - `frozen` boolean  
    Always true.
  - `rerun` object  
    The run's request, to test it again on today's data.
- `report_url` string · nullable  
  A frozen report of this run anyone with the link can open (F54): only when the request asked (share) and the call has an account; else null. share_rule_run makes or changes one later.  
  format uri
- `charts` array of object  
  Only when the request asked (charts) at detail full: equity against the no-skill band, the drawdown and the rolling ROI as Kelly Chart Specs (F47).
- `transfer` object · nullable  
  Other markets and sports (F33): the same rule on its other market and on other leagues, numbers mapped to the same meaning, pooled with DerSimonian-Laird random effects. Evidence beside the verdict, never part of it; these runs don't count toward rules tried. Present only when the request asks for transfer.
  - `status` string  
    measured or na.  
    One of: `measured`, `na` (open: new values may be added).
  - `why` string · nullable  
    Why nothing ran, when nothing did.
  - `options` object  
    The leagues, markets and thresholds asked for.
  - `cells` array of object  
    Each market and league in a fixed order (the other market first, then sibling leagues), never sorted by a result; up to 12.
    - `competition` string  
      The league.
    - `market` string  
      The market.
    - `thresholds` string  
      literal (the rule's own numbers) or quantile (each number moved to the same percentile of its field in this league).  
      One of: `literal`, `quantile` (open: new values may be added).
    - `formula` string  
      The formula this cell ran (quantile cells carry the moved numbers).
    - `seasons` array of string  
      Seasons read, as this league labels them.
    - `mapped` array of object · nullable  
      Quantile cells only.
      - `number` string  
        The number as written.
      - `field` string  
        What it is compared with.
      - `percentile` number · nullable  
        Its percentile in the rule's own league (a fraction).
      - `value` number · nullable  
        The number at the same percentile here.
    - `decisions` integer  
      Wins plus losses.
    - `bets` integer  
      Graded bets.
    - `record` string  
      Wins-losses(-pushes).
    - `units` number · nullable  
      Units won or lost.
    - `roi` number · nullable  
      Units over units risked.
    - `roi_ci95` array of number · nullable  
      ROI's 95% score interval.
    - `se` number · nullable  
      ROI's standard error at 1 unit risked a bet.
    - `p_value` number · nullable  
      The cell's own one-sided p against no skill at its prices.
    - `p_holm` number · nullable  
      Holm's adjusted p across the cells.
    - `pooled` boolean  
      The cell is in the pool (another league, one a league, 10+ decisions).
  - `pooled` object · nullable  
    The pool of the other leagues' cells.
    - `roi` number · nullable  
      Random-effects ROI.
    - `roi_ci95` array of number · nullable  
      Its 95% interval.
    - `se` number · nullable  
      Its standard error.
    - `p_value` number · nullable  
      Two-sided p of the pooled ROI.
    - `i2` number · nullable  
      I²: the share of the spread across leagues beyond chance (a fraction).
    - `tau2` number · nullable  
      τ²: the between-league variance of true ROI.
    - `q` number · nullable  
      Cochran's Q.
    - `cells` integer  
      Cells pooled.
  - `same_direction` object · nullable  
    Pooled cells whose ROI has the rule's own sign.
    - `agree` integer  
      Cells the same way.
    - `cells` integer  
      Cells.
    - `p_value` number · nullable  
      Two-sided sign-test p.
    - `text` string  
      "4 of 5".
  - `not_testable` array of object  
    Leagues and markets left out, with why.
    - `competition` string  
      The league.
    - `market` string · nullable  
      The market.
    - `missing` array of string  
      Fields that league lacks.
    - `why` string  
      Why.
  - `note` string  
    What the panel is and isn't.
- `run_id` string · nullable  
  This run, kept on the account (`run_…`): the same request on the same data is the same run. GET /v1/rules/runs/{run_id} reads it back. Null without an account.  
  pattern ^run_[0-9a-hjkmnp-tv-z]{20}$
- `data_version` string  
  The data the run read: Kelly's lake snapshot (or the data's as-of time). A new snapshot is a new run of the same rule.
- `manifest` object · nullable  
  What this run read and ran, so the same request can be run again and checked against it (ADR-K885). No prices, lines or rows of source data.
  - `version` integer  
    The manifest's own layout version.
  - `code` object  
    The code that graded the run.
    - `engine` integer  
      The tester's revision; it rises with any fix that can move a result on the same data.
    - `release` string · nullable  
      The deployed commit.
    - `formula_version` string · nullable  
      The formula language's version.
    - `catalogue_version` string · nullable  
      The stat catalogue's version.
    - `attributes_sha256` string · nullable  
      A hash of the attribute registry: what each input means and when it is known.
    - `settlement_rules` string · nullable  
      The settlement rules' version.
  - `data` object  
    The data the run read.
    - `version` string  
      The same value as data_version.
    - `snapshots` array of string  
      The lake snapshots read, in order.
    - `one_snapshot` boolean  
      Whether every season was read on one snapshot.
    - `as_of` string · nullable  
      When the read was made (RFC 3339).  
      format date-time
    - `data_through` object  
      How far Kelly's history went, by league.
    - `latest_result` string · nullable  
      The newest game read that had a result.
    - `rows_built_at` string · nullable  
      When the prepared rows were built, where the run read them.  
      format date-time
    - `queries` object  
      Each reviewed lake query the tester reads, with a hash of its text.
  - `request` object  
    The request.
    - `request_hash` string  
      The request's hash.
    - `rule_hash` string  
      The rule's hash.
    - `seed` integer  
      The seed every simulation in the run used.
  - `sources` object  
    Where the run's inputs came from.
    - `prices` object  
      Bets priced, by the source of the line.
    - `inputs` array of object  
      Each input the rule read, with the moment it is known.
      - `name` string  
        The input.
      - `known` string · nullable  
        The moment it is known.
  - `seasons` array of object  
    Each season read.
    - `season` string  
      The season.
    - `rows` integer  
      Team-games in scope.
    - `priced_share` number · nullable  
      The share Kelly holds a price for at the bet moment.
  - `left_out` object  
    Matched games that were not bet, by reason.
  - `sha256` string  
    The hash of this block. Two runs with the same hash read the same data with the same code.
- `since_run` object · nullable  
  Only on a run read back: what has changed in Kelly's tester since the run was kept.
  - `status` string  
    current: nothing that can move its numbers changed. superseded: something did. no_manifest: the run was kept before manifests.  
    One of: `current`, `superseded`, `no_manifest` (open: new values may be added).
  - `engine_changed` boolean · nullable  
    Whether the tester's revision has risen since.
  - `changed` array of object  
    The parts that differ, each with its value then (from) and now (to).
    - `part` string  
      engine, release, formula_language, catalogue, attributes, settlement_rules or queries.
- `tested_at` string  
  When the run was kept (RFC 3339); only on a run read back.  
  format date-time
- `rule_version` object · nullable  
  The saved rule this test was kept under (save, or rule_id): its rule_id, name, version and versions_tried. Null when the test wasn't saved.
  - `rule_id` string · required  
    The saved rule (rl_…).  
    pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$
  - `name` string  
    Its name.
  - `version` integer · required  
    This rule's version under it: the same rule again keeps its version.  
    min 1
  - `new_version` boolean  
    This test made a new version.
  - `versions_tried` integer · required  
    Versions saved under it, this one included.  
    min 1
- `since_saved` object · nullable  
  The saved version's record since it was saved (backtester T6, F50), when the test names its rule_id and repeats that version: verdict v2's since_saved check reads it. Null for a new version (its clock starts now) or an unsaved test.
  - `saved_at` string · nullable  
    When the clock started: the version's save, or the registration (RFC 3339).  
    format date-time
  - `record` string · required  
    Wins-losses(-pushes) since then.
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `decisions` integer · required  
    Wins plus losses.
  - `bets` integer  
    Graded bets.
  - `units` number · required  
    Units won or lost.
  - `roi` number · nullable  
    Units over units risked, a fraction.
  - `clv_mean` number · nullable  
    Mean closing-line value of the bets (null at the close: none by definition).
  - `clv_bets` integer  
    Bets with a closing-line value.
  - `e_value` number · nullable  
    Anytime-valid e-value of the forward bets against no edge at the prices taken (safe to read every day).
  - `max_e_value` number · nullable  
    Its running maximum.
  - `e_threshold` number  
    The e-value that counts as evidence at alpha 0.05 (20).
  - `vs_backtest` object · nullable  
    Is live consistent with the backtest?
    - `win_rate_backtest` number  
      The backtest's win rate.
    - `win_rate_forward` number · nullable  
      The win rate since the save.
    - `p_value_difference` number · nullable  
      Two-sided p-value that the two win rates differ.
    - `method` string · nullable  
      fisher_exact (under 30 forward decisions) or two_proportion_z.
    - `e_value_worse` number  
      E-value that live wins less often than the backtest; 20 or more fails the check.
  - `pending` integer  
    Bets recorded at their bet moment, not yet final.
  - `no_line` integer  
    Matches Kelly held no line for at the bet moment (kept, never skipped).
  - `void` integer  
    Postponed games past the window.
  - `status` string · required  
    The since_saved check: na until min_decisions, then pass or fail.  
    One of: `na`, `pass`, `fail` (open: new values may be added).
  - `min_decisions` integer  
    Forward decisions before the check is judged (30).
  - `last_bet_at` string · nullable  
    The latest bet moment recorded.  
    format date-time
- `tests_on_account` object · nullable  
  Rules this account has tried on this competition and market, this one included (the rules-tried ledger: every distinct rule tested on the site, the API or Kelly MCP, kept for good). The not-luck check adjusts for the larger of this count and the request's own tests. Null when the call has no account.
  - `competition` string · required  
    The competition.
  - `market` string · required  
    The market.
  - `count` integer · required  
    Distinct rules tried.  
    min 1
  - `shown_counted` integer  
    Variants an earlier report showed (its condition-removed forms, nearby numbers and home or away splits) that joined the count because this rule is one of them (audit F6).
- `staking` string  
  How each bet was staked.
- `matched` integer  
  Bets taken.
- `ungraded` integer  
  Bets not yet played.
- `notice` string · required  
  This tests a rule on past games; it isn't a pick.
- `calibration` object · nullable  
  output: probability only. The formula's chances against the market's no-vig close of the same side (moneyline: the team wins; spread: it covers the bet's line), on the newest 30% of the scored team-games (whole days), and the bets it makes at the edge threshold.
  - `formula` string  
    The probability formula as sent.
  - `bet_formula` string  
    The rule it bets: the chance at the bet's own price worth more than the edge threshold (the rule tested, counted and kept).
  - `edge_threshold` number  
    Expected return a bet needs, p × decimal price − 1 (0.02 by default).
  - `basis` string  
    newest_30: scored on the holdout only.  
    One of: `newest_30` (open: new values may be added).
  - `games` integer  
    Games scored.
  - `rows` integer  
    Team-games scored (both teams of a game).
  - `in_sample_rows` integer  
    Team-games before the holdout, not scored.
  - `holdout_from` string · nullable  
    The holdout's first day.
  - `left_out` object  
    Team-games not scored.
    - `pushes` integer  
      Pushes and half results.
    - `outside_0_1` integer  
      Values below 0 or above 1.
    - `no_value` integer  
      Rows the formula gave no number for.
  - `clipped` integer  
    Values of 0 or 1 clipped to 1e-6 from the edge.
  - `brier` number · nullable  
    Brier score of the formula.
  - `brier_market` number · nullable  
    Brier score of the close.
  - `brier_skill` number · nullable  
    1 − formula / close (above 0: the formula scores better).
  - `log_loss` number · nullable  
    Log loss of the formula.
  - `log_loss_market` number · nullable  
    Log loss of the close.
  - `log_loss_skill` number · nullable  
    1 − formula / close.
  - `dm_p_value` number · nullable  
    Diebold–Mariano p on the per-game log-loss difference (two-sided).
  - `dm_statistic` number · nullable  
    The HLN-corrected statistic (positive: the formula's loss is higher).
  - `mcb` number · nullable  
    CORP miscalibration (Brier).
  - `dsc` number · nullable  
    CORP discrimination.
  - `unc` number · nullable  
    Uncertainty; brier = mcb − dsc + unc.
  - `mcb_p_value` number · nullable  
    The MCB test: the chance a calibrated formula looks this miscalibrated (999 resamples).
  - `reliability` array of object · nullable  
    The CORP reliability curve at up to 20 forecast values.
    - `p` number · nullable  
      The formula's probability.
    - `observed` number · nullable  
      How often it happened (PAV fit).
    - `lo` number · nullable  
      90% consistency band, low.
    - `hi` number · nullable  
      90% consistency band, high.
  - `ece` number · nullable  
    Expected calibration error over ten equal-width bins (bin-dependent; for familiarity).
  - `distinct_forecasts` integer  
    Distinct values the formula gave.
  - `slope` number · nullable  
    Calibration slope b in y ~ a + b·logit p (1 is ideal; under 1 overconfident).
  - `slope_se` number · nullable  
    Its game-clustered standard error.
  - `intercept` number · nullable  
    Calibration intercept a (0 is ideal).
  - `encompassing` object · nullable  
    y ~ a + b_q·logit q + b_p·logit p, game-clustered: does the formula know something the close doesn't?
    - `b_model` number · nullable  
      b_p.
    - `b_market` number · nullable  
      b_q.
    - `se_model` number · nullable  
      b_p's standard error.
    - `p_value` number · nullable  
      Two-sided p of b_p.
  - `edge_bins` array of object · nullable  
    Realized results against the formula's edge.
    - `edge` number · nullable  
      Mean of p − q in the bin.
    - `realized_minus_market` number · nullable  
      Mean of y − q in the bin.
    - `rows` integer  
      Team-games in the bin.
  - `status` string  
    The calibrated check: pass, fail or na (under 200 games, or one value).  
    One of: `pass`, `fail`, `na` (open: new values may be added).
  - `value` string  
    The check's line.
  - `statistic` number · nullable  
    The encompassing p.
  - `threshold` number · nullable  
    0.05.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`rule_not_testable`](/problems/rule_not_testable) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout) · [`idempotency_key_reused`](/problems/idempotency_key_reused)

### Example
```http
POST https://api.askkelly.ai/v1/rules:test
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "formula": "=home",
  "competition": "nba",
  "seasons": [
    "2025-26"
  ]
}
```

```json
{
  "object": "rule_test",
  "staking": "flat, 1 unit risked a bet",
  "matched": 1,
  "ungraded": 0,
  "overall": {
    "wins": 1,
    "losses": 0,
    "pushes": 0,
    "bets": 1,
    "decisions": 1,
    "record": "1-0",
    "units": 0.9099999999999999,
    "roi": 0.9099999999999999,
    "roi_interval": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "win_rate": 1,
    "break_even": 0.5235602094240838,
    "over_break_even": 0.47643979057591623,
    "significance": {
      "p_value": 0.5235602094240838,
      "no_skill_match_per_100": 52.35602094240838,
      "coin_match_per_100": 50,
      "z": 0.9539392014169455,
      "significant": false,
      "alpha": 0.05,
      "multiple_comparisons": null,
      "anytime_valid": {
        "e_value": 1.0580125,
        "p_value": 0.9451684171973394,
        "max_e": 1.0580125,
        "method": "kelly_betting_mixture",
        "kelly_fraction": 0.5,
        "crossed": false,
        "roi_cs95": [
          -0.999045,
          0.9090450000000001
        ]
      },
      "method": "exact_binomial",
      "t_stat": null,
      "p_value_exact": 0.5235602094240838,
      "p_value_clustered": 0.17005720935900537,
      "p_value_vs_vig": null,
      "null": "break_even",
      "sims": null,
      "seed": null,
      "p_adjusted": 0.5235602094240838,
      "adjust_method": "none",
      "tests": 1,
      "tests_effective": 1,
      "reality_check_p": null,
      "spa_p": null,
      "clears_t3": false,
      "haircut": null,
      "haircut_roi": null
    },
    "sample_needed": null,
    "few_decisions": true,
    "small_sample": true,
    "formulas": [
      "F3.2@1",
      "F12.1@1",
      "F12.3@1",
      "F12.4@1",
      "F36.2@1"
    ],
    "warnings": [
      "fixed_n_p_value",
      "small_sample"
    ],
    "roi_ci": {
      "method": "score",
      "level": 0.95,
      "score": [
        -0.6054908095394765,
        0.9099999999999999
      ],
      "bca": null,
      "block_bootstrap": null,
      "anytime_valid": [
        -0.999045,
        0.9090450000000001
      ],
      "iid_score": [
        -0.6054908095394765,
        0.9099999999999999
      ]
    },
    "roi_ci95": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "units_ci95": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "deflated": {
      "sharpe_per_bet": null,
      "skew": null,
      "kurtosis": null,
      "psr": null,
      "dsr": null,
      "sharpe_expected_max": null,
      "roi_bar": null,
      "trials_effective": 1,
      "sample_needed": null,
      "sample_needed_single": null,
      "sample_needed_power80": null,
      "sample_needed_plan": null
    }
  },
  "clv": {
    "bets_with_close": 0,
    "bets_without_close": 1,
    "reference": "consensus",
    "devig": "multiplicative",
    "lines_converted": 0,
    "coverage": 0,
    "closes_stale": 0,
    "points_coverage": 0,
    "points_test": null,
    "basis": "probability",
    "mean": null,
    "ci95": null,
    "p_value": null,
    "beat_close_share": null,
    "beat_rate": null,
    "beat_rate_ci95": null,
    "sign_test_p": null,
    "mean_prob": null,
    "mean_points": null,
    "points_bets": 0,
    "profit_slope": null,
    "profit_slope_se": null,
    "sample_needed": null,
    "sample_needed_roi": null,
    "significance": null,
    "note": "Bets at the close have no closing-line value by definition."
  },
  "path": {
    "max_drawdown_units": 0,
    "longest_losing_run": 0,
    "series": {
      "x": "bet_index",
      "index": [
        1
      ],
      "dates": [
        "2025-10-21"
      ],
      "units": [
        0.91
      ],
      "drawdown": [
        0
      ],
      "base_units": null,
      "band_p025": null,
      "band_p975": null,
      "rolling_roi_100": [
        null
      ],
      "rolling_p025": [
        null
      ],
      "rolling_p975": [
        null
      ],
      "markers": [
        {
          "type": "season",
          "at": 1,
          "label": "2025-26"
        }
      ]
    },
    "downsampled": false,
    "expected_max_drawdown_zero_edge": null
  },
  "seasons": [
    {
      "season": "2025-26",
      "wins": 1,
      "losses": 0,
      "pushes": 0,
      "bets": 1,
      "decisions": 1,
      "record": "1-0",
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "roi_interval": [
        0.9099999999999999,
        0.9099999999999999
      ],
      "win_rate": 1,
      "break_even": 0.5235602094240838,
      "over_break_even": 0.47643979057591623,
      "significance": {
        "p_value": 0.5235602094240838,
        "no_skill_match_per_100": 52.35602094240838,
        "coin_match_per_100": 50,
        "z": 0.9539392014169455,
        "significant": false,
        "alpha": 0.05,
        "multiple_comparisons": null,
        "anytime_valid": {
          "e_value": 1.0500500000000001,
          "p_value": 0.9523356030665205,
          "crossed": false
        }
      },
      "sample_needed": null,
      "few_decisions": true,
      "small_sample": true,
      "clv_mean": null
    }
  ],
  "holdout": null,
  "bets": [
    {
      "key": "gm_1hnx5nrmk4xjpz6fzyfz:tm_b4w5y9xy5f9sgg1cmkvy",
      "starts_at": "2025-10-21T23:30:00Z",
      "season": "2025-26",
      "label": "2025-10-21 tm_b4w5y9xy5f9sgg1cmkvy vs tm_205kvyzpxcr3et677thx",
      "price": {
        "decimal": 1.91
      },
      "line": -4.5,
      "result": "win",
      "close_prob": null,
      "units_to_date": 0.9099999999999999,
      "how_graded": "Home -4.5 at the close; final 110–100: win",
      "settlement": [
        "final_score"
      ],
      "units": 0.9099999999999999,
      "drawdown_to_date": 0,
      "side": "home",
      "market": "spread",
      "bet_moment": "close",
      "clv_prob": null,
      "sample": null,
      "why": [
        {
          "clause": "home",
          "value": true
        }
      ]
    }
  ],
  "dependence": {
    "cluster_by": [
      "slate",
      "team_season"
    ],
    "slate": "date",
    "clusters": 1,
    "design_effect": 1,
    "effective_bets": 1,
    "method": "none",
    "se": null,
    "se_iid": null
  },
  "honest": {
    "roi": -0.04514385341429974,
    "ci80": [
      -0.07077022186419332,
      -0.019517484964406154
    ],
    "prior_mean": -0.04545450206611379,
    "prior_sd": 0.02,
    "shrink": 0.999560632688928,
    "posterior_sd": 0.019995605844174143,
    "selection_adj": 0,
    "decay_factor": 0.74,
    "stabilizes_at_bets": 2275,
    "tries": 1,
    "basis_rules": 0,
    "raw_roi": 0.9099999999999999,
    "uses_clv": false,
    "prior_basis": "seed",
    "prior": {
      "source": "margin",
      "mean": -0.04545450206611379,
      "closes": 0,
      "capped": false,
      "words": "shrunk toward the market's usual margin of -4.5%"
    }
  },
  "luck": {
    "reading": "versus_the_market",
    "close_source": "consensus",
    "devig": "multiplicative",
    "bets_without_prob": 1,
    "left_out": {
      "push": 0,
      "half": 0
    },
    "lines_converted": 0,
    "bets": 0,
    "expected_units": null,
    "actual_units": null,
    "luck_units": null,
    "luck_se_units": null,
    "expected_wins": null,
    "actual_wins": null,
    "luck_percentile": null,
    "expected_roi": null,
    "actual_roi": null,
    "theta": null,
    "by_season": []
  },
  "base": {
    "formula": null,
    "source": "market",
    "status": "na",
    "why": "the rule has no who-or-when condition to filter, so its base is the whole market"
  },
  "stress": {
    "half_point_worse": {
      "bets": 1,
      "decisions": 1,
      "record": "1-0",
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "p_value": 0.5235602094240838
    },
    "flat_110": {
      "bets": 1,
      "decisions": 1,
      "record": "1-0",
      "units": 0.9090909090909092,
      "roi": 0.9090909090909092,
      "p_value": 0.5238095238095238
    },
    "other_side": {
      "bets": 1,
      "decisions": 1,
      "record": "0-1",
      "units": -1,
      "roi": -1,
      "p_value": 1
    },
    "break_even": {
      "price_multiplier": 0,
      "american_avg": null,
      "decimal_avg": null,
      "line_points": 3
    },
    "slippage_mc": null,
    "grid": [
      {
        "vig": -105,
        "line_shift": 0,
        "units": 0.9523809523809523,
        "roi": 0.9523809523809523
      },
      {
        "vig": -105,
        "line_shift": -0.5,
        "units": 0.9523809523809523,
        "roi": 0.9523809523809523
      },
      {
        "vig": -105,
        "line_shift": -1,
        "units": 0.9523809523809523,
        "roi": 0.9523809523809523
      },
      {
        "vig": -110,
        "line_shift": 0,
        "units": 0.9090909090909092,
        "roi": 0.9090909090909092
      },
      {
        "vig": -110,
        "line_shift": -0.5,
        "units": 0.9090909090909092,
        "roi": 0.9090909090909092
      },
      {
        "vig": -110,
        "line_shift": -1,
        "units": 0.9090909090909092,
        "roi": 0.9090909090909092
      },
      {
        "vig": -115,
        "line_shift": 0,
        "units": 0.8695652173913042,
        "roi": 0.8695652173913042
      },
      {
        "vig": -115,
        "line_shift": -0.5,
        "units": 0.8695652173913042,
        "roi": 0.8695652173913042
      },
      {
        "vig": -115,
        "line_shift": -1,
        "units": 0.8695652173913042,
        "roi": 0.8695652173913042
      },
      {
        "vig": -120,
        "line_shift": 0,
        "units": 0.8333333333333335,
        "roi": 0.8333333333333335
      },
      {
        "vig": -120,
        "line_shift": -0.5,
        "units": 0.8333333333333335,
        "roi": 0.8333333333333335
      },
      {
        "vig": -120,
        "line_shift": -1,
        "units": 0.8333333333333335,
        "roi": 0.8333333333333335
      }
    ]
  },
  "leak_test": {
    "status": "clean",
    "rows_checked": 6,
    "matched_checked": 3,
    "matches_flipped": 0,
    "parts": []
  },
  "warm_up": {
    "policy": "as_written",
    "games_needed": 0,
    "windows": [],
    "short_bets": 0,
    "by_policy": null,
    "warning": false
  },
  "settlement": {
    "profile": "kelly_standard",
    "rules_version": "2026-11-08",
    "applied": [
      {
        "rule": "final_score",
        "bets": 1
      }
    ],
    "rules": [
      {
        "id": "final_score",
        "text": "Every market grades on the final score as Kelly's score source records it, overtime and extra innings included.",
        "effective_from": "2026-11-06"
      },
      {
        "id": "spread_push",
        "text": "A spread bet whose margin lands exactly on the line pushes: the stake comes back.",
        "effective_from": "2026-11-06"
      },
      {
        "id": "postponed_void",
        "text": "A game with no final score 48 hours after its scheduled start is void: the bet is left out.",
        "effective_from": "2026-11-07"
      },
      {
        "id": "not_played_yet",
        "text": "A game still to be played is listed with no result and left out of every figure.",
        "effective_from": "2026-11-06"
      }
    ]
  },
  "moment": {
    "bet_moment": "close",
    "target": "the start",
    "max_stale_minutes": 60,
    "floor_minutes_before_oct_2022": 10,
    "rows_priced": 1,
    "rows_aged": 0,
    "median_snapshot_age_minutes": null,
    "max_snapshot_age_minutes": null,
    "stale_price": 0,
    "after_moment": 0,
    "age_unknown": 1,
    "line_sources": {
      "sheet_line": 1
    }
  },
  "coverage": {
    "flow": [
      {
        "step": "in_scope",
        "games": 3,
        "rows": 6
      },
      {
        "step": "rule_true",
        "rows": 3
      },
      {
        "step": "one_bet_a_game",
        "rows": 3,
        "out": {
          "both_sides": 0,
          "same_game_total": 0
        }
      },
      {
        "step": "priced",
        "rows": 1,
        "out": {
          "no_line": 2
        }
      },
      {
        "step": "graded",
        "rows": 1,
        "out": {
          "void": 0,
          "not_played_yet": 0
        }
      },
      {
        "step": "decisions",
        "rows": 1,
        "out": {
          "push": 0
        }
      }
    ],
    "by_season": [
      {
        "season": "2025-26",
        "games": 3,
        "rows": 6,
        "rule_true": 3,
        "bets": 1,
        "priced_share": 0.3333
      }
    ],
    "inputs_missing": [
      {
        "attribute": "home",
        "rows": 6,
        "rows_blank": 0,
        "share": 0,
        "seasons_blank": []
      }
    ],
    "left_out_differs": {
      "left_out": 2,
      "kept": 1,
      "flag": false,
      "max_smd": null,
      "covariate": null,
      "by_covariate": []
    }
  },
  "random_baseline": null,
  "decay": {
    "bets": 1,
    "window": 50,
    "rolling": [],
    "break": null,
    "cusum": null,
    "known_break": null,
    "trend_per_100_bets": null,
    "decay_ratio": null,
    "clv_break": null,
    "roi_newest_30": null,
    "status_reason": "fewer than (100) graded bets"
  },
  "ablation": null,
  "nearby": {
    "numbers": [],
    "variants": 0,
    "distinct_bet_sets": 0,
    "grid": null,
    "roi_median": null,
    "roi_p05": null,
    "roi_p95": null,
    "plateau_share": null,
    "spike_ratio": null,
    "reading": null,
    "na": "the rule compares no numbers"
  },
  "monte_carlo": null,
  "noise": {
    "seed": 3397954809,
    "inputs": null,
    "inputs_na": "the rule compares no numbers",
    "lines": {
      "runs": 200,
      "profitable_runs": 200,
      "profitable_share": 1,
      "roi_median": 0.9099999999999999,
      "roi_p05": 0.9099999999999999,
      "line_prob": 0.5
    },
    "delay": {
      "bet_moment": "day_before",
      "na": "day-before lines for this league are still loading"
    },
    "low_power": true
  },
  "concentration": {
    "bets": 1,
    "units": 0.9099999999999999,
    "by": [
      {
        "group": "season",
        "groups": 1,
        "best": null,
        "without_best": null,
        "without_best_two": null,
        "effective_groups": 1,
        "p_more_concentrated": null,
        "jackknife_roi_se": null
      },
      {
        "group": "team",
        "groups": 1,
        "best": null,
        "without_best": null,
        "without_best_two": null,
        "effective_groups": 1,
        "p_more_concentrated": null,
        "jackknife_roi_se": null
      },
      {
        "group": "opponent",
        "groups": 1,
        "best": null,
        "without_best": null,
        "without_best_two": null,
        "effective_groups": 1,
        "p_more_concentrated": null,
        "jackknife_roi_se": null
      },
      {
        "group": "month",
        "groups": 1,
        "best": null,
        "without_best": null,
        "without_best_two": null,
        "effective_groups": 1,
        "p_more_concentrated": null,
        "jackknife_roi_se": null
      },
      {
        "group": "weekday",
        "groups": 1,
        "best": null,
        "without_best": null,
        "without_best_two": null,
        "effective_groups": 1,
        "p_more_concentrated": null,
        "jackknife_roi_se": null
      }
    ],
    "trim_top_0_05": null
  },
  "split_dimensions": [],
  "robustness": {
    "fast_path": true,
    "seed": 769905824,
    "evaluations": 1,
    "off": [],
    "checks": [
      {
        "key": "half_point_worse",
        "label": "Holds ½ point worse",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "nearby_holds",
        "label": "Holds with nearby numbers",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "not_concentrated",
        "label": "Not one team or season",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "still_working",
        "label": "Still working",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      }
    ]
  },
  "verdict": {
    "version": 2,
    "headline": "Too few bets to judge",
    "level": "too_few",
    "passed": 0,
    "applicable": 2,
    "gate": {
      "key": "no_look_ahead",
      "status": "pass",
      "value": "every value the rule reads is known at the bet moment",
      "leak_test": "clean"
    },
    "checks": [
      {
        "key": "enough_bets",
        "group": "real",
        "label": "Enough bets",
        "status": "fail",
        "zone": "red",
        "value": "(1) decisions are too few to size the sample",
        "statistic": 1,
        "threshold": null
      },
      {
        "key": "not_luck",
        "group": "real",
        "label": "Not just luck",
        "status": "fail",
        "zone": "red",
        "value": "p 0.524",
        "statistic": 0.5235602094240838,
        "threshold": 0.05
      },
      {
        "key": "beats_base",
        "group": "real",
        "label": "Beats its own base",
        "status": "na",
        "zone": "na",
        "value": "the rule has no who-or-when condition to filter, so its base is the whole market",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "half_point_worse",
        "group": "pressure",
        "label": "Holds ½ point worse",
        "status": "na",
        "zone": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "nearby_holds",
        "group": "pressure",
        "label": "Nearby thresholds hold",
        "status": "na",
        "zone": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "not_concentrated",
        "group": "pressure",
        "label": "Not one lucky stretch",
        "status": "na",
        "zone": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "beats_close",
        "group": "still_working",
        "label": "Beats the close",
        "status": "na",
        "zone": "na",
        "value": "bets at the close can't beat it",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "still_working",
        "group": "still_working",
        "label": "Still working",
        "status": "na",
        "zone": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "since_saved",
        "group": "still_working",
        "label": "Since saved",
        "status": "na",
        "zone": "na",
        "value": "(0) of (30) bets since it was saved",
        "statistic": null,
        "threshold": null
      }
    ],
    "held_back_by": []
  },
  "risk": {
    "staking": "flat",
    "stake_fraction": null,
    "bankroll_units": 100,
    "ruin_share": 0.5,
    "horizon_bets": 500,
    "paths": 5000,
    "seed": 6899137762779026,
    "lose_all_ever": 0,
    "lose_all_ever_allowing_error": 0.277131008418,
    "ruin_ever_if_rate_exact": 0,
    "ruin_if_rate_exact": null,
    "ruin_allowing_error": null,
    "estimation_premium": null,
    "drawdown_p95_units": null,
    "drawdown_p95": null,
    "down_after_horizon": null,
    "bankroll_for_ruin_005_units": null,
    "curve": [],
    "status": "too_few",
    "method": "lundberg+posterior_monte_carlo",
    "warnings": [
      "too_few_decisions"
    ],
    "percent": {
      "stake_fraction": 0.02,
      "ruin_if_rate_exact": null,
      "ruin_allowing_error": null,
      "drawdown_p95": null,
      "status": "too_few"
    }
  },
  "staking_plans": {
    "bankroll_units": 100,
    "percent": 0.02,
    "kelly_cap": 0.05,
    "kelly": {
      "win_rate": 1,
      "push_rate": 0,
      "full_fraction": null,
      "shrink": 1,
      "multiplier": null,
      "honest_fraction": null,
      "capped": null,
      "simultaneous": false,
      "basis": "record",
      "multiplier_rule": "honest",
      "zero_because": "too_few",
      "withheld": "stake_first_party_only"
    },
    "plans": [
      {
        "plan": "flat",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 1,
        "end_bankroll_units": 100.91,
        "units": 0.9099999999999966,
        "max_drawdown": 0,
        "growth_per_bet": 0.009058844488345926,
        "roi": 0.9099999999999966
      },
      {
        "plan": "to_win",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 1,
        "end_bankroll_units": 101,
        "units": 1,
        "max_drawdown": 0,
        "growth_per_bet": 0.009950330853168092,
        "roi": 0.9099999999999999
      },
      {
        "plan": "percent",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 1,
        "end_bankroll_units": 101.82,
        "units": 1.8199999999999932,
        "max_drawdown": 0,
        "growth_per_bet": 0.018036362486098575,
        "roi": 0.9099999999999966,
        "stake_fraction": 0.02
      },
      {
        "plan": "kelly",
        "status": "withheld",
        "withheld": "stake_first_party_only"
      }
    ],
    "warnings": [
      "small_sample"
    ]
  },
  "risk_adjusted": {
    "bets": 1,
    "sharpe_per_bet": null,
    "sharpe_daily": null,
    "sharpe_per_season": null,
    "sortino_per_bet": null,
    "profit_factor": null,
    "expected_units_per_bet": 0.9099999999999999,
    "avg_win_units": 0.9099999999999999,
    "avg_loss_units": null,
    "max_drawdown_units": 0,
    "return_on_drawdown": null,
    "recovery_factor": null,
    "ulcer_index": 0,
    "martin_ratio": null,
    "sqn": null,
    "probabilistic_sharpe": null,
    "longest_underwater_bets": 0,
    "longest_underwater_days": 0,
    "current_drawdown_units": 0,
    "sharpe_per_bet_ci95": null,
    "sortino_per_bet_ci95": null,
    "profit_factor_ci95": null,
    "warnings": [
      "no_losing_bets",
      "no_spread_in_returns",
      "small_sample"
    ]
  },
  "caps": null,
  "capacity": {
    "available": false,
    "market": "spreads",
    "before_start": "0_1h",
    "books": [],
    "max_stake_per_bet": null,
    "per_season_at_limit": null,
    "bets_per_season": null,
    "limits_held": 0,
    "reason": "Kelly holds no measured spreads limits for nba at this moment yet."
  },
  "splits": [
    {
      "label": "Home",
      "bets": 1,
      "decisions": 1,
      "record": "1-0",
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "p_value": 0.5235602094240838,
      "p_adjusted": 1,
      "shown_rows": 2
    },
    {
      "label": "Favorite",
      "bets": 1,
      "decisions": 1,
      "record": "1-0",
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "p_value": 0.5235602094240838,
      "p_adjusted": 1,
      "shown_rows": 2
    }
  ],
  "without": [],
  "rule": {
    "formula": "=home",
    "competition": "nba",
    "market": "spread",
    "side": "rule",
    "bet_moment": "close",
    "seasons": [
      "2025-26"
    ],
    "season_type": "regular",
    "stake": "risk",
    "price": "consensus",
    "base_formula": null,
    "reads": [
      {
        "name": "home",
        "known": "pregame",
        "windowed": false
      }
    ],
    "rule_hash": "sha256:c9a3bcfd2d08b46b86935391523bd2671a885a30b3b1f15bf69e12c5e399441b",
    "formula_version": "1.0.0",
    "catalogue_version": "1:0"
  },
  "left_out": {
    "no_line": 2,
    "both_sides": 0,
    "stale_price": 0
  },
  "matched_without_line": 2,
  "matched_both_sides": 0,
  "assumptions": [
    "Each bet is taken at Kelly's consensus close price; games Kelly holds no close line for are left out (2).",
    "Games where the rule matched both teams are left out (0).",
    "One flat unit risked a bet."
  ],
  "as_of": "2026-11-06T00:00:00Z",
  "notice": "This tests your rule on past games. It isn't a pick and doesn't rank selections.",
  "data_through": {},
  "latest_result": "2025-10-25T23:00:00Z",
  "rows_built_at": "2026-11-06T00:00:00Z",
  "stale": false,
  "since_saved": null,
  "tests_on_account": {
    "competition": "nba",
    "market": "spread",
    "count": 1,
    "shown_counted": 0
  },
  "data_version": "snap_52",
  "manifest": {
    "version": 1,
    "code": {
      "engine": 8,
      "release": null,
      "formula_version": "1.0.0",
      "catalogue_version": "1:0",
      "attributes_sha256": "0000000000000000",
      "settlement_rules": "2026-11-08"
    },
    "data": {
      "version": "snap_52",
      "snapshots": [
        "snap_52"
      ],
      "one_snapshot": true,
      "as_of": "2026-11-06T00:00:00Z",
      "data_through": {},
      "latest_result": "2025-10-25T23:00:00Z",
      "rows_built_at": "2026-11-06T00:00:00Z",
      "queries": {
        "rule_test_games": "0000000000000000"
      }
    },
    "request": {
      "request_hash": "sha256:13e69ec9c84eb683918ee67e91ae21ac69cc813cfbc4758f625524596be5d3da",
      "rule_hash": "sha256:c9a3bcfd2d08b46b86935391523bd2671a885a30b3b1f15bf69e12c5e399441b",
      "seed": 18147943352127158000
    },
    "sources": {
      "prices": {
        "sheet_line": 1
      },
      "inputs": [
        {
          "name": "home",
          "known": "pregame"
        }
      ]
    },
    "seasons": [
      {
        "season": "2025-26",
        "rows": 6,
        "priced_share": 0.3333
      }
    ],
    "left_out": {
      "both_sides": 0,
      "no_line": 2,
      "stale_price": 0
    },
    "sha256": "sha256:d78d99c7954d4b2367b7baa69328756b5aa4464bb52ddcb24cdf05a0484557ad"
  },
  "run_id": "run_mkytv75qe5a297z7y3af",
  "rule_version": null,
  "report_url": null,
  "summary": "Too few bets to judge: honest forward ROI -4.5%, 1-0 against the spread, 2025-26, +0.9 units, +91.0% ROI past (0 of 2 checks passed).",
  "has_more": false,
  "next_cursor": null,
  "source": "kelly",
  "attribution": null,
  "request_id": "req_bc8483563e5ff5a2ff264826",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

```http
POST https://api.askkelly.ai/v1/rules:test
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "formula": "=AND(home, points_for > 100)",
  "competition": "nba",
  "seasons": [
    "2025-26"
  ]
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/rule_not_testable",
  "title": "Rule can't be tested",
  "status": 422,
  "code": "rule_not_testable",
  "detail": "points_for is this game's own result, known only after it ends. For past games use a window, such as ROLLING_AVG(points_for, 4) or LAG(points_for).",
  "param": "formula",
  "doc_url": "https://docs.askkelly.ai/problems/rule_not_testable",
  "request_id": "req_00111c5c6d3369550070d21a",
  "retryable": false,
  "display_message": "That rule can't be tested on past games as written.",
  "problems": [
    {
      "code": "look_ahead",
      "path": "points_for",
      "message": "points_for is this game's own result, known only after it ends. For past games use a window, such as ROLLING_AVG(points_for, 4) or LAG(points_for).",
      "fixes": [
        {
          "label": "Use the game before: LAG(points_for)",
          "formula": "=AND(home, LAG(points_for) > 100)"
        },
        {
          "label": "Use the last 4 games: ROLLING_AVG(points_for, 4)",
          "formula": "=AND(home, ROLLING_AVG(points_for, 4) > 100)"
        }
      ]
    }
  ]
}
```

```http
POST https://api.askkelly.ai/v1/rules:test
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "formula": "=AND(home, rest_days >= 1)",
  "competition": "nba",
  "seasons": [
    "2025-26"
  ],
  "rule_id": "rl_5bbmw66t2r1jvg6cpxt2",
  "detail": "summary"
}
```

```json
{
  "object": "rule_test",
  "staking": "flat, 1 unit risked a bet",
  "matched": 0,
  "ungraded": 0,
  "overall": {
    "wins": 0,
    "losses": 0,
    "pushes": 0,
    "bets": 0,
    "decisions": 0,
    "record": "0-0",
    "units": 0,
    "roi": null,
    "win_rate": null,
    "break_even": null,
    "significance": null,
    "few_decisions": true,
    "small_sample": true,
    "deflated": null
  },
  "clv": {
    "bets_with_close": 0,
    "bets_without_close": 0,
    "reference": "consensus",
    "devig": "multiplicative",
    "lines_converted": 0,
    "coverage": null,
    "closes_stale": 0,
    "points_coverage": null,
    "points_test": null,
    "basis": "probability",
    "mean": null,
    "ci95": null,
    "p_value": null,
    "beat_close_share": null,
    "beat_rate": null,
    "beat_rate_ci95": null,
    "sign_test_p": null,
    "mean_prob": null,
    "mean_points": null,
    "points_bets": 0,
    "profit_slope": null,
    "profit_slope_se": null,
    "sample_needed": null,
    "sample_needed_roi": null,
    "significance": null,
    "note": "Bets at the close have no closing-line value by definition."
  },
  "path": {
    "max_drawdown_units": 0,
    "longest_losing_run": 0
  },
  "seasons": [],
  "holdout": null,
  "dependence": null,
  "honest": null,
  "luck": {
    "reading": "versus_the_market",
    "close_source": "consensus",
    "devig": "multiplicative",
    "bets_without_prob": 0,
    "left_out": {
      "push": 0,
      "half": 0
    },
    "lines_converted": 0,
    "bets": 0,
    "expected_units": null,
    "actual_units": null,
    "luck_units": null,
    "luck_se_units": null,
    "expected_wins": null,
    "actual_wins": null,
    "luck_percentile": null,
    "expected_roi": null,
    "actual_roi": null,
    "theta": null,
    "by_season": []
  },
  "base": {
    "formula": "=home",
    "source": "auto",
    "decisions": 1,
    "status": "na",
    "why": "the base is under twice the rule's bets"
  },
  "stress": {
    "half_point_worse": {
      "bets": 0,
      "decisions": 0,
      "record": "0-0",
      "units": 0,
      "roi": null,
      "p_value": null
    },
    "flat_110": {
      "bets": 0,
      "decisions": 0,
      "record": "0-0",
      "units": 0,
      "roi": null,
      "p_value": null
    },
    "other_side": {
      "bets": 0,
      "decisions": 0,
      "record": "0-0",
      "units": 0,
      "roi": null,
      "p_value": null
    },
    "break_even": null,
    "slippage_mc": null
  },
  "leak_test": {
    "status": "clean",
    "rows_checked": 6,
    "matched_checked": 2,
    "matches_flipped": 0,
    "parts": []
  },
  "warm_up": {
    "policy": "as_written",
    "games_needed": 0,
    "windows": [],
    "short_bets": 0,
    "by_policy": null,
    "warning": false
  },
  "settlement": {
    "profile": "kelly_standard",
    "rules_version": "2026-11-08",
    "applied": [],
    "rules": [
      {
        "id": "final_score",
        "text": "Every market grades on the final score as Kelly's score source records it, overtime and extra innings included.",
        "effective_from": "2026-11-06"
      },
      {
        "id": "spread_push",
        "text": "A spread bet whose margin lands exactly on the line pushes: the stake comes back.",
        "effective_from": "2026-11-06"
      },
      {
        "id": "postponed_void",
        "text": "A game with no final score 48 hours after its scheduled start is void: the bet is left out.",
        "effective_from": "2026-11-07"
      },
      {
        "id": "not_played_yet",
        "text": "A game still to be played is listed with no result and left out of every figure.",
        "effective_from": "2026-11-06"
      }
    ]
  },
  "moment": {
    "bet_moment": "close",
    "target": "the start",
    "max_stale_minutes": 60,
    "floor_minutes_before_oct_2022": 10,
    "rows_priced": 0,
    "rows_aged": 0,
    "median_snapshot_age_minutes": null,
    "max_snapshot_age_minutes": null,
    "stale_price": 0,
    "after_moment": 0,
    "age_unknown": 0,
    "line_sources": {}
  },
  "coverage": {
    "flow": [
      {
        "step": "in_scope",
        "games": 3,
        "rows": 6
      },
      {
        "step": "rule_true",
        "rows": 2
      },
      {
        "step": "one_bet_a_game",
        "rows": 2,
        "out": {
          "both_sides": 0,
          "same_game_total": 0
        }
      },
      {
        "step": "priced",
        "rows": 0,
        "out": {
          "no_line": 2
        }
      },
      {
        "step": "graded",
        "rows": 0,
        "out": {
          "void": 0,
          "not_played_yet": 0
        }
      },
      {
        "step": "decisions",
        "rows": 0,
        "out": {
          "push": 0
        }
      }
    ],
    "by_season": [
      {
        "season": "2025-26",
        "games": 3,
        "rows": 6,
        "rule_true": 2,
        "bets": 0,
        "priced_share": 0.3333
      }
    ],
    "inputs_missing": [
      {
        "attribute": "home",
        "rows": 6,
        "rows_blank": 0,
        "share": 0,
        "seasons_blank": []
      },
      {
        "attribute": "rest_days",
        "rows": 6,
        "rows_blank": 2,
        "share": 0.3333,
        "seasons_blank": []
      }
    ],
    "left_out_differs": {
      "left_out": 2,
      "kept": 0,
      "flag": false,
      "max_smd": null,
      "covariate": null,
      "by_covariate": []
    }
  },
  "random_baseline": null,
  "decay": {
    "bets": 0,
    "window": null,
    "rolling": [],
    "break": null,
    "cusum": null,
    "known_break": null,
    "trend_per_100_bets": null,
    "decay_ratio": null,
    "clv_break": null,
    "roi_newest_30": null,
    "status_reason": "no graded bets"
  },
  "ablation": {
    "base": {
      "decisions": 2,
      "roi": -0.04500000000000004
    },
    "value": "excess_units",
    "total": 0,
    "rule": {
      "decisions": 0,
      "units": 0
    },
    "clauses": [
      {
        "condition": "home",
        "shapley_units": 0.4775,
        "label": "dead"
      },
      {
        "condition": "rest_days >= 1",
        "shapley_units": -0.4775,
        "label": "dead"
      }
    ],
    "pairs": [],
    "method": "exact",
    "evaluations": 3
  },
  "nearby": {
    "numbers": [],
    "variants": 0,
    "distinct_bet_sets": 0,
    "grid": null,
    "roi_median": null,
    "roi_p05": null,
    "roi_p95": null,
    "plateau_share": null,
    "spike_ratio": null,
    "reading": null,
    "na": "the rule compares no numbers"
  },
  "monte_carlo": null,
  "noise": {
    "seed": 1547856035,
    "inputs": {
      "runs": 200,
      "profitable_runs": 0,
      "profitable_share": 0,
      "roi_median": null,
      "roi_p05": null,
      "input_scale": 0.1,
      "overlap_median": 1,
      "numbers": 1
    },
    "inputs_na": null,
    "lines": null,
    "delay": {
      "bet_moment": "day_before",
      "na": "day-before lines for this league are still loading"
    },
    "low_power": true
  },
  "concentration": {
    "bets": 0,
    "units": 0,
    "by": [],
    "trim_top_0_05": null
  },
  "split_dimensions": [],
  "robustness": {
    "fast_path": true,
    "seed": 789056186,
    "evaluations": 1,
    "off": [],
    "checks": [
      {
        "key": "half_point_worse",
        "label": "Holds ½ point worse",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "nearby_holds",
        "label": "Holds with nearby numbers",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "not_concentrated",
        "label": "Not one team or season",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "still_working",
        "label": "Still working",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      }
    ]
  },
  "verdict": {
    "version": 2,
    "headline": "No bets",
    "level": "too_few",
    "passed": 0,
    "applicable": 0,
    "gate": {
      "key": "no_look_ahead",
      "status": "pass",
      "value": "every value the rule reads is known at the bet moment",
      "leak_test": "clean"
    },
    "checks": []
  },
  "risk": {
    "staking": "flat",
    "stake_fraction": null,
    "bankroll_units": 100,
    "ruin_share": 0.5,
    "horizon_bets": 500,
    "paths": 5000,
    "seed": 7881387689213470,
    "lose_all_ever": null,
    "lose_all_ever_allowing_error": null,
    "ruin_ever_if_rate_exact": null,
    "ruin_if_rate_exact": null,
    "ruin_allowing_error": null,
    "estimation_premium": null,
    "drawdown_p95_units": null,
    "drawdown_p95": null,
    "down_after_horizon": null,
    "bankroll_for_ruin_005_units": null,
    "curve": null,
    "status": "too_few",
    "method": "lundberg+posterior_monte_carlo",
    "warnings": [
      "too_few_decisions"
    ],
    "percent": {
      "stake_fraction": 0.02,
      "ruin_if_rate_exact": null,
      "ruin_allowing_error": null,
      "drawdown_p95": null,
      "status": "too_few"
    }
  },
  "staking_plans": {
    "bankroll_units": 100,
    "percent": 0.02,
    "kelly_cap": 0.05,
    "kelly": {
      "win_rate": null,
      "push_rate": 0,
      "full_fraction": null,
      "shrink": null,
      "multiplier": null,
      "honest_fraction": null,
      "capped": null,
      "simultaneous": false,
      "basis": "record",
      "multiplier_rule": "honest",
      "withheld": "stake_first_party_only"
    },
    "plans": [
      {
        "plan": "flat",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 0,
        "end_bankroll_units": 100,
        "units": 0,
        "max_drawdown": 0,
        "growth_per_bet": null,
        "roi": null
      },
      {
        "plan": "to_win",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 0,
        "end_bankroll_units": 100,
        "units": 0,
        "max_drawdown": 0,
        "growth_per_bet": null,
        "roi": null
      },
      {
        "plan": "percent",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 0,
        "end_bankroll_units": 100,
        "units": 0,
        "max_drawdown": 0,
        "growth_per_bet": null,
        "roi": null
      },
      {
        "plan": "kelly",
        "status": "withheld",
        "withheld": "stake_first_party_only"
      }
    ],
    "warnings": [
      "small_sample"
    ]
  },
  "risk_adjusted": {
    "sharpe_per_bet": null,
    "profit_factor": null,
    "warnings": [
      "no_bets"
    ]
  },
  "caps": null,
  "capacity": {
    "available": false,
    "market": "spreads",
    "before_start": "0_1h",
    "books": [],
    "max_stake_per_bet": null,
    "per_season_at_limit": null,
    "bets_per_season": null,
    "limits_held": 0,
    "reason": "Kelly holds no measured spreads limits for nba at this moment yet."
  },
  "splits": null,
  "without": null,
  "rule": {
    "formula": "=AND(home, rest_days >= 1)",
    "competition": "nba",
    "market": "spread",
    "side": "rule",
    "bet_moment": "close",
    "seasons": [
      "2025-26"
    ],
    "season_type": "regular",
    "stake": "risk",
    "price": "consensus",
    "base_formula": null,
    "reads": [
      {
        "name": "home",
        "known": "pregame",
        "windowed": false
      },
      {
        "name": "rest_days",
        "known": "pregame",
        "windowed": false
      }
    ],
    "rule_hash": "sha256:af2069d0e4d5307d8c4ea7ac707cc0d3e7e13f5c5ea4f95806a58327400b8676",
    "formula_version": "1.0.0",
    "catalogue_version": "1:0"
  },
  "left_out": {
    "no_line": 2,
    "both_sides": 0,
    "stale_price": 0
  },
  "matched_without_line": 2,
  "matched_both_sides": 0,
  "assumptions": [
    "Each bet is taken at Kelly's consensus close price; games Kelly holds no close line for are left out (2).",
    "Games where the rule matched both teams are left out (0).",
    "One flat unit risked a bet."
  ],
  "as_of": "2026-11-06T00:00:00Z",
  "notice": "This tests your rule on past games. It isn't a pick and doesn't rank selections.",
  "data_through": {},
  "latest_result": "2025-10-25T23:00:00Z",
  "rows_built_at": "2026-11-06T00:00:00Z",
  "stale": false,
  "since_saved": null,
  "tests_on_account": {
    "competition": "nba",
    "market": "spread",
    "count": 2,
    "shown_counted": 0
  },
  "data_version": "snap_52",
  "manifest": {
    "version": 1,
    "code": {
      "engine": 8,
      "release": null,
      "formula_version": "1.0.0",
      "catalogue_version": "1:0",
      "attributes_sha256": "0000000000000000",
      "settlement_rules": "2026-11-08"
    },
    "data": {
      "version": "snap_52",
      "snapshots": [
        "snap_52"
      ],
      "one_snapshot": true,
      "as_of": "2026-11-06T00:00:00Z",
      "data_through": {},
      "latest_result": "2025-10-25T23:00:00Z",
      "rows_built_at": "2026-11-06T00:00:00Z",
      "queries": {
        "rule_test_games": "0000000000000000"
      }
    },
    "request": {
      "request_hash": "sha256:31b058b095b203fde86de3ba2f6cd5169d6ca0e8e27b7e910fd88cee4045e3d9",
      "rule_hash": "sha256:af2069d0e4d5307d8c4ea7ac707cc0d3e7e13f5c5ea4f95806a58327400b8676",
      "seed": 11684609526682410000
    },
    "sources": {
      "prices": {},
      "inputs": [
        {
          "name": "home",
          "known": "pregame"
        },
        {
          "name": "rest_days",
          "known": "pregame"
        }
      ]
    },
    "seasons": [
      {
        "season": "2025-26",
        "rows": 6,
        "priced_share": 0.3333
      }
    ],
    "left_out": {
      "both_sides": 0,
      "no_line": 2,
      "stale_price": 0
    },
    "sha256": "sha256:bb85d223f5ef4254dbaebc41ec6fecc5b89a3785ff34c18ded93c58b39409306"
  },
  "run_id": "run_ewabjhkycqv5zk6mvbkn",
  "rule_version": {
    "rule_id": "rl_5bbmw66t2r1jvg6cpxt2",
    "name": "Home teams",
    "version": 2,
    "new_version": true,
    "versions_tried": 2
  },
  "report_url": null,
  "summary": "The rule matched no game Kelly holds a line for, 2025-26.",
  "has_more": false,
  "next_cursor": null,
  "source": "kelly",
  "attribution": null,
  "request_id": "req_1cb31f79b11a161aa60974c0",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

```http
POST https://api.askkelly.ai/v1/rules:test
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "formula": "=IF(home, 0.6, 0.4)",
  "competition": "nba",
  "market": "moneyline",
  "seasons": [
    "2025-26"
  ],
  "output": "probability",
  "edge_threshold": 0.02
}
```

```json
{
  "object": "rule_test",
  "staking": "flat, 1 unit risked a bet",
  "matched": 0,
  "ungraded": 0,
  "overall": {
    "wins": 0,
    "losses": 0,
    "pushes": 0,
    "bets": 0,
    "decisions": 0,
    "record": "0-0",
    "units": 0,
    "roi": null,
    "win_rate": null,
    "break_even": null,
    "significance": null,
    "few_decisions": true,
    "small_sample": true,
    "deflated": null
  },
  "clv": {
    "bets_with_close": 0,
    "bets_without_close": 0,
    "reference": "consensus",
    "devig": "multiplicative",
    "lines_converted": 0,
    "coverage": null,
    "closes_stale": 0,
    "points_coverage": null,
    "points_test": null,
    "basis": "probability",
    "mean": null,
    "ci95": null,
    "p_value": null,
    "beat_close_share": null,
    "beat_rate": null,
    "beat_rate_ci95": null,
    "sign_test_p": null,
    "mean_prob": null,
    "mean_points": null,
    "points_bets": 0,
    "profit_slope": null,
    "profit_slope_se": null,
    "sample_needed": null,
    "sample_needed_roi": null,
    "significance": null,
    "note": "Bets at the close have no closing-line value by definition."
  },
  "path": {
    "max_drawdown_units": 0,
    "longest_losing_run": 0,
    "series": null,
    "downsampled": false,
    "expected_max_drawdown_zero_edge": null
  },
  "seasons": [],
  "holdout": null,
  "bets": [],
  "dependence": null,
  "honest": null,
  "luck": {
    "reading": "versus_the_market",
    "close_source": "consensus",
    "devig": "multiplicative",
    "bets_without_prob": 0,
    "left_out": {
      "push": 0,
      "half": 0
    },
    "lines_converted": 0,
    "bets": 0,
    "expected_units": null,
    "actual_units": null,
    "luck_units": null,
    "luck_se_units": null,
    "expected_wins": null,
    "actual_wins": null,
    "luck_percentile": null,
    "expected_roi": null,
    "actual_roi": null,
    "theta": null,
    "by_season": []
  },
  "base": {
    "formula": null,
    "source": "market",
    "status": "na",
    "why": "the rule has no who-or-when condition to filter, so its base is the whole market"
  },
  "stress": {
    "half_point_worse": null,
    "flat_110": null,
    "other_side": {
      "bets": 0,
      "decisions": 0,
      "record": "0-0",
      "units": 0,
      "roi": null,
      "p_value": null
    },
    "break_even": null,
    "slippage_mc": null,
    "grid": [
      {
        "price_multiplier": 1,
        "units": 0,
        "roi": null
      },
      {
        "price_multiplier": 0.98,
        "units": 0,
        "roi": null
      },
      {
        "price_multiplier": 0.96,
        "units": 0,
        "roi": null
      },
      {
        "price_multiplier": 0.94,
        "units": 0,
        "roi": null
      }
    ]
  },
  "leak_test": {
    "status": "clean",
    "rows_checked": 6,
    "matched_checked": 0,
    "matches_flipped": 0,
    "parts": []
  },
  "warm_up": {
    "policy": "as_written",
    "games_needed": 0,
    "windows": [],
    "short_bets": 0,
    "by_policy": null,
    "warning": false
  },
  "settlement": {
    "profile": "kelly_standard",
    "rules_version": "2026-11-08",
    "applied": [],
    "rules": [
      {
        "id": "final_score",
        "text": "Every market grades on the final score as Kelly's score source records it, overtime and extra innings included.",
        "effective_from": "2026-11-06"
      },
      {
        "id": "moneyline_tie_push",
        "text": "A two-way moneyline on a game that ends tied (an NFL tie) pushes.",
        "effective_from": "2026-11-06"
      },
      {
        "id": "postponed_void",
        "text": "A game with no final score 48 hours after its scheduled start is void: the bet is left out.",
        "effective_from": "2026-11-07"
      },
      {
        "id": "not_played_yet",
        "text": "A game still to be played is listed with no result and left out of every figure.",
        "effective_from": "2026-11-06"
      }
    ]
  },
  "moment": {
    "bet_moment": "close",
    "target": "the start",
    "max_stale_minutes": 60,
    "floor_minutes_before_oct_2022": 10,
    "rows_priced": 0,
    "rows_aged": 0,
    "median_snapshot_age_minutes": null,
    "max_snapshot_age_minutes": null,
    "stale_price": 0,
    "after_moment": 0,
    "age_unknown": 0,
    "line_sources": {}
  },
  "coverage": {
    "flow": [
      {
        "step": "in_scope",
        "games": 3,
        "rows": 6
      },
      {
        "step": "rule_true",
        "rows": 0
      },
      {
        "step": "one_bet_a_game",
        "rows": 0,
        "out": {
          "both_sides": 0,
          "same_game_total": 0
        }
      },
      {
        "step": "priced",
        "rows": 0,
        "out": {
          "no_line": 0
        }
      },
      {
        "step": "graded",
        "rows": 0,
        "out": {
          "void": 0,
          "not_played_yet": 0
        }
      },
      {
        "step": "decisions",
        "rows": 0,
        "out": {
          "push": 0
        }
      }
    ],
    "by_season": [
      {
        "season": "2025-26",
        "games": 3,
        "rows": 6,
        "rule_true": 0,
        "bets": 0,
        "priced_share": 0.3333
      }
    ],
    "inputs_missing": [
      {
        "attribute": "home",
        "rows": 6,
        "rows_blank": 0,
        "share": 0,
        "seasons_blank": []
      }
    ],
    "left_out_differs": {
      "left_out": 0,
      "kept": 0,
      "flag": false,
      "max_smd": null,
      "covariate": null,
      "by_covariate": []
    }
  },
  "random_baseline": null,
  "decay": {
    "bets": 0,
    "window": null,
    "rolling": [],
    "break": null,
    "cusum": null,
    "known_break": null,
    "trend_per_100_bets": null,
    "decay_ratio": null,
    "clv_break": null,
    "roi_newest_30": null,
    "status_reason": "no graded bets"
  },
  "ablation": null,
  "nearby": {
    "na": "the rule's numbers can't be moved one at a time",
    "numbers": [],
    "variants": 0
  },
  "monte_carlo": null,
  "noise": {
    "seed": 3363965115,
    "inputs": null,
    "inputs_na": "the rule's numbers can't be jittered one at a time",
    "lines": null,
    "delay": {
      "bet_moment": "day_before",
      "na": "day-before lines for this league are still loading"
    },
    "low_power": true
  },
  "concentration": {
    "bets": 0,
    "units": 0,
    "by": [],
    "trim_top_0_05": null
  },
  "split_dimensions": [],
  "robustness": {
    "fast_path": false,
    "seed": 724149288,
    "evaluations": 1,
    "off": [],
    "checks": [
      {
        "key": "half_point_worse",
        "label": "Holds ½ point worse",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "nearby_holds",
        "label": "Holds with nearby numbers",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "not_concentrated",
        "label": "Not one team or season",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "still_working",
        "label": "Still working",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      }
    ]
  },
  "calibration": {
    "formula": "=IF(home, 0.6, 0.4)",
    "bet_formula": "=(IF(home, 0.6, 0.4)) * TO_DECIMAL(moneyline_close) - 1 > 0.02",
    "edge_threshold": 0.02,
    "basis": "newest_30",
    "games": 0,
    "rows": 0,
    "left_out": {
      "pushes": 0,
      "outside_0_1": 0,
      "no_value": 0
    },
    "clipped": 0,
    "in_sample_rows": 0,
    "holdout_from": null,
    "status": "na",
    "value": "too few games held out to judge (0; 200 needed)",
    "statistic": null,
    "threshold": 0.05
  },
  "verdict": {
    "version": 2,
    "headline": "No bets",
    "level": "too_few",
    "passed": 0,
    "applicable": 0,
    "gate": {
      "key": "no_look_ahead",
      "status": "pass",
      "value": "every value the rule reads is known at the bet moment",
      "leak_test": "clean"
    },
    "checks": []
  },
  "risk": {
    "staking": "flat",
    "stake_fraction": null,
    "bankroll_units": 100,
    "ruin_share": 0.5,
    "horizon_bets": 500,
    "paths": 5000,
    "seed": 86435566430832,
    "lose_all_ever": null,
    "lose_all_ever_allowing_error": null,
    "ruin_ever_if_rate_exact": null,
    "ruin_if_rate_exact": null,
    "ruin_allowing_error": null,
    "estimation_premium": null,
    "drawdown_p95_units": null,
    "drawdown_p95": null,
    "down_after_horizon": null,
    "bankroll_for_ruin_005_units": null,
    "curve": [],
    "status": "too_few",
    "method": "lundberg+posterior_monte_carlo",
    "warnings": [
      "too_few_decisions"
    ],
    "percent": {
      "stake_fraction": 0.02,
      "ruin_if_rate_exact": null,
      "ruin_allowing_error": null,
      "drawdown_p95": null,
      "status": "too_few"
    }
  },
  "staking_plans": {
    "bankroll_units": 100,
    "percent": 0.02,
    "kelly_cap": 0.05,
    "kelly": {
      "win_rate": null,
      "push_rate": 0,
      "full_fraction": null,
      "shrink": null,
      "multiplier": null,
      "honest_fraction": null,
      "capped": null,
      "simultaneous": false,
      "basis": "record",
      "multiplier_rule": "honest",
      "withheld": "stake_first_party_only"
    },
    "plans": [
      {
        "plan": "flat",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 0,
        "end_bankroll_units": 100,
        "units": 0,
        "max_drawdown": 0,
        "growth_per_bet": null,
        "roi": null
      },
      {
        "plan": "to_win",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 0,
        "end_bankroll_units": 100,
        "units": 0,
        "max_drawdown": 0,
        "growth_per_bet": null,
        "roi": null
      },
      {
        "plan": "percent",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 0,
        "end_bankroll_units": 100,
        "units": 0,
        "max_drawdown": 0,
        "growth_per_bet": null,
        "roi": null
      },
      {
        "plan": "kelly",
        "status": "withheld",
        "withheld": "stake_first_party_only"
      }
    ],
    "warnings": [
      "small_sample"
    ]
  },
  "risk_adjusted": {
    "bets": 0,
    "warnings": [
      "no_bets"
    ]
  },
  "caps": null,
  "capacity": {
    "available": false,
    "market": "h2h",
    "before_start": "0_1h",
    "books": [],
    "max_stake_per_bet": null,
    "per_season_at_limit": null,
    "bets_per_season": null,
    "limits_held": 0,
    "reason": "Kelly holds no measured h2h limits for nba at this moment yet."
  },
  "splits": [],
  "without": [],
  "rule": {
    "formula": "=(IF(home, 0.6, 0.4)) * TO_DECIMAL(moneyline_close) - 1 > 0.02",
    "competition": "nba",
    "market": "moneyline",
    "side": "rule",
    "bet_moment": "close",
    "seasons": [
      "2025-26"
    ],
    "season_type": "regular",
    "stake": "risk",
    "price": "consensus",
    "base_formula": null,
    "reads": [
      {
        "name": "home",
        "known": "pregame",
        "windowed": false
      }
    ],
    "rule_hash": "sha256:cc8c716e7628b75866e3e8ec2057957dbfb69aeff28266f9b6dc4feefacea17a",
    "formula_version": "1.0.0",
    "catalogue_version": "1:0"
  },
  "left_out": {
    "no_line": 0,
    "both_sides": 0,
    "stale_price": 0
  },
  "matched_without_line": 0,
  "matched_both_sides": 0,
  "assumptions": [
    "Each bet is taken at Kelly's consensus close price; games Kelly holds no close line for are left out (0).",
    "Games where the rule matched both teams are left out (0).",
    "One flat unit risked a bet."
  ],
  "as_of": "2026-11-06T00:00:00Z",
  "notice": "This tests your rule on past games. It isn't a pick and doesn't rank selections.",
  "data_through": {},
  "latest_result": "2025-10-25T23:00:00Z",
  "rows_built_at": "2026-11-06T00:00:00Z",
  "stale": false,
  "since_saved": null,
  "tests_on_account": {
    "competition": "nba",
    "market": "moneyline",
    "count": 1,
    "shown_counted": 0
  },
  "data_version": "snap_52",
  "manifest": {
    "version": 1,
    "code": {
      "engine": 8,
      "release": null,
      "formula_version": "1.0.0",
      "catalogue_version": "1:0",
      "attributes_sha256": "0000000000000000",
      "settlement_rules": "2026-11-08"
    },
    "data": {
      "version": "snap_52",
      "snapshots": [
        "snap_52"
      ],
      "one_snapshot": true,
      "as_of": "2026-11-06T00:00:00Z",
      "data_through": {},
      "latest_result": "2025-10-25T23:00:00Z",
      "rows_built_at": "2026-11-06T00:00:00Z",
      "queries": {
        "rule_test_games": "0000000000000000"
      }
    },
    "request": {
      "request_hash": "sha256:0502a9b168695c1ecd9975e4036d8096ecf5edb09bb05ca4661781ac73b628c0",
      "rule_hash": "sha256:cc8c716e7628b75866e3e8ec2057957dbfb69aeff28266f9b6dc4feefacea17a",
      "seed": 4199034409599712000
    },
    "sources": {
      "prices": {},
      "inputs": [
        {
          "name": "home",
          "known": "pregame"
        }
      ]
    },
    "seasons": [
      {
        "season": "2025-26",
        "rows": 6,
        "priced_share": 0.3333
      }
    ],
    "left_out": {
      "both_sides": 0,
      "no_line": 0,
      "stale_price": 0
    },
    "sha256": "sha256:837903c84f3848f6b9367acf695f7f303b14225bd1f17ac2a662ab539fe7c2e7"
  },
  "run_id": "run_y7vwhyx3err5m5j5grdx",
  "rule_version": null,
  "report_url": null,
  "summary": "The rule matched no game Kelly holds a line for, 2025-26.",
  "has_more": false,
  "next_cursor": null,
  "source": "kelly",
  "attribution": null,
  "request_id": "req_d5bec7bcae67a2c0b10ec009",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

```http
POST https://api.askkelly.ai/v1/rules:test
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "formula": "=0.5",
  "competition": "nba",
  "market": "over",
  "seasons": [
    "2025-26"
  ],
  "output": "probability"
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/rule_not_testable",
  "title": "Rule can't be tested",
  "status": 422,
  "code": "rule_not_testable",
  "detail": "A probability formula bets a moneyline or a spread, not over.",
  "param": "market",
  "doc_url": "https://docs.askkelly.ai/problems/rule_not_testable",
  "request_id": "req_1af92e34745ad20f1b131054",
  "retryable": false,
  "display_message": "That rule can't be tested on past games as written.",
  "problems": [
    {
      "code": "probability_market",
      "path": null,
      "message": "A probability formula bets a moneyline or a spread, not over.",
      "fixes": [
        "Use market: moneyline (the chance the team wins) or spread (the chance it covers)."
      ]
    }
  ]
}
```

```http
POST https://api.askkelly.ai/v1/rules:test
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "formula": "=home",
  "competition": "nba",
  "seasons": [
    "2025-26"
  ],
  "save": true,
  "name": "Home teams",
  "detail": "summary"
}
```

```json
{
  "object": "rule_test",
  "staking": "flat, 1 unit risked a bet",
  "matched": 1,
  "ungraded": 0,
  "overall": {
    "wins": 1,
    "losses": 0,
    "pushes": 0,
    "bets": 1,
    "decisions": 1,
    "record": "1-0",
    "units": 0.9099999999999999,
    "roi": 0.9099999999999999,
    "roi_interval": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "win_rate": 1,
    "break_even": 0.5235602094240838,
    "over_break_even": 0.47643979057591623,
    "significance": {
      "p_value": 0.5235602094240838,
      "no_skill_match_per_100": 52.35602094240838,
      "coin_match_per_100": 50,
      "z": 0.9539392014169455,
      "significant": false,
      "alpha": 0.05,
      "multiple_comparisons": null,
      "anytime_valid": {
        "e_value": 1.0580125,
        "p_value": 0.9451684171973394,
        "max_e": 1.0580125,
        "method": "kelly_betting_mixture",
        "kelly_fraction": 0.5,
        "crossed": false,
        "roi_cs95": [
          -0.999045,
          0.9090450000000001
        ]
      },
      "method": "exact_binomial",
      "t_stat": null,
      "p_value_exact": 0.5235602094240838,
      "p_value_clustered": 0.17005720935900537,
      "p_value_vs_vig": null,
      "null": "break_even",
      "sims": null,
      "seed": null,
      "p_adjusted": 0.5235602094240838,
      "adjust_method": "none",
      "tests": 1,
      "tests_effective": 1,
      "reality_check_p": null,
      "spa_p": null,
      "clears_t3": false,
      "haircut": null,
      "haircut_roi": null
    },
    "sample_needed": null,
    "few_decisions": true,
    "small_sample": true,
    "formulas": [
      "F3.2@1",
      "F12.1@1",
      "F12.3@1",
      "F12.4@1",
      "F36.2@1"
    ],
    "warnings": [
      "fixed_n_p_value",
      "small_sample"
    ],
    "roi_ci": {
      "method": "score",
      "level": 0.95,
      "score": [
        -0.6054908095394765,
        0.9099999999999999
      ],
      "bca": null,
      "block_bootstrap": null,
      "anytime_valid": [
        -0.999045,
        0.9090450000000001
      ],
      "iid_score": [
        -0.6054908095394765,
        0.9099999999999999
      ]
    },
    "roi_ci95": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "units_ci95": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "deflated": {
      "sharpe_per_bet": null,
      "skew": null,
      "kurtosis": null,
      "psr": null,
      "dsr": null,
      "sharpe_expected_max": null,
      "roi_bar": null,
      "trials_effective": 1,
      "sample_needed": null,
      "sample_needed_single": null,
      "sample_needed_power80": null,
      "sample_needed_plan": null
    }
  },
  "clv": {
    "bets_with_close": 0,
    "bets_without_close": 1,
    "reference": "consensus",
    "devig": "multiplicative",
    "lines_converted": 0,
    "coverage": 0,
    "closes_stale": 0,
    "points_coverage": 0,
    "points_test": null,
    "basis": "probability",
    "mean": null,
    "ci95": null,
    "p_value": null,
    "beat_close_share": null,
    "beat_rate": null,
    "beat_rate_ci95": null,
    "sign_test_p": null,
    "mean_prob": null,
    "mean_points": null,
    "points_bets": 0,
    "profit_slope": null,
    "profit_slope_se": null,
    "sample_needed": null,
    "sample_needed_roi": null,
    "significance": null,
    "note": "Bets at the close have no closing-line value by definition."
  },
  "path": {
    "max_drawdown_units": 0,
    "longest_losing_run": 0
  },
  "seasons": [
    {
      "season": "2025-26",
      "wins": 1,
      "losses": 0,
      "pushes": 0,
      "bets": 1,
      "decisions": 1,
      "record": "1-0",
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "roi_interval": [
        0.9099999999999999,
        0.9099999999999999
      ],
      "win_rate": 1,
      "break_even": 0.5235602094240838,
      "over_break_even": 0.47643979057591623,
      "significance": {
        "p_value": 0.5235602094240838,
        "no_skill_match_per_100": 52.35602094240838,
        "coin_match_per_100": 50,
        "z": 0.9539392014169455,
        "significant": false,
        "alpha": 0.05,
        "multiple_comparisons": null,
        "anytime_valid": {
          "e_value": 1.0500500000000001,
          "p_value": 0.9523356030665205,
          "crossed": false
        }
      },
      "sample_needed": null,
      "few_decisions": true,
      "small_sample": true,
      "clv_mean": null
    }
  ],
  "holdout": null,
  "dependence": {
    "cluster_by": [
      "slate",
      "team_season"
    ],
    "slate": "date",
    "clusters": 1,
    "design_effect": 1,
    "effective_bets": 1,
    "method": "none",
    "se": null,
    "se_iid": null
  },
  "honest": {
    "roi": -0.04514385341429974,
    "ci80": [
      -0.07077022186419332,
      -0.019517484964406154
    ],
    "prior_mean": -0.04545450206611379,
    "prior_sd": 0.02,
    "shrink": 0.999560632688928,
    "posterior_sd": 0.019995605844174143,
    "selection_adj": 0,
    "decay_factor": 0.74,
    "stabilizes_at_bets": 2275,
    "tries": 1,
    "basis_rules": 0,
    "raw_roi": 0.9099999999999999,
    "uses_clv": false,
    "prior_basis": "seed",
    "prior": {
      "source": "margin",
      "mean": -0.04545450206611379,
      "closes": 0,
      "capped": false,
      "words": "shrunk toward the market's usual margin of -4.5%"
    }
  },
  "luck": {
    "reading": "versus_the_market",
    "close_source": "consensus",
    "devig": "multiplicative",
    "bets_without_prob": 1,
    "left_out": {
      "push": 0,
      "half": 0
    },
    "lines_converted": 0,
    "bets": 0,
    "expected_units": null,
    "actual_units": null,
    "luck_units": null,
    "luck_se_units": null,
    "expected_wins": null,
    "actual_wins": null,
    "luck_percentile": null,
    "expected_roi": null,
    "actual_roi": null,
    "theta": null,
    "by_season": []
  },
  "base": {
    "formula": null,
    "source": "market",
    "status": "na",
    "why": "the rule has no who-or-when condition to filter, so its base is the whole market"
  },
  "stress": {
    "half_point_worse": {
      "bets": 1,
      "decisions": 1,
      "record": "1-0",
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "p_value": 0.5235602094240838
    },
    "flat_110": {
      "bets": 1,
      "decisions": 1,
      "record": "1-0",
      "units": 0.9090909090909092,
      "roi": 0.9090909090909092,
      "p_value": 0.5238095238095238
    },
    "other_side": {
      "bets": 1,
      "decisions": 1,
      "record": "0-1",
      "units": -1,
      "roi": -1,
      "p_value": 1
    },
    "break_even": {
      "price_multiplier": 0,
      "american_avg": null,
      "decimal_avg": null,
      "line_points": 3
    },
    "slippage_mc": null
  },
  "leak_test": {
    "status": "clean",
    "rows_checked": 6,
    "matched_checked": 3,
    "matches_flipped": 0,
    "parts": []
  },
  "warm_up": {
    "policy": "as_written",
    "games_needed": 0,
    "windows": [],
    "short_bets": 0,
    "by_policy": null,
    "warning": false
  },
  "settlement": {
    "profile": "kelly_standard",
    "rules_version": "2026-11-08",
    "applied": [
      {
        "rule": "final_score",
        "bets": 1
      }
    ],
    "rules": [
      {
        "id": "final_score",
        "text": "Every market grades on the final score as Kelly's score source records it, overtime and extra innings included.",
        "effective_from": "2026-11-06"
      },
      {
        "id": "spread_push",
        "text": "A spread bet whose margin lands exactly on the line pushes: the stake comes back.",
        "effective_from": "2026-11-06"
      },
      {
        "id": "postponed_void",
        "text": "A game with no final score 48 hours after its scheduled start is void: the bet is left out.",
        "effective_from": "2026-11-07"
      },
      {
        "id": "not_played_yet",
        "text": "A game still to be played is listed with no result and left out of every figure.",
        "effective_from": "2026-11-06"
      }
    ]
  },
  "moment": {
    "bet_moment": "close",
    "target": "the start",
    "max_stale_minutes": 60,
    "floor_minutes_before_oct_2022": 10,
    "rows_priced": 1,
    "rows_aged": 0,
    "median_snapshot_age_minutes": null,
    "max_snapshot_age_minutes": null,
    "stale_price": 0,
    "after_moment": 0,
    "age_unknown": 1,
    "line_sources": {
      "sheet_line": 1
    }
  },
  "coverage": {
    "flow": [
      {
        "step": "in_scope",
        "games": 3,
        "rows": 6
      },
      {
        "step": "rule_true",
        "rows": 3
      },
      {
        "step": "one_bet_a_game",
        "rows": 3,
        "out": {
          "both_sides": 0,
          "same_game_total": 0
        }
      },
      {
        "step": "priced",
        "rows": 1,
        "out": {
          "no_line": 2
        }
      },
      {
        "step": "graded",
        "rows": 1,
        "out": {
          "void": 0,
          "not_played_yet": 0
        }
      },
      {
        "step": "decisions",
        "rows": 1,
        "out": {
          "push": 0
        }
      }
    ],
    "by_season": [
      {
        "season": "2025-26",
        "games": 3,
        "rows": 6,
        "rule_true": 3,
        "bets": 1,
        "priced_share": 0.3333
      }
    ],
    "inputs_missing": [
      {
        "attribute": "home",
        "rows": 6,
        "rows_blank": 0,
        "share": 0,
        "seasons_blank": []
      }
    ],
    "left_out_differs": {
      "left_out": 2,
      "kept": 1,
      "flag": false,
      "max_smd": null,
      "covariate": null,
      "by_covariate": []
    }
  },
  "random_baseline": null,
  "decay": {
    "bets": 1,
    "window": 50,
    "break": null,
    "cusum": null,
    "known_break": null,
    "trend_per_100_bets": null,
    "decay_ratio": null,
    "clv_break": null,
    "roi_newest_30": null,
    "status_reason": "fewer than (100) graded bets"
  },
  "ablation": null,
  "nearby": {
    "numbers": [],
    "variants": 0,
    "distinct_bet_sets": 0,
    "grid": null,
    "roi_median": null,
    "roi_p05": null,
    "roi_p95": null,
    "plateau_share": null,
    "spike_ratio": null,
    "reading": null,
    "na": "the rule compares no numbers"
  },
  "monte_carlo": null,
  "noise": {
    "seed": 3397954809,
    "inputs": null,
    "inputs_na": "the rule compares no numbers",
    "lines": {
      "runs": 200,
      "profitable_runs": 200,
      "profitable_share": 1,
      "roi_median": 0.9099999999999999,
      "roi_p05": 0.9099999999999999,
      "line_prob": 0.5
    },
    "delay": {
      "bet_moment": "day_before",
      "na": "day-before lines for this league are still loading"
    },
    "low_power": true
  },
  "concentration": {
    "bets": 1,
    "units": 0.9099999999999999,
    "by": [
      {
        "group": "season",
        "groups": 1,
        "best": null,
        "without_best": null,
        "without_best_two": null,
        "effective_groups": 1,
        "p_more_concentrated": null,
        "jackknife_roi_se": null
      },
      {
        "group": "team",
        "groups": 1,
        "best": null,
        "without_best": null,
        "without_best_two": null,
        "effective_groups": 1,
        "p_more_concentrated": null,
        "jackknife_roi_se": null
      }
    ],
    "trim_top_0_05": null
  },
  "split_dimensions": [],
  "robustness": {
    "fast_path": true,
    "seed": 769905824,
    "evaluations": 1,
    "off": [],
    "checks": [
      {
        "key": "half_point_worse",
        "label": "Holds ½ point worse",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "nearby_holds",
        "label": "Holds with nearby numbers",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "not_concentrated",
        "label": "Not one team or season",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "still_working",
        "label": "Still working",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      }
    ]
  },
  "verdict": {
    "version": 2,
    "headline": "Too few bets to judge",
    "level": "too_few",
    "passed": 0,
    "applicable": 2,
    "gate": {
      "key": "no_look_ahead",
      "status": "pass",
      "value": "every value the rule reads is known at the bet moment",
      "leak_test": "clean"
    },
    "checks": [
      {
        "key": "enough_bets",
        "group": "real",
        "label": "Enough bets",
        "status": "fail",
        "zone": "red",
        "value": "(1) decisions are too few to size the sample",
        "statistic": 1,
        "threshold": null
      },
      {
        "key": "not_luck",
        "group": "real",
        "label": "Not just luck",
        "status": "fail",
        "zone": "red",
        "value": "p 0.524",
        "statistic": 0.5235602094240838,
        "threshold": 0.05
      },
      {
        "key": "beats_base",
        "group": "real",
        "label": "Beats its own base",
        "status": "na",
        "zone": "na",
        "value": "the rule has no who-or-when condition to filter, so its base is the whole market",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "half_point_worse",
        "group": "pressure",
        "label": "Holds ½ point worse",
        "status": "na",
        "zone": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "nearby_holds",
        "group": "pressure",
        "label": "Nearby thresholds hold",
        "status": "na",
        "zone": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "not_concentrated",
        "group": "pressure",
        "label": "Not one lucky stretch",
        "status": "na",
        "zone": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "beats_close",
        "group": "still_working",
        "label": "Beats the close",
        "status": "na",
        "zone": "na",
        "value": "bets at the close can't beat it",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "still_working",
        "group": "still_working",
        "label": "Still working",
        "status": "na",
        "zone": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "since_saved",
        "group": "still_working",
        "label": "Since saved",
        "status": "na",
        "zone": "na",
        "value": "(0) of (30) bets since it was saved",
        "statistic": null,
        "threshold": null
      }
    ],
    "held_back_by": []
  },
  "risk": {
    "staking": "flat",
    "stake_fraction": null,
    "bankroll_units": 100,
    "ruin_share": 0.5,
    "horizon_bets": 500,
    "paths": 5000,
    "seed": 6899137762779026,
    "lose_all_ever": 0,
    "lose_all_ever_allowing_error": 0.277131008418,
    "ruin_ever_if_rate_exact": 0,
    "ruin_if_rate_exact": null,
    "ruin_allowing_error": null,
    "estimation_premium": null,
    "drawdown_p95_units": null,
    "drawdown_p95": null,
    "down_after_horizon": null,
    "bankroll_for_ruin_005_units": null,
    "curve": null,
    "status": "too_few",
    "method": "lundberg+posterior_monte_carlo",
    "warnings": [
      "too_few_decisions"
    ],
    "percent": {
      "stake_fraction": 0.02,
      "ruin_if_rate_exact": null,
      "ruin_allowing_error": null,
      "drawdown_p95": null,
      "status": "too_few"
    }
  },
  "staking_plans": {
    "bankroll_units": 100,
    "percent": 0.02,
    "kelly_cap": 0.05,
    "kelly": {
      "win_rate": 1,
      "push_rate": 0,
      "full_fraction": null,
      "shrink": 1,
      "multiplier": null,
      "honest_fraction": null,
      "capped": null,
      "simultaneous": false,
      "basis": "record",
      "multiplier_rule": "honest",
      "zero_because": "too_few",
      "withheld": "stake_first_party_only"
    },
    "plans": [
      {
        "plan": "flat",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 1,
        "end_bankroll_units": 100.91,
        "units": 0.9099999999999966,
        "max_drawdown": 0,
        "growth_per_bet": 0.009058844488345926,
        "roi": 0.9099999999999966
      },
      {
        "plan": "to_win",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 1,
        "end_bankroll_units": 101,
        "units": 1,
        "max_drawdown": 0,
        "growth_per_bet": 0.009950330853168092,
        "roi": 0.9099999999999999
      },
      {
        "plan": "percent",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 1,
        "end_bankroll_units": 101.82,
        "units": 1.8199999999999932,
        "max_drawdown": 0,
        "growth_per_bet": 0.018036362486098575,
        "roi": 0.9099999999999966,
        "stake_fraction": 0.02
      },
      {
        "plan": "kelly",
        "status": "withheld",
        "withheld": "stake_first_party_only"
      }
    ],
    "warnings": [
      "small_sample"
    ]
  },
  "risk_adjusted": {
    "sharpe_per_bet": null,
    "profit_factor": null,
    "warnings": [
      "no_losing_bets",
      "no_spread_in_returns",
      "small_sample"
    ]
  },
  "caps": null,
  "capacity": {
    "available": false,
    "market": "spreads",
    "before_start": "0_1h",
    "books": [],
    "max_stake_per_bet": null,
    "per_season_at_limit": null,
    "bets_per_season": null,
    "limits_held": 0,
    "reason": "Kelly holds no measured spreads limits for nba at this moment yet."
  },
  "splits": null,
  "without": null,
  "rule": {
    "formula": "=home",
    "competition": "nba",
    "market": "spread",
    "side": "rule",
    "bet_moment": "close",
    "seasons": [
      "2025-26"
    ],
    "season_type": "regular",
    "stake": "risk",
    "price": "consensus",
    "base_formula": null,
    "reads": [
      {
        "name": "home",
        "known": "pregame",
        "windowed": false
      }
    ],
    "rule_hash": "sha256:c9a3bcfd2d08b46b86935391523bd2671a885a30b3b1f15bf69e12c5e399441b",
    "formula_version": "1.0.0",
    "catalogue_version": "1:0"
  },
  "left_out": {
    "no_line": 2,
    "both_sides": 0,
    "stale_price": 0
  },
  "matched_without_line": 2,
  "matched_both_sides": 0,
  "assumptions": [
    "Each bet is taken at Kelly's consensus close price; games Kelly holds no close line for are left out (2).",
    "Games where the rule matched both teams are left out (0).",
    "One flat unit risked a bet."
  ],
  "as_of": "2026-11-06T00:00:00Z",
  "notice": "This tests your rule on past games. It isn't a pick and doesn't rank selections.",
  "data_through": {},
  "latest_result": "2025-10-25T23:00:00Z",
  "rows_built_at": "2026-11-06T00:00:00Z",
  "stale": false,
  "since_saved": null,
  "tests_on_account": {
    "competition": "nba",
    "market": "spread",
    "count": 1,
    "shown_counted": 0
  },
  "data_version": "snap_52",
  "manifest": {
    "version": 1,
    "code": {
      "engine": 8,
      "release": null,
      "formula_version": "1.0.0",
      "catalogue_version": "1:0",
      "attributes_sha256": "0000000000000000",
      "settlement_rules": "2026-11-08"
    },
    "data": {
      "version": "snap_52",
      "snapshots": [
        "snap_52"
      ],
      "one_snapshot": true,
      "as_of": "2026-11-06T00:00:00Z",
      "data_through": {},
      "latest_result": "2025-10-25T23:00:00Z",
      "rows_built_at": "2026-11-06T00:00:00Z",
      "queries": {
        "rule_test_games": "0000000000000000"
      }
    },
    "request": {
      "request_hash": "sha256:cce3946d8c33952c9cdbbfee66781fa4c6308af5f93c465426093a4f102255e8",
      "rule_hash": "sha256:c9a3bcfd2d08b46b86935391523bd2671a885a30b3b1f15bf69e12c5e399441b",
      "seed": 18147943352127158000
    },
    "sources": {
      "prices": {
        "sheet_line": 1
      },
      "inputs": [
        {
          "name": "home",
          "known": "pregame"
        }
      ]
    },
    "seasons": [
      {
        "season": "2025-26",
        "rows": 6,
        "priced_share": 0.3333
      }
    ],
    "left_out": {
      "both_sides": 0,
      "no_line": 2,
      "stale_price": 0
    },
    "sha256": "sha256:5cb4599cac45cd1b6bc1127162da0ff9c2214e7bb3bc3a9a351625c56bc99e51"
  },
  "run_id": "run_rc69h189x95wy5rhfet2",
  "rule_version": {
    "rule_id": "rl_5bbmw66t2r1jvg6cpxt2",
    "name": "Home teams",
    "version": 1,
    "new_version": true,
    "versions_tried": 1
  },
  "report_url": null,
  "summary": "Too few bets to judge: honest forward ROI -4.5%, 1-0 against the spread, 2025-26, +0.9 units, +91.0% ROI past (0 of 2 checks passed).",
  "has_more": false,
  "next_cursor": null,
  "source": "kelly",
  "attribution": null,
  "request_id": "req_a8e97cdf6c3247af334f13d4",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

```http
POST https://api.askkelly.ai/v1/rules:test
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "formula": "=home",
  "competition": "nba",
  "seasons": [
    "2025-26"
  ],
  "detail": "summary",
  "transfer": true,
  "transfer_leagues": [
    "ncaab",
    "nfl"
  ]
}
```

```json
{
  "object": "rule_test",
  "staking": "flat, 1 unit risked a bet",
  "matched": 1,
  "ungraded": 0,
  "overall": {
    "wins": 1,
    "losses": 0,
    "pushes": 0,
    "bets": 1,
    "decisions": 1,
    "record": "1-0",
    "units": 0.9099999999999999,
    "roi": 0.9099999999999999,
    "roi_interval": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "win_rate": 1,
    "break_even": 0.5235602094240838,
    "over_break_even": 0.47643979057591623,
    "significance": {
      "p_value": 0.5235602094240838,
      "no_skill_match_per_100": 52.35602094240838,
      "coin_match_per_100": 50,
      "z": 0.9539392014169455,
      "significant": false,
      "alpha": 0.05,
      "multiple_comparisons": {
        "tests": 2,
        "bonferroni_threshold": 0.025,
        "bonferroni_survives": false,
        "bonferroni_adjusted_p": 1,
        "benjamini_hochberg_survives_alone": false,
        "familywise_error_uncorrected": 0.09750000000000003
      },
      "anytime_valid": {
        "e_value": 1.0580125,
        "p_value": 0.9451684171973394,
        "max_e": 1.0580125,
        "method": "kelly_betting_mixture",
        "kelly_fraction": 0.5,
        "crossed": false,
        "roi_cs95": [
          -0.999045,
          0.9090450000000001
        ]
      },
      "method": "exact_binomial",
      "t_stat": null,
      "p_value_exact": 0.5235602094240838,
      "p_value_clustered": 0.17005720935900537,
      "p_value_vs_vig": null,
      "null": "break_even",
      "sims": null,
      "seed": null,
      "p_adjusted": 1,
      "adjust_method": "holm",
      "tests": 2,
      "tests_effective": 2,
      "reality_check_p": null,
      "spa_p": null,
      "clears_t3": false,
      "haircut": 0.567948481856096,
      "haircut_roi": 0.3931668815109526
    },
    "sample_needed": null,
    "few_decisions": true,
    "small_sample": true,
    "formulas": [
      "F3.2@1",
      "F12.1@1",
      "F12.3@1",
      "F12.4@1",
      "F12.8@1",
      "F36.2@1"
    ],
    "warnings": [
      "fixed_n_p_value",
      "small_sample"
    ],
    "roi_ci": {
      "method": "score",
      "level": 0.95,
      "score": [
        -0.6054908095394765,
        0.9099999999999999
      ],
      "bca": null,
      "block_bootstrap": null,
      "anytime_valid": [
        -0.999045,
        0.9090450000000001
      ],
      "iid_score": [
        -0.6054908095394765,
        0.9099999999999999
      ]
    },
    "roi_ci95": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "units_ci95": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "deflated": {
      "sharpe_per_bet": null,
      "skew": null,
      "kurtosis": null,
      "psr": null,
      "dsr": null,
      "sharpe_expected_max": null,
      "roi_bar": null,
      "trials_effective": 2,
      "sample_needed": null,
      "sample_needed_single": null,
      "sample_needed_power80": null,
      "sample_needed_plan": null
    }
  },
  "clv": {
    "bets_with_close": 0,
    "bets_without_close": 1,
    "reference": "consensus",
    "devig": "multiplicative",
    "lines_converted": 0,
    "coverage": 0,
    "closes_stale": 0,
    "points_coverage": 0,
    "points_test": null,
    "basis": "probability",
    "mean": null,
    "ci95": null,
    "p_value": null,
    "beat_close_share": null,
    "beat_rate": null,
    "beat_rate_ci95": null,
    "sign_test_p": null,
    "mean_prob": null,
    "mean_points": null,
    "points_bets": 0,
    "profit_slope": null,
    "profit_slope_se": null,
    "sample_needed": null,
    "sample_needed_roi": null,
    "significance": null,
    "note": "Bets at the close have no closing-line value by definition."
  },
  "path": {
    "max_drawdown_units": 0,
    "longest_losing_run": 0
  },
  "seasons": [
    {
      "season": "2025-26",
      "wins": 1,
      "losses": 0,
      "pushes": 0,
      "bets": 1,
      "decisions": 1,
      "record": "1-0",
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "roi_interval": [
        0.9099999999999999,
        0.9099999999999999
      ],
      "win_rate": 1,
      "break_even": 0.5235602094240838,
      "over_break_even": 0.47643979057591623,
      "significance": {
        "p_value": 0.5235602094240838,
        "no_skill_match_per_100": 52.35602094240838,
        "coin_match_per_100": 50,
        "z": 0.9539392014169455,
        "significant": false,
        "alpha": 0.05,
        "multiple_comparisons": null,
        "anytime_valid": {
          "e_value": 1.0500500000000001,
          "p_value": 0.9523356030665205,
          "crossed": false
        }
      },
      "sample_needed": null,
      "few_decisions": true,
      "small_sample": true,
      "clv_mean": null
    }
  ],
  "holdout": null,
  "dependence": {
    "cluster_by": [
      "slate",
      "team_season"
    ],
    "slate": "date",
    "clusters": 1,
    "design_effect": 1,
    "effective_bets": 1,
    "method": "none",
    "se": null,
    "se_iid": null
  },
  "honest": {
    "roi": -0.04532667665457775,
    "ci80": [
      -0.07095304510447134,
      -0.019700308204684165
    ],
    "prior_mean": -0.04545450206611379,
    "prior_sd": 0.02,
    "shrink": 0.999560632688928,
    "posterior_sd": 0.019995605844174143,
    "selection_adj": -0.00018282324027801353,
    "decay_factor": 0.74,
    "stabilizes_at_bets": 2275,
    "tries": 2,
    "basis_rules": 0,
    "raw_roi": 0.9099999999999999,
    "uses_clv": false,
    "prior_basis": "seed",
    "prior": {
      "source": "margin",
      "mean": -0.04545450206611379,
      "closes": 0,
      "capped": false,
      "words": "shrunk toward the market's usual margin of -4.5%"
    }
  },
  "luck": {
    "reading": "versus_the_market",
    "close_source": "consensus",
    "devig": "multiplicative",
    "bets_without_prob": 1,
    "left_out": {
      "push": 0,
      "half": 0
    },
    "lines_converted": 0,
    "bets": 0,
    "expected_units": null,
    "actual_units": null,
    "luck_units": null,
    "luck_se_units": null,
    "expected_wins": null,
    "actual_wins": null,
    "luck_percentile": null,
    "expected_roi": null,
    "actual_roi": null,
    "theta": null,
    "by_season": []
  },
  "base": {
    "formula": null,
    "source": "market",
    "status": "na",
    "why": "the rule has no who-or-when condition to filter, so its base is the whole market"
  },
  "stress": {
    "half_point_worse": {
      "bets": 1,
      "decisions": 1,
      "record": "1-0",
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "p_value": 0.5235602094240838
    },
    "flat_110": {
      "bets": 1,
      "decisions": 1,
      "record": "1-0",
      "units": 0.9090909090909092,
      "roi": 0.9090909090909092,
      "p_value": 0.5238095238095238
    },
    "other_side": {
      "bets": 1,
      "decisions": 1,
      "record": "0-1",
      "units": -1,
      "roi": -1,
      "p_value": 1
    },
    "break_even": {
      "price_multiplier": 0,
      "american_avg": null,
      "decimal_avg": null,
      "line_points": 3
    },
    "slippage_mc": null
  },
  "leak_test": {
    "status": "clean",
    "rows_checked": 6,
    "matched_checked": 3,
    "matches_flipped": 0,
    "parts": []
  },
  "warm_up": {
    "policy": "as_written",
    "games_needed": 0,
    "windows": [],
    "short_bets": 0,
    "by_policy": null,
    "warning": false
  },
  "settlement": {
    "profile": "kelly_standard",
    "rules_version": "2026-11-08",
    "applied": [
      {
        "rule": "final_score",
        "bets": 1
      }
    ],
    "rules": [
      {
        "id": "final_score",
        "text": "Every market grades on the final score as Kelly's score source records it, overtime and extra innings included.",
        "effective_from": "2026-11-06"
      },
      {
        "id": "spread_push",
        "text": "A spread bet whose margin lands exactly on the line pushes: the stake comes back.",
        "effective_from": "2026-11-06"
      },
      {
        "id": "postponed_void",
        "text": "A game with no final score 48 hours after its scheduled start is void: the bet is left out.",
        "effective_from": "2026-11-07"
      },
      {
        "id": "not_played_yet",
        "text": "A game still to be played is listed with no result and left out of every figure.",
        "effective_from": "2026-11-06"
      }
    ]
  },
  "moment": {
    "bet_moment": "close",
    "target": "the start",
    "max_stale_minutes": 60,
    "floor_minutes_before_oct_2022": 10,
    "rows_priced": 1,
    "rows_aged": 0,
    "median_snapshot_age_minutes": null,
    "max_snapshot_age_minutes": null,
    "stale_price": 0,
    "after_moment": 0,
    "age_unknown": 1,
    "line_sources": {
      "sheet_line": 1
    }
  },
  "coverage": {
    "flow": [
      {
        "step": "in_scope",
        "games": 3,
        "rows": 6
      },
      {
        "step": "rule_true",
        "rows": 3
      },
      {
        "step": "one_bet_a_game",
        "rows": 3,
        "out": {
          "both_sides": 0,
          "same_game_total": 0
        }
      },
      {
        "step": "priced",
        "rows": 1,
        "out": {
          "no_line": 2
        }
      },
      {
        "step": "graded",
        "rows": 1,
        "out": {
          "void": 0,
          "not_played_yet": 0
        }
      },
      {
        "step": "decisions",
        "rows": 1,
        "out": {
          "push": 0
        }
      }
    ],
    "by_season": [
      {
        "season": "2025-26",
        "games": 3,
        "rows": 6,
        "rule_true": 3,
        "bets": 1,
        "priced_share": 0.3333
      }
    ],
    "inputs_missing": [
      {
        "attribute": "home",
        "rows": 6,
        "rows_blank": 0,
        "share": 0,
        "seasons_blank": []
      }
    ],
    "left_out_differs": {
      "left_out": 2,
      "kept": 1,
      "flag": false,
      "max_smd": null,
      "covariate": null,
      "by_covariate": []
    }
  },
  "random_baseline": null,
  "decay": {
    "bets": 1,
    "window": 50,
    "break": null,
    "cusum": null,
    "known_break": null,
    "trend_per_100_bets": null,
    "decay_ratio": null,
    "clv_break": null,
    "roi_newest_30": null,
    "status_reason": "fewer than (100) graded bets"
  },
  "ablation": null,
  "nearby": {
    "numbers": [],
    "variants": 0,
    "distinct_bet_sets": 0,
    "grid": null,
    "roi_median": null,
    "roi_p05": null,
    "roi_p95": null,
    "plateau_share": null,
    "spike_ratio": null,
    "reading": null,
    "na": "the rule compares no numbers"
  },
  "monte_carlo": null,
  "noise": {
    "seed": 3397954809,
    "inputs": null,
    "inputs_na": "the rule compares no numbers",
    "lines": {
      "runs": 200,
      "profitable_runs": 200,
      "profitable_share": 1,
      "roi_median": 0.9099999999999999,
      "roi_p05": 0.9099999999999999,
      "line_prob": 0.5
    },
    "delay": {
      "bet_moment": "day_before",
      "na": "day-before lines for this league are still loading"
    },
    "low_power": true
  },
  "concentration": {
    "bets": 1,
    "units": 0.9099999999999999,
    "by": [
      {
        "group": "season",
        "groups": 1,
        "best": null,
        "without_best": null,
        "without_best_two": null,
        "effective_groups": 1,
        "p_more_concentrated": null,
        "jackknife_roi_se": null
      },
      {
        "group": "team",
        "groups": 1,
        "best": null,
        "without_best": null,
        "without_best_two": null,
        "effective_groups": 1,
        "p_more_concentrated": null,
        "jackknife_roi_se": null
      }
    ],
    "trim_top_0_05": null
  },
  "split_dimensions": [],
  "robustness": {
    "fast_path": true,
    "seed": 769905824,
    "evaluations": 1,
    "off": [],
    "checks": [
      {
        "key": "half_point_worse",
        "label": "Holds ½ point worse",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "nearby_holds",
        "label": "Holds with nearby numbers",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "not_concentrated",
        "label": "Not one team or season",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "still_working",
        "label": "Still working",
        "status": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      }
    ]
  },
  "verdict": {
    "version": 2,
    "headline": "Too few bets to judge",
    "level": "too_few",
    "passed": 0,
    "applicable": 2,
    "gate": {
      "key": "no_look_ahead",
      "status": "pass",
      "value": "every value the rule reads is known at the bet moment",
      "leak_test": "clean"
    },
    "checks": [
      {
        "key": "enough_bets",
        "group": "real",
        "label": "Enough bets",
        "status": "fail",
        "zone": "red",
        "value": "(1) decisions are too few to size the sample",
        "statistic": 1,
        "threshold": null
      },
      {
        "key": "not_luck",
        "group": "real",
        "label": "Not just luck",
        "status": "fail",
        "zone": "red",
        "value": "p 1.000 after (2) rules tried",
        "statistic": 1,
        "threshold": 0.05
      },
      {
        "key": "beats_base",
        "group": "real",
        "label": "Beats its own base",
        "status": "na",
        "zone": "na",
        "value": "the rule has no who-or-when condition to filter, so its base is the whole market",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "half_point_worse",
        "group": "pressure",
        "label": "Holds ½ point worse",
        "status": "na",
        "zone": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "nearby_holds",
        "group": "pressure",
        "label": "Nearby thresholds hold",
        "status": "na",
        "zone": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "not_concentrated",
        "group": "pressure",
        "label": "Not one lucky stretch",
        "status": "na",
        "zone": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "beats_close",
        "group": "still_working",
        "label": "Beats the close",
        "status": "na",
        "zone": "na",
        "value": "bets at the close can't beat it",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "still_working",
        "group": "still_working",
        "label": "Still working",
        "status": "na",
        "zone": "na",
        "value": "fewer than (30) decided bets",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "since_saved",
        "group": "still_working",
        "label": "Since saved",
        "status": "na",
        "zone": "na",
        "value": "(0) of (30) bets since it was saved",
        "statistic": null,
        "threshold": null
      }
    ],
    "held_back_by": []
  },
  "risk": {
    "staking": "flat",
    "stake_fraction": null,
    "bankroll_units": 100,
    "ruin_share": 0.5,
    "horizon_bets": 500,
    "paths": 5000,
    "seed": 6899137762779026,
    "lose_all_ever": 0,
    "lose_all_ever_allowing_error": 0.277131008418,
    "ruin_ever_if_rate_exact": 0,
    "ruin_if_rate_exact": null,
    "ruin_allowing_error": null,
    "estimation_premium": null,
    "drawdown_p95_units": null,
    "drawdown_p95": null,
    "down_after_horizon": null,
    "bankroll_for_ruin_005_units": null,
    "curve": null,
    "status": "too_few",
    "method": "lundberg+posterior_monte_carlo",
    "warnings": [
      "too_few_decisions"
    ],
    "percent": {
      "stake_fraction": 0.02,
      "ruin_if_rate_exact": null,
      "ruin_allowing_error": null,
      "drawdown_p95": null,
      "status": "too_few"
    }
  },
  "staking_plans": {
    "bankroll_units": 100,
    "percent": 0.02,
    "kelly_cap": 0.05,
    "kelly": {
      "win_rate": 1,
      "push_rate": 0,
      "full_fraction": null,
      "shrink": 1,
      "multiplier": null,
      "honest_fraction": null,
      "capped": null,
      "simultaneous": false,
      "basis": "record",
      "multiplier_rule": "honest",
      "zero_because": "too_few",
      "withheld": "stake_first_party_only"
    },
    "plans": [
      {
        "plan": "flat",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 1,
        "end_bankroll_units": 100.91,
        "units": 0.9099999999999966,
        "max_drawdown": 0,
        "growth_per_bet": 0.009058844488345926,
        "roi": 0.9099999999999966
      },
      {
        "plan": "to_win",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 1,
        "end_bankroll_units": 101,
        "units": 1,
        "max_drawdown": 0,
        "growth_per_bet": 0.009950330853168092,
        "roi": 0.9099999999999999
      },
      {
        "plan": "percent",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 1,
        "end_bankroll_units": 101.82,
        "units": 1.8199999999999932,
        "max_drawdown": 0,
        "growth_per_bet": 0.018036362486098575,
        "roi": 0.9099999999999966,
        "stake_fraction": 0.02
      },
      {
        "plan": "kelly",
        "status": "withheld",
        "withheld": "stake_first_party_only"
      }
    ],
    "warnings": [
      "small_sample"
    ]
  },
  "risk_adjusted": {
    "sharpe_per_bet": null,
    "profit_factor": null,
    "warnings": [
      "no_losing_bets",
      "no_spread_in_returns",
      "small_sample"
    ]
  },
  "caps": null,
  "capacity": {
    "available": false,
    "market": "spreads",
    "before_start": "0_1h",
    "books": [],
    "max_stake_per_bet": null,
    "per_season_at_limit": null,
    "bets_per_season": null,
    "limits_held": 0,
    "reason": "Kelly holds no measured spreads limits for nba at this moment yet."
  },
  "transfer": {
    "options": {
      "leagues": [
        "ncaab",
        "nfl"
      ],
      "markets": "auto",
      "thresholds": "both"
    },
    "status": "measured",
    "why": null,
    "cells": [
      {
        "competition": "nba",
        "market": "moneyline",
        "thresholds": "literal",
        "formula": "=home",
        "seasons": [
          "2025-26"
        ],
        "pooled": false,
        "decisions": 1,
        "bets": 1,
        "record": "1-0",
        "units": 0.6,
        "roi": 0.6,
        "roi_ci95": null,
        "se": null,
        "p_value": 0.625,
        "p_holm": 0.625
      },
      {
        "competition": "nfl",
        "market": "spread",
        "thresholds": "literal",
        "formula": "=home",
        "seasons": [
          "2025"
        ],
        "pooled": false,
        "decisions": 0,
        "bets": 0,
        "record": "0-0",
        "units": 0,
        "roi": null,
        "roi_ci95": null,
        "se": null,
        "p_value": null,
        "p_holm": null
      }
    ],
    "pooled": null,
    "same_direction": null,
    "not_testable": [
      {
        "competition": "ncaab",
        "market": "spread",
        "missing": [],
        "why": "Kelly holds no games for these seasons"
      }
    ],
    "note": "Other leagues answer a different question: this is evidence beside the verdict, never part of it, and these runs don't count toward your rules tried."
  },
  "splits": null,
  "without": null,
  "rule": {
    "formula": "=home",
    "competition": "nba",
    "market": "spread",
    "side": "rule",
    "bet_moment": "close",
    "seasons": [
      "2025-26"
    ],
    "season_type": "regular",
    "stake": "risk",
    "price": "consensus",
    "base_formula": null,
    "reads": [
      {
        "name": "home",
        "known": "pregame",
        "windowed": false
      }
    ],
    "rule_hash": "sha256:c9a3bcfd2d08b46b86935391523bd2671a885a30b3b1f15bf69e12c5e399441b",
    "formula_version": "1.0.0",
    "catalogue_version": "1:0"
  },
  "left_out": {
    "no_line": 2,
    "both_sides": 0,
    "stale_price": 0
  },
  "matched_without_line": 2,
  "matched_both_sides": 0,
  "assumptions": [
    "Each bet is taken at Kelly's consensus close price; games Kelly holds no close line for are left out (2).",
    "Games where the rule matched both teams are left out (0).",
    "One flat unit risked a bet."
  ],
  "as_of": "2026-11-06T00:00:00Z",
  "notice": "This tests your rule on past games. It isn't a pick and doesn't rank selections.",
  "data_through": {},
  "latest_result": "2025-10-25T23:00:00Z",
  "rows_built_at": "2026-11-06T00:00:00Z",
  "stale": false,
  "since_saved": null,
  "tests_on_account": {
    "competition": "nba",
    "market": "spread",
    "count": 2,
    "shown_counted": 0
  },
  "data_version": "snap_52",
  "manifest": {
    "version": 1,
    "code": {
      "engine": 8,
      "release": null,
      "formula_version": "1.0.0",
      "catalogue_version": "1:0",
      "attributes_sha256": "0000000000000000",
      "settlement_rules": "2026-11-08"
    },
    "data": {
      "version": "snap_52",
      "snapshots": [
        "snap_52"
      ],
      "one_snapshot": true,
      "as_of": "2026-11-06T00:00:00Z",
      "data_through": {},
      "latest_result": "2025-10-25T23:00:00Z",
      "rows_built_at": "2026-11-06T00:00:00Z",
      "queries": {
        "rule_test_games": "0000000000000000"
      }
    },
    "request": {
      "request_hash": "sha256:e34109992aadb32980f9ac83c6cc89e10bd44348bc5d2f112d605e274426126b",
      "rule_hash": "sha256:c9a3bcfd2d08b46b86935391523bd2671a885a30b3b1f15bf69e12c5e399441b",
      "seed": 18147943352127158000
    },
    "sources": {
      "prices": {
        "sheet_line": 1
      },
      "inputs": [
        {
          "name": "home",
          "known": "pregame"
        }
      ]
    },
    "seasons": [
      {
        "season": "2025-26",
        "rows": 6,
        "priced_share": 0.3333
      }
    ],
    "left_out": {
      "both_sides": 0,
      "no_line": 2,
      "stale_price": 0
    },
    "sha256": "sha256:e4dee7803798bc56f8675cb900f10ae66d38314a8ec9f7ed827cbe55896fde52"
  },
  "run_id": "run_43g3m0cfryzcxkcb7sfv",
  "rule_version": null,
  "report_url": null,
  "summary": "Too few bets to judge: honest forward ROI -4.5%, 1-0 against the spread, 2025-26, +0.9 units, +91.0% ROI past (0 of 2 checks passed).",
  "has_more": false,
  "next_cursor": null,
  "source": "kelly",
  "attribution": null,
  "request_id": "req_379ea34707419be658325b02",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

`POST /v1/charts:export`

## Export a chart
public, no key needed · 0 credits, not charged during the beta · MCP tool `export_chart` · status live

A Kelly chart spec, as a tool returned it under charts, written as Vega-Lite (rows inline), CSV, Python (pandas and Altair), R (ggplot2) or the spec itself: the file's text, media type and name. Every number is the engine's as the spec carried it; columns the spec's rights block (book prices) are left out, and a chart whose rows can't leave askkelly.ai is refused.

### Parameters
Body, `application/json` (required):

- `chart` string  
  The chart: one spec from a tool result's charts list (kcs 1), unchanged, as JSON text.  
  min length 2 · max length 2000000
- `format` string  
  vega_lite, csv, python, r or spec.  
  One of: `vega_lite`, `csv`, `python`, `r`, `spec` (open: new values may be added).

### Response
`200` The chart export facts.

- `object` const · required  
  Always chart_export.  
  Always `"chart_export"`.
- `format` string · required  
  spec, vega_lite, csv, python or r.  
  One of: `spec`, `vega_lite`, `csv`, `python`, `r` (open: new values may be added).
- `media_type` string · required  
  The file's media type (application/json, text/csv, text/x-python, text/x-r).
- `filename` string · required  
  A file name for it, from the chart's title.
- `text` string · required  
  The file itself: JSON, CSV or a code block to paste. Every number is the engine's, as the spec carried it.
- `kind` string · required  
  The chart's catalogue form (equity, funnel, forest, ...).
- `title` string · required  
  The chart's title.
- `rows` integer · required  
  Rows written.  
  min 0
- `columns_removed` array of string · required  
  Columns left out under the data's licence.
- `provenance` object · required  
  Where the numbers came from: the tool, the engine version, as of and the sources.
  - `tool` string · required  
    The engine tool that computed them.
  - `engine` string · required  
    The engine and its version.
  - `as_of` string · required  
    When the numbers stand.  
    format date-time
  - `sources` array of string · required  
    Their sources.
  - `args` object  
    The tool's public arguments, to ask for the chart again.
  - `chart` string · nullable  
    Which of the tool's charts it is.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large)

### Example
```http
POST https://api.askkelly.ai/v1/charts:export
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "chart": "{\"kcs\": 1, \"kind\": \"bars\", \"title\": \"ROI by sport\", \"data\": {\"key\": \"sport\", \"columns\": [{\"id\": \"sport\", \"type\": \"str\", \"label\": \"Sport\"}, {\"id\": \"roi\", \"type\": \"float\", \"label\": \"ROI\", \"unit\": \"roi\", \"format\": \"+.1%\"}, {\"id\": \"lo95\", \"type\": \"float\", \"unit\": \"roi\"}, {\"id\": \"hi95\", \"type\": \"float\", \"unit\": \"roi\"}, {\"id\": \"n_bets\", \"type\": \"int\", \"label\": \"Bets\"}], \"rows\": [{\"sport\": \"NFL\", \"roi\": 0.041, \"lo95\": -0.012, \"hi95\": 0.094, \"n_bets\": 410}, {\"sport\": \"NBA\", \"roi\": -0.022, \"lo95\": -0.081, \"hi95\": 0.037, \"n_bets\": 330}]}, \"x\": {\"field\": \"roi\", \"type\": \"quantitative\", \"title\": \"ROI\"}, \"y\": {\"field\": \"sport\", \"type\": \"nominal\"}, \"series\": [{\"field\": \"roi\", \"role\": \"market\", \"label\": \"ROI\"}], \"intervals\": [{\"low\": \"lo95\", \"high\": \"hi95\", \"level\": 0.95}], \"rules\": [{\"x\": 0, \"role\": \"break_even\", \"label\": \"Break-even\"}], \"count\": \"n_bets\", \"summary\": \"NFL +4.1% over 410 bets and NBA -2.2% over 330; neither can be told from luck yet.\", \"provenance\": {\"tool\": \"get_my_results\", \"engine\": \"results 2\", \"as_of\": \"2026-10-04T17:30:00Z\", \"sources\": [\"bet log\"]}}",
  "format": "csv"
}
```

```json
{
  "object": "chart_export",
  "format": "csv",
  "media_type": "text/csv",
  "filename": "roi-by-sport.csv",
  "text": "sport,roi,lo95,hi95,n_bets\nNFL,0.041,-0.012,0.094,410\nNBA,-0.022,-0.081,0.037,330\n",
  "kind": "bars",
  "title": "ROI by sport",
  "rows": 2,
  "columns_removed": [],
  "provenance": {
    "tool": "get_my_results",
    "engine": "results 2",
    "as_of": "2026-10-04T17:30:00Z",
    "sources": [
      "bet log"
    ]
  },
  "summary": "ROI by sport as CSV: 2 rows.",
  "assumptions": [],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_518717293aa676623e5f7334",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

```http
POST https://api.askkelly.ai/v1/charts:export
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "chart": "{\"kcs\": 1, \"kind\": \"bars\", \"title\": \"ROI by sport\", \"data\": {\"key\": \"sport\", \"columns\": [{\"id\": \"sport\", \"type\": \"str\", \"label\": \"Sport\"}, {\"id\": \"roi\", \"type\": \"float\", \"label\": \"ROI\", \"unit\": \"roi\", \"format\": \"+.1%\"}, {\"id\": \"lo95\", \"type\": \"float\", \"unit\": \"roi\"}, {\"id\": \"hi95\", \"type\": \"float\", \"unit\": \"roi\"}, {\"id\": \"n_bets\", \"type\": \"int\", \"label\": \"Bets\"}], \"rows\": [{\"sport\": \"NFL\", \"roi\": 0.041, \"lo95\": -0.012, \"hi95\": 0.094, \"n_bets\": 410}, {\"sport\": \"NBA\", \"roi\": -0.022, \"lo95\": -0.081, \"hi95\": 0.037, \"n_bets\": 330}]}, \"x\": {\"field\": \"roi\", \"type\": \"quantitative\", \"title\": \"ROI\"}, \"y\": {\"field\": \"sport\", \"type\": \"nominal\"}, \"series\": [{\"field\": \"roi\", \"role\": \"market\", \"label\": \"ROI\"}], \"intervals\": [{\"low\": \"lo95\", \"high\": \"hi95\", \"level\": 0.95}], \"rules\": [{\"x\": 0, \"role\": \"break_even\", \"label\": \"Break-even\"}], \"count\": \"n_bets\", \"summary\": \"NFL +4.1% over 410 bets and NBA -2.2% over 330; neither can be told from luck yet.\", \"provenance\": {\"tool\": \"get_my_results\", \"engine\": \"results 2\", \"as_of\": \"2026-10-04T17:30:00Z\", \"sources\": [\"bet log\"]}}",
  "format": "pdf"
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "code": "invalid_request",
  "detail": "format: 'pdf' is not one of ['vega_lite', 'csv', 'python', 'r', 'spec']",
  "param": "format",
  "doc_url": "https://docs.askkelly.ai/problems/invalid_request",
  "request_id": "req_521f14c947cee75e1599fd24",
  "retryable": false,
  "display_message": "Something in that request was not understood."
}
```

```http
POST https://api.askkelly.ai/v1/charts:export
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "chart": "{\"kcs\": 1, \"kind\": \"bars\", \"title\": \"ROI by sport\", \"data\": {\"key\": \"sport\", \"columns\": [{\"id\": \"sport\", \"type\": \"str\", \"label\": \"Sport\"}, {\"id\": \"roi\", \"type\": \"float\", \"label\": \"ROI\", \"unit\": \"roi\", \"format\": \"+.1%\"}, {\"id\": \"lo95\", \"type\": \"float\", \"unit\": \"roi\"}, {\"id\": \"hi95\", \"type\": \"float\", \"unit\": \"roi\"}, {\"id\": \"n_bets\", \"type\": \"int\", \"label\": \"Bets\"}], \"rows\": [{\"sport\": \"NFL\", \"roi\": 0.041, \"lo95\": -0.012, \"hi95\": 0.094, \"n_bets\": 410}, {\"sport\": \"NBA\", \"roi\": -0.022, \"lo95\": -0.081, \"hi95\": 0.037, \"n_bets\": 330}]}, \"x\": {\"field\": \"roi\", \"type\": \"quantitative\", \"title\": \"ROI\"}, \"y\": {\"field\": \"sport\", \"type\": \"nominal\"}, \"series\": [{\"field\": \"roi\", \"role\": \"market\", \"label\": \"ROI\"}], \"intervals\": [{\"low\": \"lo95\", \"high\": \"hi95\", \"level\": 0.95}], \"rules\": [{\"x\": 0, \"role\": \"break_even\", \"label\": \"Break-even\"}], \"count\": \"n_bets\", \"summary\": \"NFL +4.1% over 410 bets and NBA -2.2% over 330; neither can be told from luck yet.\", \"provenance\": {\"tool\": \"get_my_results\", \"engine\": \"results 2\", \"as_of\": \"2026-10-04T17:30:00Z\", \"sources\": [\"bet log\"]}}",
  "format": "python"
}
```

```json
{
  "object": "chart_export",
  "format": "python",
  "media_type": "text/x-python",
  "filename": "roi-by-sport.py",
  "text": "# ROI by sport\n# Kelly chart (bars, KCS 1) from get_my_results, engine results 2, as of 2026-10-04T17:30:00Z\n# Sources: bet log\n# NFL +4.1% over 410 bets and NBA -2.2% over 330; neither can be told from luck yet.\nimport json\n\nimport altair as alt\nimport pandas as pd\n\nrows = json.loads('[{\"sport\": \"NFL\", \"roi\": 0.041, \"lo95\": -0.012, \"hi95\": 0.094, \"n_bets\": 410}, {\"sport\": \"NBA\", \"roi\": -0.022, \"lo95\": -0.081, \"hi95\": 0.037, \"n_bets\": 330}]')\ndf = pd.DataFrame.from_records(rows)\nspec = json.loads('{\\n \"$schema\": \"https://vega.github.io/schema/vega-lite/v5.json\",\\n \"title\": {\\n  \"text\": \"ROI by sport\"\\n },\\n \"description\": \"NFL +4.1% over 410 bets and NBA -2.2% over 330; neither can be told from luck yet.\",\\n \"usermeta\": {\\n  \"kelly\": {\\n   \"kcs\": 1,\\n   \"kind\": \"bars\",\\n   \"provenance\": {\\n    \"tool\": \"get_my_results\",\\n    \"engine\": \"results 2\",\\n    \"as_of\": \"2026-10-04T17:30:00Z\",\\n    \"sources\": [\\n     \"bet log\"\\n    ]\\n   },\\n   \"rights\": {\\n    \"export_rows\": true,\\n    \"export_columns_blocked\": []\\n   }\\n  }\\n },\\n \"layer\": [\\n  {\\n   \"mark\": {\\n    \"type\": \"rule\",\\n    \"color\": \"#2f62b3\",\\n    \"strokeWidth\": 2\\n   },\\n   \"encoding\": {\\n    \"y\": {\\n     \"field\": \"sport\",\\n     \"type\": \"nominal\",\\n     \"sort\": null\\n    },\\n    \"x\": {\\n     \"field\": \"lo95\",\\n     \"type\": \"quantitative\",\\n     \"title\": \"ROI\",\\n     \"scale\": {\\n      \"zero\": false\\n     }\\n    },\\n    \"x2\": {\\n     \"field\": \"hi95\"\\n    }\\n   }\\n  },\\n  {\\n   \"mark\": {\\n    \"type\": \"rule\",\\n    \"color\": \"#14171c\",\\n    \"strokeDash\": [\\n     4,\\n     3\\n    ],\\n    \"strokeWidth\": 1\\n   },\\n   \"encoding\": {\\n    \"x\": {\\n     \"datum\": 0.0,\\n     \"type\": \"quantitative\"\\n    }\\n   }\\n  },\\n  {\\n   \"transform\": [\\n    {\\n     \"filter\": {\\n      \"field\": \"roi\",\\n      \"valid\": true\\n     }\\n    },\\n    {\\n     \"fold\": [\\n      \"roi\"\\n     ],\\n     \"as\": [\\n      \"_series\",\\n      \"_value\"\\n     ]\\n    }\\n   ],\\n   \"mark\": {\\n    \"type\": \"bar\"\\n   },\\n   \"encoding\": {\\n    \"x\": {\\n     \"field\": \"_value\",\\n     \"type\": \"quantitative\",\\n     \"title\": \"ROI\",\\n     \"scale\": {\\n      \"zero\": false\\n     }\\n    },\\n    \"y\": {\\n     \"field\": \"sport\",\\n     \"type\": \"nominal\",\\n     \"sort\": null\\n    },\\n    \"color\": {\\n     \"field\": \"_series\",\\n     \"type\": \"nominal\",\\n     \"scale\": {\\n      \"domain\": [\\n       \"roi\"\\n      ],\\n      \"range\": [\\n       \"#2f62b3\"\\n      ]\\n     },\\n     \"legend\": {\\n      \"title\": null,\\n      \"labelExpr\": \"{\\\\\"roi\\\\\": \\\\\"ROI\\\\\"}[datum.label]\"\\n     }\\n    }\\n   }\\n  }\\n ]\\n}')\nchart = alt.Chart.from_dict({**spec, \"data\": {\"values\": rows}})\nchart\n",
  "kind": "bars",
  "title": "ROI by sport",
  "rows": 2,
  "columns_removed": [],
  "provenance": {
    "tool": "get_my_results",
    "engine": "results 2",
    "as_of": "2026-10-04T17:30:00Z",
    "sources": [
      "bet log"
    ]
  },
  "summary": "ROI by sport as Python (pandas + Altair): 2 rows.",
  "assumptions": [],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_9984d73cccd12e8e049a4a5e",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`POST /v1/rules:compare_source`

## Compare a rule with its source's record
public, no key needed · 1 credit, not charged during the beta · MCP tool `compare_rule_to_source` · status live

A betting rule imported from another tool, tested as test_rule tests it, beside the record the source reported (a pasted results table, a list of games or a stated record), game by game: a status (reproduced, close or differs), the records side by side, the source's own games regraded by Kelly, the record since the import date, each reason a game differs with its count, and every differing game with both lines (backtester T9b). The source's figures are as reported; never a pick or a ranking.

### Parameters
Body, `application/json` (required):

- `formula` string  
  The rule: a formula true or false on each team-game (or each runner in a race, for horse_racing, greyhounds and harness), starting with =.  
  min length 2 · max length 2000
- `competition` string  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...; racing: horse_racing, greyhounds or harness (seasons are calendar years).  
  pattern ^[a-z0-9_]{2,24}$
- `seasons` array of string  
  Seasons to test, oldest first (1 to 25), e.g. ["2021", "2022"]; or use from_season and to_season.  
  min items 1 · max items 25
- `from_season` string  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `side` string  
  rule (default) bets the team the rule matched; fade bets the other side.  
  One of: `rule`, `fade` (open: new values may be added).
- `bet_moment` string  
  close (default), edition (football: the weekly sheet's Monday 10 AM ET line) or day_before (other sports: 24 hours before the start).  
  One of: `close`, `edition`, `day_before` (open: new values may be added).
- `season_type` string  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).
- `stake` string  
  risk (default): 1 unit risked a bet; to_win: each bet sized to win 1 unit.  
  One of: `risk`, `to_win` (open: new values may be added).
- `price` string  
  consensus (default): Kelly's price at the bet moment; flat_110: every bet at -110.  
  One of: `consensus`, `flat_110` (open: new values may be added).
- `warm_up` string  
  as_written (default) grades every bet; require_full grades only bets whose windows had all the earlier games they read (ROLLING_AVG(margin, 5) needs 5).  
  One of: `as_written`, `require_full` (open: new values may be added).
- `market` string  
  spread (default), moneyline, over or under.  
  One of: `spread`, `moneyline`, `over`, `under` (open: new values may be added).
- `source_text` string  
  The source's results table as pasted (CSV, tab-separated, or JSON: a list of games or an import draft's source_record), with headings such as Date, Team, Opponent, Site, Line, Result, Units; or its record alone (42-30-3, +9.4 units, 11.2% ROI).  
  min length 1 · max length 5000000
- `since` string  
  The import date (YYYY-MM-DD): the record from it on is the rule's clean test.  
  format date

### Response
`200` The rule proof facts.

- `object` const · required  
  Always rule_proof.  
  Always `"rule_proof"`.
- `status` string · required  
  reproduced (nothing differs), close (every difference has a known cause) or differs (at least one has none).  
  One of: `reproduced`, `close`, `differs` (open: new values may be added).
- `status_reason` string · required  
  The status in words.
- `records` object · required  
  The records side by side.
  - `source` object · required  
    The source's record, as reported.
    - `wins` integer · nullable  
      Wins.
    - `losses` integer · nullable  
      Losses.
    - `pushes` integer · nullable  
      Pushes.
    - `record` string · nullable  
      Wins-losses(-pushes).
    - `units` number · nullable  
      Units won or lost, 1 unit risked a bet unless the test said to_win.
    - `roi` number · nullable  
      Units over bets.
    - `as_reported` boolean  
      Always true: the source's own figures, not Kelly's.
  - `kelly` object · required  
    Kelly's test of the rule over the seasons asked.
    - `wins` integer · nullable  
      Wins.
    - `losses` integer · nullable  
      Losses.
    - `pushes` integer · nullable  
      Pushes.
    - `record` string · nullable  
      Wins-losses(-pushes).
    - `units` number · nullable  
      Units won or lost, 1 unit risked a bet unless the test said to_win.
    - `roi` number · nullable  
      Units over bets.
  - `kelly_in_source_window` object · nullable  
    Kelly's test between the source's first and last games.
    - `wins` integer · nullable  
      Wins.
    - `losses` integer · nullable  
      Losses.
    - `pushes` integer · nullable  
      Pushes.
    - `record` string · nullable  
      Wins-losses(-pushes).
    - `units` number · nullable  
      Units won or lost, 1 unit risked a bet unless the test said to_win.
    - `roi` number · nullable  
      Units over bets.
    - `from` string · nullable  
      First date.
    - `to` string · nullable  
      Last date.
  - `source_games_regraded` object · nullable  
    The source's own games graded by Kelly at the bet moment, whatever the rule says: a check of the source's record itself.
    - `wins` integer · nullable  
      Wins.
    - `losses` integer · nullable  
      Losses.
    - `pushes` integer · nullable  
      Pushes.
    - `record` string · nullable  
      Wins-losses(-pushes).
    - `units` number · nullable  
      Units won or lost, 1 unit risked a bet unless the test said to_win.
    - `roi` number · nullable  
      Units over bets.
    - `games` integer  
      Games matched to Kelly's.
    - `no_line` integer  
      Of them, games with no Kelly line.
    - `moment` string  
      The bet moment graded.
  - `since_import` object · nullable  
    Kelly's test from the import date on: the rule's clean record (I1).
    - `wins` integer · nullable  
      Wins.
    - `losses` integer · nullable  
      Losses.
    - `pushes` integer · nullable  
      Pushes.
    - `record` string · nullable  
      Wins-losses(-pushes).
    - `units` number · nullable  
      Units won or lost, 1 unit risked a bet unless the test said to_win.
    - `roi` number · nullable  
      Units over bets.
    - `since` string  
      The import date.
- `games` object · nullable  
  Counts: source, kelly, both, same, source_only, kelly_only, result_differs, outside.
- `reasons` array of object · required  
  Each reason found, in a fixed order (never sorted by count).
  - `code` string · required  
    The reason.  
    One of: `other_line`, `push_rule`, `no_line`, `missing_stat`, `no_game`, `both_sides`, `short_window`, `void`, `outside_seasons`, `outside_source_window`, `condition`, `not_in_source`, `other_side`, `result_differs`, `team_unread` (open: new values may be added).
  - `label` string · required  
    The reason in words.
  - `explained` boolean · required  
    A known cause (another line, a push rule, a data gap, a window); false when the import itself may be wrong.
  - `count` integer · required  
    Games.
- `rows` array of object · required  
  Games that differ, by date (first 200).
  - `date` string · required · nullable  
    The game's date (YYYY-MM-DD).
  - `in` string · required  
    source (only the source bet it), kelly (only Kelly's test did) or both (results differ).  
    One of: `source`, `kelly`, `both` (open: new values may be added).
  - `reason` string · required  
    The reason's code (reasons[].code).
  - `detail` string · required  
    Why, in words, with both lines when a line is the cause.
  - `source` object · nullable  
    The source's game as it listed it.
    - `team` string · nullable  
      The team, the source's words.
    - `opponent` string · nullable  
      The opponent, the source's words.
    - `home` boolean · nullable  
      Home (true), away (false), neutral or not said (null).
    - `line` number · nullable  
      The source's line.
    - `result` string · nullable  
      win, loss or push, as reported.
    - `units` number · nullable  
      The source's units for the game, as reported.
    - `text` string · nullable  
      The row as the source wrote it.
  - `kelly` object · nullable  
    Kelly's bet or game.
- `rows_count` integer · required  
  Games that differ, all of them.
- `deltas` object · nullable  
  A record-only comparison: Kelly minus the source, for wins, losses, pushes and units.
- `test` object  
  Kelly's test of the rule: overall and the verdict's headline (test_rule has the full report).
- `source_read` object · nullable  
  How the source's list was read: rows, rows left out and why, the headings used, the stated record against the games' own count.
- `rule` object  
  The rule and options tested.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `notice` string · required  
  This compares an import with its source's reported record; private, never a pick.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`rule_not_testable`](/problems/rule_not_testable) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout)

### Example
```http
POST https://api.askkelly.ai/v1/rules:compare_source
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "formula": "=home",
  "competition": "nba",
  "seasons": [
    "2025-26"
  ],
  "source_text": "1-0, +0.9 units"
}
```

```json
{
  "object": "rule_proof",
  "rule": {
    "formula": "=home",
    "competition": "nba",
    "market": "spread",
    "side": "rule",
    "bet_moment": "close",
    "seasons": [
      "2025-26"
    ],
    "season_type": "regular",
    "stake": "risk",
    "price": "consensus",
    "base_formula": null,
    "reads": [
      {
        "name": "home",
        "known": "pregame",
        "windowed": false
      }
    ]
  },
  "records": {
    "source": {
      "wins": 1,
      "losses": 0,
      "pushes": 0,
      "units": 0.9,
      "roi": 0.9,
      "as_reported": true
    },
    "kelly": {
      "wins": 1,
      "losses": 0,
      "pushes": 0,
      "record": "1-0",
      "units": 0.91,
      "roi": 0.91
    }
  },
  "test": {
    "overall": {
      "wins": 1,
      "losses": 0,
      "pushes": 0,
      "bets": 1,
      "decisions": 1,
      "record": "1-0",
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "roi_interval": [
        -0.6054908095394765,
        0.9099999999999999
      ],
      "win_rate": 1,
      "break_even": 0.5235602094240838,
      "over_break_even": 0.47643979057591623,
      "significance": {
        "p_value": 0.5235602094240838,
        "no_skill_match_per_100": 52.35602094240838,
        "coin_match_per_100": 50,
        "z": 0.9539392014169455,
        "significant": false,
        "alpha": 0.05,
        "multiple_comparisons": null,
        "anytime_valid": {
          "e_value": 1.0580125,
          "p_value": 0.9451684171973394,
          "max_e": 1.0580125,
          "method": "kelly_betting_mixture",
          "kelly_fraction": 0.5,
          "crossed": false,
          "roi_cs95": [
            -0.999045,
            0.9090450000000001
          ]
        },
        "method": "exact_binomial",
        "t_stat": null,
        "p_value_exact": 0.5235602094240838,
        "p_value_clustered": 0.17005720935900537,
        "p_value_vs_vig": null,
        "null": "break_even",
        "sims": null,
        "seed": null,
        "p_adjusted": 0.5235602094240838,
        "adjust_method": "none",
        "tests": 1,
        "tests_effective": 1,
        "reality_check_p": null,
        "spa_p": null,
        "clears_t3": false,
        "haircut": null,
        "haircut_roi": null
      },
      "sample_needed": null,
      "few_decisions": true,
      "small_sample": true,
      "formulas": [
        "F3.2@1",
        "F12.1@1",
        "F12.3@1",
        "F12.4@1",
        "F36.2@1"
      ],
      "warnings": [
        "fixed_n_p_value",
        "small_sample"
      ],
      "roi_ci": {
        "method": "score",
        "level": 0.95,
        "score": [
          -0.6054908095394765,
          0.9099999999999999
        ],
        "bca": null,
        "block_bootstrap": null,
        "anytime_valid": [
          -0.999045,
          0.9090450000000001
        ],
        "iid_score": [
          -0.6054908095394765,
          0.9099999999999999
        ]
      },
      "roi_ci95": [
        -0.6054908095394765,
        0.9099999999999999
      ],
      "units_ci95": [
        -0.6054908095394765,
        0.9099999999999999
      ],
      "deflated": {
        "sharpe_per_bet": null,
        "skew": null,
        "kurtosis": null,
        "psr": null,
        "dsr": null,
        "sharpe_expected_max": null,
        "roi_bar": null,
        "trials_effective": 1,
        "sample_needed": null,
        "sample_needed_single": null,
        "sample_needed_power80": null,
        "sample_needed_plan": null
      }
    },
    "verdict": "Too few bets to judge"
  },
  "as_of": "2026-11-06T00:00:00Z",
  "assumptions": [
    "Each bet is taken at Kelly's consensus close price; games Kelly holds no close line for are left out (2).",
    "Games where the rule matched both teams are left out (0).",
    "One flat unit risked a bet."
  ],
  "notice": "This compares your import with the record its source reported. It is private to you; it isn't a pick and doesn't rank anyone.",
  "status": "reproduced",
  "deltas": {
    "wins": 0,
    "losses": 0,
    "pushes": 0,
    "units": 0.01
  },
  "games": null,
  "reasons": [],
  "rows": [],
  "rows_count": 0,
  "status_reason": "Kelly's record matches the source's.",
  "source_read": {
    "games": 0,
    "skipped_count": 0,
    "skipped": [],
    "columns": {},
    "stated": {
      "wins": 1,
      "losses": 0,
      "pushes": 0,
      "units": 0.9
    },
    "from_games": null,
    "list_and_record_agree": null
  },
  "summary": "Reproduced: Kelly's test 1-0, +0.9 units; the source reported 1-0, +0.9 units.",
  "has_more": false,
  "next_cursor": null,
  "source": "kelly",
  "attribution": null,
  "request_id": "req_7679266df624114290c90502",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

`POST /v1/rules:test_portfolio`

## Test betting rules together
public, no key needed · 1 credit, not charged during the beta · MCP tool `test_portfolio` · status live

Up to ten betting rules tested on the same seasons as one book (backtester T4, F38): for every two rules the bets they share, the games where they take opposite sides, and the correlation of their daily units; one combined ledger with shared bets staked once (or stacked) and opposite sides netted (or both bet), weighted equally, by inverse volatility or for equal risk; the combined record with its own verdict and p-value counting every member's rules tried, ruin, staking plans and risk-adjusted stats. Never a search over combinations.

### Parameters
Body, `application/json` (required):

- `formulas` array of string  
  The rules, 1 to 10: each a formula true or false on a team-game, starting with =.  
  min items 1 · max items 10
- `markets` array of string  
  Each rule's market (spread, moneyline, over, under), in the order of formulas; one value applies to all (default spread).  
  min items 1 · max items 10
- `sides` array of string  
  Each rule's side (rule or fade), in order; one value applies to all (default rule).  
  min items 1 · max items 10
- `bet_moments` array of string  
  Each rule's bet moment (close or edition), in order; one value applies to all.  
  min items 1 · max items 10
- `labels` array of string  
  A short name for each rule, in order (default r1, r2, ...).  
  min items 1 · max items 10
- `rules_tried` array of integer  
  Rules tried for each rule, in order (default 1 each); the combined p-value counts them all.  
  min items 1 · max items 10
- `competition` string  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...  
  pattern ^[a-z0-9_]{2,24}$
- `seasons` array of string  
  Seasons to test, oldest first (1 to 25); or use from_season and to_season.  
  min items 1 · max items 25
- `from_season` string  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `season_type` string  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).
- `stake` string  
  risk (default): 1 unit risked a bet; to_win: each bet sized to win 1 unit.  
  One of: `risk`, `to_win` (open: new values may be added).
- `price` string  
  consensus (default) or flat_110.  
  One of: `consensus`, `flat_110` (open: new values may be added).
- `weighting` string  
  equal (default), inverse_vol or equal_risk.  
  One of: `equal`, `inverse_vol`, `equal_risk` (open: new values may be added).
- `duplicates` string  
  dedupe (default): a bet two rules share is staked once; stack: once a rule.  
  One of: `dedupe`, `stack` (open: new values may be added).
- `opposing` string  
  net (default): opposite sides of a game cancel; both: both are bet.  
  One of: `net`, `both` (open: new values may be added).
- `detail` string  
  full (default) or summary (no bets list or bankroll curve).  
  One of: `full`, `summary` (open: new values may be added).
- `bankroll_units` number  
  Bankroll in units for the ruin chance and the staking replays (default 100).  
  max 1000000
- `ruin_share` number  
  Share of the bankroll whose loss counts as ruin (default 0.5; 1 = all of it).  
  max 1
- `horizon_bets` integer  
  Bets ahead the ruin chance looks (default 500).  
  min 1 · max 1000
- `paths` integer  
  Simulated futures for the ruin chance (default 5000).  
  min 1000 · max 10000
- `staking_plans` array of string  
  Staking plans to replay: flat, to_win, percent, kelly (default all four).  
  min items 1 · max items 4
- `percent` number  
  Share of the bankroll the percent plan bets (default 0.02).  
  max 0.5
- `kelly_fraction` number  
  Multiple of the Kelly criterion the kelly plan bets; omitted, the honest multiple from the record's sample size.  
  max 1
- `kelly_cap` number  
  Most of the bankroll the kelly plan puts on one bet (default 0.05).  
  max 1

### Response
`200` The rule portfolio facts.

- `object` const · required  
  Always rule_portfolio.  
  Always `"rule_portfolio"`.
- `verdict` object · required  
  Verdict v2: the leak gate, nine checks in three groups and the headline.
  - `version` integer  
    2.
  - `headline` string · required  
    The verdict in words.
  - `gate` object  
    The leak gate: a rule reading anything not known at the bet moment is refused first; leak_test is the cut-data rerun's status (clean or not_run).
  - `held_back_by` array of string  
    Why a rule with no failed check isn't holds_up (honest forward ROI at or under 0, PBO over 0.5 across 10 or more variants).
  - `level` string · required  
    too_few, no_profit, no_evidence, luck, promising or holds_up.  
    One of: `too_few`, `no_profit`, `no_evidence`, `luck`, `promising`, `holds_up` (open: new values may be added).
  - `passed` integer · required  
    Checks passed.
  - `applicable` integer · required  
    Checks that apply.
  - `checks` array of object · required  
    The checks, in a fixed order.
    - `key` string · required  
      The check; a teaser keeps v1's six (newest_30, seasons_won, price_worse among them).  
      One of: `enough_bets`, `not_luck`, `beats_base`, `half_point_worse`, `nearby_holds`, `not_concentrated`, `beats_close`, `still_working`, `since_saved`, `calibrated`, `newest_30`, `seasons_won`, `price_worse` (open: new values may be added).
    - `group` string  
      real (is it real?), pressure or still_working; not on a teaser's checks.  
      One of: `real`, `pressure`, `still_working` (open: new values may be added).
    - `label` string · required  
      The check, in words.
    - `status` string · required  
      pass, fail or na (it can't apply).  
      One of: `pass`, `fail`, `na` (open: new values may be added).
    - `zone` string  
      green, yellow (within one standard error of the threshold), red, or na.  
      One of: `green`, `yellow`, `red`, `na` (open: new values may be added).
    - `value` string · required  
      The figure behind it, in words.
    - `statistic` number | integer · nullable  
      The number the check compares.
    - `threshold` number | integer · nullable  
      What it is compared with.
    - `basis` string  
      seasons_won or newest_30 while the full check is still being built; points when Beats the close is judged on points beaten (audit F3).
- `combined` object · required  
  The combined ledger: record, units, ROI, the record test with tests = every member's rules tried, max drawdown, and how shared and opposite bets were handled.
  - `record` string  
    Wins-losses(-pushes).
  - `units` number · nullable  
    Units at the weights.
  - `roi` number · nullable  
    Units over units risked.
  - `tests` integer  
    Every member's rules tried.
  - `max_drawdown_units` number  
    Worst peak-to-trough drop, units.
  - `netted_games` integer  
    Games where opposite sides met.
- `members` array of object · required  
  Each rule, in the order given.
  - `rule` string  
    Its label.
  - `formula` string  
    Its formula.
  - `market` string  
    Its market.
  - `record` string  
    Wins-losses(-pushes).
  - `units` number · nullable  
    Units.
  - `roi` number · nullable  
    ROI.
  - `level` string  
    Its own verdict level.
  - `tests` integer  
    Rules tried for it.
- `pairs` array of object · required  
  Every two rules, in the order given.
  - `a` string  
    The first rule's label.
  - `b` string  
    The second rule's label.
  - `shared_bets` integer  
    Bets both take: same game, market and side.
  - `jaccard` number · nullable  
    Shared bets over the bets either takes.
  - `opposing_games` integer  
    Games where they take opposite sides of the same market.
  - `daily_corr` number · nullable  
    Correlation of their daily units, days either bets (zero-filled).
  - `daily_corr_shared_days` number · nullable  
    The same, on days both bet.
  - `shared_days` integer  
    Days both bet.
- `weights` array of object  
  Weights, mean 1.
- `risk_contributions` array of object · nullable  
  Shares of risk, summing to 1.
- `diversification_ratio` number · nullable  
  Σ w·σ over the book's σ, daily units.
- `effective_rules` number · nullable  
  (Σλ)²/Σλ² over the correlation matrix's eigenvalues.
- `weighting` string  
  equal, inverse_vol or equal_risk.
- `duplicates` string  
  dedupe or stack.
- `opposing` string  
  net or both.
- `risk` object  
  Risk of ruin (F36, kmath.backtest.rule_ruin): the chance of losing ruin_share of the bankroll within horizon_bets bets betting like the record, with its win rate taken as exact and allowing for its sample (a Beta posterior draw a path); the Lundberg bound; the bankroll curve.
  - `bankroll_units` number  
    Bankroll in units.
  - `ruin_share` number  
    Share of the bankroll whose loss counts as ruin.
  - `horizon_bets` integer  
    Bets ahead.
  - `ruin_if_rate_exact` number · nullable  
    Ruin chance if the record's win rate were exact.
  - `ruin_allowing_error` number · nullable  
    Ruin chance allowing for how little the record's sample tells.
  - `estimation_premium` number · nullable  
    The second less the first.
  - `lose_all_ever` number · nullable  
    Lundberg bound on ever losing the whole bankroll at the exact rate.
  - `lose_all_ever_allowing_error` number · nullable  
    The same, averaged over the win rate's posterior.
  - `drawdown_p95_units` number · nullable  
    95th percentile of the worst drop over the horizon, units.
  - `down_after_horizon` number · nullable  
    Chance of being down after the horizon.
  - `bankroll_for_ruin_005_units` number · nullable  
    Smallest bankroll whose ruin chance is at most 0.05.
  - `curve` array of object · nullable  
    Ruin chance by bankroll size; null at detail summary.
  - `status` string  
    ok, or too_few (under 30 decisions: closed form only).  
    One of: `ok`, `too_few` (open: new values may be added).
- `staking_plans` object  
  Staking plans replayed over the real bet order (F37, kmath.backtest.staking_replay). The Kelly criterion's fractions and the kelly plan are stake mode: on askkelly.ai only, for a signed-in, attested person; elsewhere null with withheld (D34).
  - `kelly` object  
    The Kelly criterion at the record's win rate and mean price, the Baker-McHale multiple for its sample size and the fraction bet.
    - `full_fraction` number · nullable  
      Full Kelly criterion (stake mode; null off askkelly.ai).
    - `shrink` number · nullable  
      The shrink for the sample size.
    - `honest_fraction` number · nullable  
      The fraction bet: shrink × full, capped; 0 unless the verdict is promising or holds up (stake mode; null off askkelly.ai).
    - `withheld` string  
      Why the stake-mode figures are null.  
      One of: `stake_first_party_only` (open: new values may be added).
  - `plans` array of object  
    Each plan asked for, in the order asked.
    - `plan` string  
      flat, to_win, percent or kelly.  
      One of: `flat`, `to_win`, `percent`, `kelly` (open: new values may be added).
- `risk_adjusted` object  
  Risk-adjusted stats per unit risked (F40, kmath.backtest.risk_adjusted), with 95% intervals from a day-block bootstrap; at detail summary only sharpe_per_bet and profit_factor.
  - `sharpe_per_bet` number · nullable  
    Mean return over its standard deviation, a bet.
  - `profit_factor` number · nullable  
    Units won over units lost (null with no losing bet).
- `seasons` array of object  
  Seasons in calendar order.
- `bets` array of object  
  The combined book in date order (left out at detail summary).
- `rule` object  
  The options the rules were tested with.
- `notice` string · required  
  This tests rules on past games; it isn't a pick.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`rule_not_testable`](/problems/rule_not_testable) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout)

### Example
```http
POST https://api.askkelly.ai/v1/rules:test_portfolio
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "formulas": [
    "=home",
    "=home"
  ],
  "sides": [
    "rule",
    "fade"
  ],
  "competition": "nba",
  "seasons": [
    "2025-26"
  ],
  "detail": "summary"
}
```

```json
{
  "object": "rule_portfolio",
  "verdict": {
    "version": 2,
    "headline": "No bets",
    "level": "too_few",
    "passed": 0,
    "applicable": 0,
    "gate": {
      "key": "no_look_ahead",
      "status": "pass",
      "value": "every value the rule reads is known at the bet moment"
    },
    "checks": []
  },
  "combined": {
    "record": "0-0",
    "wins": 0,
    "losses": 0,
    "pushes": 0,
    "bets": 0,
    "decisions": 0,
    "units": 0,
    "roi": null,
    "win_rate": null,
    "break_even": null,
    "significance": null,
    "max_drawdown_units": 0,
    "longest_losing_run": 0,
    "tests": 5,
    "deduped": 0,
    "stacked": 0,
    "netted_games": 1
  },
  "members": [
    {
      "rule": "r1",
      "formula": "=home",
      "market": "spread",
      "side": "rule",
      "bet_moment": "close",
      "record": "1-0",
      "decisions": 1,
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "level": "too_few",
      "tests": 2
    },
    {
      "rule": "r2",
      "formula": "=home",
      "market": "spread",
      "side": "fade",
      "bet_moment": "close",
      "record": "0-1",
      "decisions": 1,
      "units": -1,
      "roi": -1,
      "level": "too_few",
      "tests": 3
    }
  ],
  "pairs": [
    {
      "a": "r1",
      "b": "r2",
      "shared_bets": 0,
      "jaccard": 0,
      "opposing_games": 1,
      "daily_corr": null,
      "daily_corr_shared_days": null,
      "shared_days": 1
    }
  ],
  "weighting": "equal",
  "duplicates": "dedupe",
  "opposing": "net",
  "weights": [
    {
      "rule": "r1",
      "weight": 1
    },
    {
      "rule": "r2",
      "weight": 1
    }
  ],
  "risk_contributions": null,
  "diversification_ratio": null,
  "effective_rules": null,
  "seasons": [],
  "rule": {
    "competition": "nba",
    "seasons": [
      "2025-26"
    ],
    "season_type": "regular",
    "stake": "risk",
    "price": "consensus"
  },
  "as_of": "2026-11-06T00:00:00Z",
  "notice": "This tests your rules together on past games. It isn't a pick and doesn't rank selections.",
  "risk": {
    "staking": "flat",
    "stake_fraction": null,
    "bankroll_units": 100,
    "ruin_share": 0.5,
    "horizon_bets": 500,
    "paths": 5000,
    "seed": 6437125516759677,
    "lose_all_ever": null,
    "lose_all_ever_allowing_error": null,
    "ruin_ever_if_rate_exact": null,
    "ruin_if_rate_exact": null,
    "ruin_allowing_error": null,
    "estimation_premium": null,
    "drawdown_p95_units": null,
    "drawdown_p95": null,
    "down_after_horizon": null,
    "bankroll_for_ruin_005_units": null,
    "curve": null,
    "status": "too_few",
    "method": "lundberg+posterior_monte_carlo",
    "warnings": [
      "too_few_decisions"
    ],
    "percent": {
      "stake_fraction": 0.02,
      "ruin_if_rate_exact": null,
      "ruin_allowing_error": null,
      "drawdown_p95": null,
      "status": "too_few"
    }
  },
  "staking_plans": {
    "bankroll_units": 100,
    "percent": 0.02,
    "kelly_cap": 0.05,
    "kelly": {
      "win_rate": null,
      "push_rate": 0,
      "full_fraction": null,
      "shrink": null,
      "multiplier": null,
      "honest_fraction": null,
      "capped": null,
      "simultaneous": false,
      "basis": "record",
      "multiplier_rule": "honest",
      "withheld": "stake_first_party_only"
    },
    "plans": [
      {
        "plan": "flat",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 0,
        "end_bankroll_units": 100,
        "units": 0,
        "max_drawdown": 0,
        "growth_per_bet": null,
        "roi": null
      },
      {
        "plan": "to_win",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 0,
        "end_bankroll_units": 100,
        "units": 0,
        "max_drawdown": 0,
        "growth_per_bet": null,
        "roi": null
      },
      {
        "plan": "percent",
        "status": "ok",
        "stopped_at_bet": null,
        "bets": 0,
        "end_bankroll_units": 100,
        "units": 0,
        "max_drawdown": 0,
        "growth_per_bet": null,
        "roi": null
      },
      {
        "plan": "kelly",
        "status": "withheld",
        "withheld": "stake_first_party_only"
      }
    ],
    "warnings": [
      "small_sample"
    ]
  },
  "risk_adjusted": {
    "sharpe_per_bet": null,
    "profit_factor": null,
    "warnings": [
      "no_bets"
    ]
  },
  "summary": "The (2) rules matched no game Kelly holds a line for.",
  "assumptions": [
    "Bets shared by rules are staked once; opposite sides of a game are netted.",
    "Weights: equal.",
    "The p-value counts every member's rules tried (5)."
  ],
  "has_more": false,
  "next_cursor": null,
  "source": "kelly",
  "attribution": null,
  "request_id": "req_a914a84cdf6b903fd164f76d",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

`GET /v1/rules/templates`

## List system templates
public, no key needed · 0 credits, not charged during the beta · MCP tool `list_rule_templates` · status live

Kelly's system templates: well-known public betting angles as rule formulas, each with its competition, market, side, what it does, the idea behind it and the inputs a person may change. In the library's order, never ranked; a template's record comes from POST /v1/rules:test.

### Parameters
- `competition` string · query  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...  
  pattern ^[a-z0-9_]{2,24}$
- `market` string · query  
  Only templates on this market.  
  One of: `spread`, `moneyline`, `over`, `under`, `teaser` (open: new values may be added).
- `tag` string · query  
  Only templates with this tag (rest, underdog, playoffs, teaser...).  
  min length 1 · max length 40

### Response
`200` The rule templates facts.

- `object` const · required  
  Always rule_templates.  
  Always `"rule_templates"`.
- `templates` array of object · required  
  The templates that match the filters.
  - `id` string  
    Stable ID, e.g. nfl_home_underdog_after_bye.
  - `name` string  
    What it does, in a few words.
  - `competition` string  
    nfl, ncaaf, nba, ncaab, nhl...
  - `market` string  
    spread, moneyline, over, under or teaser.
  - `side` string  
    rule bets the matched team; fade bets the other side.
  - `season_type` string  
    regular, postseason or both.
  - `teaser` object · nullable  
    Teaser points and legs, for a teaser template.
  - `formula_template` string  
    The formula with each input as {name}.
  - `formula` string  
    The formula with the values in `values`.
  - `inputs` array of object  
    The inputs, in order.
    - `name` string  
      Its name, as in formula_template's {name}.
    - `label` string  
      What it is.
    - `default` number  
      The template's value.
    - `min` number  
      Smallest allowed.
    - `max` number  
      Largest allowed.
    - `step` number  
      Values move in these steps from min.
  - `values` object  
    Each input's value in `formula`.
  - `what_it_does` string  
    The bet, in one sentence.
  - `idea` string  
    The idea behind it; a public name or author is cited by name.
  - `notes` string · nullable  
    How the rule reads the data, when it matters.
  - `tags` array of string  
    Tags.
  - `source` object  
    What an import of it carries: kind template, tool kelly_template:<id>.
- `total` integer · required  
  How many.
- `competitions` array of string  
  Competitions with templates.
- `tags` array of string  
  Every tag in the library.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled)

### Example
```http
GET https://api.askkelly.ai/v1/rules/templates?competition=nba
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "rule_templates",
  "templates": [
    {
      "id": "nba_playoff_zig_zag",
      "name": "Playoff teams after a loss (zig-zag)",
      "competition": "nba",
      "market": "spread",
      "side": "rule",
      "season_type": "postseason",
      "teaser": null,
      "formula_template": "=LAG(result) = \"L\"",
      "formula": "=LAG(result) = \"L\"",
      "conditions": [
        {
          "label": "Lost the last playoff game",
          "formula": "LAG(result) = \"L\""
        }
      ],
      "inputs": [],
      "values": {},
      "what_it_does": "Bets a team against the spread in the playoff game after it lost a playoff game.",
      "idea": "Known in public betting writing as the zig-zag theory, an idea that a team adjusts after a loss within a series.",
      "notes": "Only playoff games are read, so a team's first playoff game never matches.",
      "tags": [
        "playoffs",
        "previous game"
      ],
      "source": {
        "kind": "template",
        "tool": "kelly_template:nba_playoff_zig_zag"
      }
    },
    {
      "id": "nba_rested_against_back_to_back",
      "name": "Rested teams against a team on a back-to-back",
      "competition": "nba",
      "market": "spread",
      "side": "rule",
      "season_type": "regular",
      "teaser": null,
      "formula_template": "=AND(NOT(back_to_back), opponent.back_to_back)",
      "formula": "=AND(NOT(back_to_back), opponent.back_to_back)",
      "conditions": [
        {
          "label": "Did not play the night before",
          "formula": "NOT(back_to_back)"
        },
        {
          "label": "The opponent played the night before",
          "formula": "opponent.back_to_back"
        }
      ],
      "inputs": [],
      "values": {},
      "what_it_does": "Bets a team against the spread when its opponent played the night before and it did not.",
      "idea": "The second night of a back-to-back is the most discussed fatigue spot in the NBA.",
      "notes": null,
      "tags": [
        "rest",
        "back-to-back"
      ],
      "source": {
        "kind": "template",
        "tool": "kelly_template:nba_rested_against_back_to_back"
      }
    },
    {
      "id": "nba_fourth_game_in_seven_days",
      "name": "Against teams on their fourth game in seven days",
      "competition": "nba",
      "market": "spread",
      "side": "fade",
      "season_type": "regular",
      "teaser": null,
      "formula_template": "=games_last_7_days >= {min_games}",
      "formula": "=games_last_7_days >= 4",
      "conditions": [
        {
          "label": "4 or more games in seven days, this one included",
          "formula": "games_last_7_days >= 4"
        }
      ],
      "inputs": [
        {
          "name": "min_games",
          "label": "Games in the last seven days counting this one",
          "default": 4,
          "min": 3,
          "max": 5,
          "step": 1
        }
      ],
      "values": {
        "min_games": 4
      },
      "what_it_does": "Bets against a team, against the spread, when this is its fourth game in seven days.",
      "idea": "A schedule-density angle; the count includes the game itself.",
      "notes": null,
      "tags": [
        "rest",
        "schedule",
        "fade"
      ],
      "source": {
        "kind": "template",
        "tool": "kelly_template:nba_fourth_game_in_seven_days"
      }
    },
    {
      "id": "nba_home_underdogs",
      "name": "NBA home underdogs",
      "competition": "nba",
      "market": "spread",
      "side": "rule",
      "season_type": "regular",
      "teaser": null,
      "formula_template": "=AND(home, spread_close >= {min_points})",
      "formula": "=AND(home, spread_close >= 0.5)",
      "conditions": [
        {
          "label": "At home",
          "formula": "home"
        },
        {
          "label": "Underdog by 0.5 or more",
          "formula": "spread_close >= 0.5"
        }
      ],
      "inputs": [
        {
          "name": "min_points",
          "label": "Smallest underdog line",
          "default": 0.5,
          "min": 0.5,
          "max": 20,
          "step": 0.5
        }
      ],
      "values": {
        "min_points": 0.5
      },
      "what_it_does": "Bets NBA home teams getting points against the spread.",
      "idea": "A long-discussed public angle; this tests it on Kelly's closing lines.",
      "notes": null,
      "tags": [
        "underdog",
        "home"
      ],
      "source": {
        "kind": "template",
        "tool": "kelly_template:nba_home_underdogs"
      }
    }
  ],
  "total": 4,
  "competitions": [
    "nba",
    "ncaab",
    "ncaaf",
    "nfl",
    "nhl"
  ],
  "tags": [
    "back-to-back",
    "blowout",
    "fade",
    "favourite",
    "home",
    "key numbers",
    "playoffs",
    "previous game",
    "rest",
    "road",
    "schedule",
    "streak",
    "teaser",
    "totals",
    "under",
    "underdog"
  ],
  "summary": "4 system templates for NBA, in the library's order (not ranked). Each is a starting point to test or import; its record comes from test_rule.",
  "assumptions": [
    "Templates are listed in the library's order, never by any record."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_29b1e40e81ce21a6c4979c70",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`POST /v1/rules/templates:fill`

## Fill in a system template
public, no key needed · 0 credits, not charged during the beta · MCP tool `fill_rule_template` · status live

One system template filled in with the inputs given (its defaults otherwise), optionally ANDed with the caller's own conditions, with the exact body for POST /v1/rules:test and the import arguments (source kind template).

### Parameters
Body, `application/json` (required):

- `template_id` string  
  The template's ID from list_rule_templates, e.g. nfl_home_underdog_after_bye.  
  pattern ^[a-z][a-z0-9_]{2,63}$
- `inputs` array of string  
  Values for the template's inputs, each name=number, e.g. ["min_points=3"]; each within its min and max, in its steps; the rest keep the template's defaults.  
  max items 10
- `and_formula` string  
  The person's own conditions ANDed with the template's, e.g. =NOT(home).  
  min length 1 · max length 1000
- `seasons` array of string  
  Seasons to put in test_rule_arguments, oldest first.  
  min items 1 · max items 25
- `from_season` string  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$

### Response
`200` The rule template facts.

- `object` const · required  
  Always rule_template.  
  Always `"rule_template"`.
- `template` object · required  
  One system template: a well-known public betting angle as a rule, named by what it does (I3).
  - `id` string  
    Stable ID, e.g. nfl_home_underdog_after_bye.
  - `name` string  
    What it does, in a few words.
  - `competition` string  
    nfl, ncaaf, nba, ncaab, nhl...
  - `market` string  
    spread, moneyline, over, under or teaser.
  - `side` string  
    rule bets the matched team; fade bets the other side.
  - `season_type` string  
    regular, postseason or both.
  - `teaser` object · nullable  
    Teaser points and legs, for a teaser template.
  - `formula_template` string  
    The formula with each input as {name}.
  - `formula` string  
    The formula with the values in `values`.
  - `inputs` array of object  
    The inputs, in order.
    - `name` string  
      Its name, as in formula_template's {name}.
    - `label` string  
      What it is.
    - `default` number  
      The template's value.
    - `min` number  
      Smallest allowed.
    - `max` number  
      Largest allowed.
    - `step` number  
      Values move in these steps from min.
  - `values` object  
    Each input's value in `formula`.
  - `what_it_does` string  
    The bet, in one sentence.
  - `idea` string  
    The idea behind it; a public name or author is cited by name.
  - `notes` string · nullable  
    How the rule reads the data, when it matters.
  - `tags` array of string  
    Tags.
  - `source` object  
    What an import of it carries: kind template, tool kelly_template:<id>.
- `test_rule_arguments` object · required  
  The body for POST /v1/rules:test (Kelly MCP's test_rule) as it is.
- `import_arguments` object  
  What to send to the import (source kind template).
- `next_call` object  
  The call that gives the template's record: test_rule.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`not_found`](/problems/not_found)

### Example
```http
POST https://api.askkelly.ai/v1/rules/templates:fill
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "template_id": "nfl_home_underdog_after_bye",
  "inputs": [
    "min_points=3"
  ],
  "from_season": "2021",
  "to_season": "2024"
}
```

```json
{
  "object": "rule_template",
  "template": {
    "id": "nfl_home_underdog_after_bye",
    "name": "Home underdogs after a bye week",
    "competition": "nfl",
    "market": "spread",
    "side": "rule",
    "season_type": "regular",
    "teaser": null,
    "formula_template": "=AND(home, spread_close >= {min_points}, rest_days >= {min_rest_days})",
    "formula": "=AND(home, spread_close >= 3, rest_days >= 13)",
    "conditions": [
      {
        "label": "At home",
        "formula": "home"
      },
      {
        "label": "Underdog by 3 or more",
        "formula": "spread_close >= 3"
      },
      {
        "label": "13 or more days since the last game",
        "formula": "rest_days >= 13"
      }
    ],
    "inputs": [
      {
        "name": "min_points",
        "label": "Smallest underdog line",
        "default": 0.5,
        "min": 0.5,
        "max": 14,
        "step": 0.5
      },
      {
        "name": "min_rest_days",
        "label": "Days since the team's last game",
        "default": 13,
        "min": 10,
        "max": 21,
        "step": 1
      }
    ],
    "values": {
      "min_points": 3,
      "min_rest_days": 13
    },
    "what_it_does": "Bets the home team against the spread when it is the underdog and had a week off before the game.",
    "idea": "An extra week to prepare, at home, with the market pricing the team as the underdog. A bye week is 13 or more days between games.",
    "notes": null,
    "tags": [
      "rest",
      "underdog",
      "home"
    ],
    "source": {
      "kind": "template",
      "tool": "kelly_template:nfl_home_underdog_after_bye"
    }
  },
  "test_rule_arguments": {
    "formula": "=AND(home, spread_close >= 3, rest_days >= 13)",
    "competition": "nfl",
    "market": "spread",
    "side": "rule",
    "season_type": "regular",
    "from_season": "2021",
    "to_season": "2024"
  },
  "import_arguments": {
    "source": {
      "kind": "template",
      "tool": "kelly_template:nfl_home_underdog_after_bye"
    },
    "text": "=AND(home, spread_close >= 3, rest_days >= 13)",
    "competition": "nfl",
    "market": "spread",
    "side": "rule"
  },
  "next_call": {
    "tool": "test_rule",
    "arguments": {
      "formula": "=AND(home, spread_close >= 3, rest_days >= 13)",
      "competition": "nfl",
      "market": "spread",
      "side": "rule",
      "season_type": "regular",
      "from_season": "2021",
      "to_season": "2024"
    }
  },
  "summary": "Home underdogs after a bye week: =AND(home, spread_close >= 3, rest_days >= 13). Test it with test_rule to see its record.",
  "assumptions": [
    "Smallest underdog line: 3",
    "Days since the team's last game: 13 (the template's default)"
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_ec3db33575ad6ef23eeedbd6",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

```http
POST https://api.askkelly.ai/v1/rules/templates:fill
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "template_id": "nfl_home_dogs"
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/not_found",
  "title": "Not found",
  "status": 404,
  "code": "not_found",
  "detail": "No template is called nfl_home_dogs.",
  "param": "template_id",
  "doc_url": "https://docs.askkelly.ai/problems/not_found",
  "request_id": "req_8333b63a22d4a84d8c2ecf17",
  "retryable": false,
  "display_message": "That could not be found."
}
```

`POST /v1/rules:interview`

## Build a rule by questions
public, no key needed · 1 credit, not charged during the beta · MCP tool `build_rule` · status live

The interview wizard: the answers so far (league, seasons, market, side, home or away, favourite or underdog, rest, back-to-backs, last game, total, season type) as labelled conditions and one rule formula, the next question with its choices, and the team-games the rule matches so far, read point in time as the rule tester reads them. Never a record or a pick: the record comes from POST /v1/rules:test.

### Parameters
Body, `application/json` (required):

- `competition` string  
  nfl, ncaaf, nba, ncaab, wnba, nhl or mlb.  
  One of: `nfl`, `ncaaf`, `nba`, `ncaab`, `wnba`, `nhl`, `mlb` (open: new values may be added).
- `from_season` string  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `market` string  
  spread, moneyline, over or under.  
  One of: `spread`, `moneyline`, `over`, `under` (open: new values may be added).
- `side` string  
  on (bet the team the conditions describe) or against (bet the other side).  
  One of: `on`, `against` (open: new values may be added).
- `venue` string  
  home, away or any.  
  One of: `home`, `away`, `any` (open: new values may be added).
- `role` string  
  favourite, underdog or any (spread sports only).  
  One of: `favourite`, `underdog`, `any` (open: new values may be added).
- `line_min` number  
  With role: the smallest line, in points (laying or getting).  
  min 0 · max 100
- `line_max` number  
  With role: the largest line, in points.  
  min 0 · max 100
- `rest_min_days` number  
  Fewest days since the team's last game.  
  min 0 · max 100
- `rest_edge_min` number  
  Fewest extra days of rest over the opponent.  
  min 0 · max 100
- `back_to_back` string  
  Who played the night before (basketball, hockey, baseball): team, opponent, team_not_opponent, opponent_not_team, neither or any.  
  One of: `team`, `opponent`, `team_not_opponent`, `opponent_not_team`, `neither`, `any` (open: new values may be added).
- `last_result` string  
  The team's last game: won, lost or any.  
  One of: `won`, `lost`, `any` (open: new values may be added).
- `last_margin_min` number  
  With last_result: by at least this many points.  
  min 0 · max 100
- `last_ats` string  
  Last game against the spread: covered, failed or any (spread sports only).  
  One of: `covered`, `failed`, `any` (open: new values may be added).
- `total_min` number  
  Smallest closing total.  
  min 0 · max 400
- `total_max` number  
  Largest closing total.  
  min 0 · max 400
- `season_type` string  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).

### Response
`200` The rule interview facts.

- `object` const · required  
  Always rule_interview.  
  Always `"rule_interview"`.
- `questions` array of object · required  
  Every question for this league, in order.
  - `key` string  
    Its argument name.
  - `ask` string  
    The question.
  - `choices` array of string  
    Its choices; empty for a number.
  - `numbers` array of string  
    The number arguments it takes.
  - `answered` boolean  
    Answered in this request.
- `next_question` object · nullable  
  The first unanswered question.
- `skipped_questions` array of string  
  Questions that don't apply to this league.
- `conditions` array of object · required  
  Each answer's condition, in question order.
  - `question` string  
    The question it answers.
  - `label` string  
    The condition in words.
  - `formula` string  
    The condition as a formula, without =.
- `formula` string · required · nullable  
  The conditions ANDed; null before any.
- `test_rule_arguments` object · nullable  
  The body for POST /v1/rules:test.
- `import_arguments` object · nullable  
  What to send to the import (source kind chat, tool kelly_interview).
- `complete` boolean  
  Every question is answered.
- `matched` integer · required · nullable  
  Team-games the rule matches over the seasons (each game has two); null until league and seasons are set.
- `games_in_scope` integer · nullable  
  Team-games read.
- `by_season` array of object  
  Counts by season.
- `problems` array of object  
  The rule tester's own problems.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout)

### Example
```http
POST https://api.askkelly.ai/v1/rules:interview
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "competition": "nba",
  "from_season": "2025-26",
  "to_season": "2025-26",
  "venue": "home"
}
```

```json
{
  "object": "rule_interview",
  "questions": [
    {
      "key": "competition",
      "ask": "Which league is the system for?",
      "choices": [
        "nfl",
        "ncaaf",
        "nba",
        "ncaab",
        "wnba",
        "nhl",
        "mlb"
      ],
      "numbers": [],
      "answered": true
    },
    {
      "key": "seasons",
      "ask": "Which seasons should Kelly test it on?",
      "choices": [],
      "numbers": [
        "from_season",
        "to_season"
      ],
      "answered": true
    },
    {
      "key": "market",
      "ask": "What do you bet: the spread, the moneyline, the over or the under?",
      "choices": [
        "spread",
        "moneyline",
        "over",
        "under"
      ],
      "numbers": [],
      "answered": false
    },
    {
      "key": "side",
      "ask": "Do you bet on the team your conditions describe, or against it?",
      "choices": [
        "on",
        "against"
      ],
      "numbers": [],
      "answered": false
    },
    {
      "key": "venue",
      "ask": "Home or away?",
      "choices": [
        "home",
        "away",
        "any"
      ],
      "numbers": [],
      "answered": true
    },
    {
      "key": "role",
      "ask": "Favourite or underdog?",
      "choices": [
        "favourite",
        "underdog",
        "any"
      ],
      "numbers": [
        "line_min",
        "line_max"
      ],
      "answered": false
    },
    {
      "key": "rest",
      "ask": "How rested is the team? Fewest days since its last game, or most extra days over the opponent.",
      "choices": [],
      "numbers": [
        "rest_min_days",
        "rest_edge_min"
      ],
      "answered": false
    },
    {
      "key": "back_to_back",
      "ask": "Back-to-backs: who played the night before?",
      "choices": [
        "team",
        "opponent",
        "team_not_opponent",
        "opponent_not_team",
        "neither",
        "any"
      ],
      "numbers": [],
      "answered": false
    },
    {
      "key": "last_result",
      "ask": "How did the team's last game go?",
      "choices": [
        "won",
        "lost",
        "any"
      ],
      "numbers": [
        "last_margin_min"
      ],
      "answered": false
    },
    {
      "key": "last_ats",
      "ask": "Did the team cover the spread last game?",
      "choices": [
        "covered",
        "failed",
        "any"
      ],
      "numbers": [],
      "answered": false
    },
    {
      "key": "total",
      "ask": "Any limits on the game's closing total?",
      "choices": [],
      "numbers": [
        "total_min",
        "total_max"
      ],
      "answered": false
    },
    {
      "key": "season_type",
      "ask": "Regular season, playoffs or both?",
      "choices": [
        "regular",
        "postseason",
        "both"
      ],
      "numbers": [],
      "answered": false
    }
  ],
  "next_question": {
    "key": "market",
    "ask": "What do you bet: the spread, the moneyline, the over or the under?",
    "choices": [
      "spread",
      "moneyline",
      "over",
      "under"
    ],
    "numbers": []
  },
  "skipped_questions": [],
  "conditions": [
    {
      "question": "venue",
      "label": "At home",
      "formula": "home"
    }
  ],
  "formula": "=home",
  "test_rule_arguments": {
    "formula": "=home",
    "competition": "nba",
    "market": "spread",
    "side": "rule",
    "season_type": "regular",
    "from_season": "2025-26",
    "to_season": "2025-26"
  },
  "import_arguments": {
    "source": {
      "kind": "chat",
      "tool": "kelly_interview"
    },
    "text": "=home",
    "competition": "nba",
    "market": "spread",
    "side": "rule"
  },
  "complete": false,
  "matched": 3,
  "games_in_scope": 6,
  "by_season": [
    {
      "season": "2025-26",
      "matched": 3,
      "team_games": 6
    }
  ],
  "problems": [],
  "summary": "1 condition so far: =home matches 3 of 6 team-games.",
  "assumptions": [
    "Each answer adds one condition; an answer of any adds none.",
    "matched counts team-games (each game has two), before lines are checked; the record comes from test_rule."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_10cfe25bbb94869626132398",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`POST /v1/data-requests:draft`

## Draft a data request letter
public, no key needed · 0 credits, not charged during the beta · MCP tool `create_data_request` · status live

A letter asking a betting tool for the caller's own data (saved systems, filters, alerts, bets) in a machine-readable file under the GDPR, the UK GDPR or the CCPA, with the legal deadline and next steps. Written from a fixed template; Kelly sends nothing and stores nothing.

### Parameters
Body, `application/json` (required):

- `platform` string  
  The service holding the person's systems, by name.  
  min length 1 · max length 80
- `law` string  
  gdpr (default), uk_gdpr or ccpa.  
  One of: `gdpr`, `uk_gdpr`, `ccpa` (open: new values may be added).
- `include` array of string  
  What to ask for: systems, alerts, bets, results, account (default systems, alerts, bets).  
  min items 1 · max items 5
- `requester_name` string  
  The account holder's name for the letter; omitted, a placeholder.  
  max length 80
- `account_login` string  
  The email or username on the account; omitted, a placeholder.  
  max length 120

### Response
`200` The data request facts.

- `object` const · required  
  Always data_request.  
  Always `"data_request"`.
- `platform` string  
  The service it is addressed to.
- `law` string  
  gdpr, uk_gdpr or ccpa.
- `law_name` string  
  The law, in words.
- `subject` string · required  
  The email's subject.
- `body` string · required  
  The letter.
- `include` array of string  
  What it asks for.
- `deadline` string · required  
  When the reply is due, as the law sets it.
- `deadline_days` integer  
  Days the law allows before any extension.
- `who_can_use_it` string  
  Who the law covers.
- `send_to` string  
  Where to send it.
- `next_steps` array of string  
  What to do next.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large)

### Example
```http
POST https://api.askkelly.ai/v1/data-requests:draft
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "platform": "Example Tool",
  "law": "gdpr",
  "include": [
    "systems",
    "bets"
  ]
}
```

```json
{
  "object": "data_request",
  "platform": "Example Tool",
  "law": "gdpr",
  "law_name": "the EU General Data Protection Regulation",
  "subject": "Data access and portability request (GDPR): [your full name]",
  "body": "To the Example Tool privacy team,\n\nThis is a request from the holder of the Example Tool account below, under Articles 15 (right of access) and 20 (right to data portability) of the EU General Data Protection Regulation.\n\nAccount: [the email address or username on your account]\nName: [your full name]\n\nPlease send a copy of the following personal data you hold about this account holder:\n\n1. Every betting system, query, filter set, angle or trend created or saved on the account, with each condition, setting and parameter exactly as stored, its name and the dates it was created and last changed.\n2. Every bet, pick or play logged or tracked on the account, with its date, event, market, side, line, price, stake and result.\n\nPlease provide it in a structured, commonly used and machine-readable format (Article 20(1)), such as CSV or JSON, so that it can be moved to another service. Where you hold a system or filter set as settings rather than text, please export the settings themselves (each field and its value), not a screenshot.\n\nIf you need to confirm the account holder's identity, please reply to this email with what you need. If you will not provide any of the data above, please say which part and the reason.\n\nThank you,\n[your full name]\n",
  "include": [
    "systems",
    "bets"
  ],
  "deadline": "one month from receipt, which the controller may extend by two further months for complex or numerous requests if it tells you why within the first month (Article 12(3)).",
  "deadline_days": 30,
  "who_can_use_it": "people in the EU or EEA, or any customer of a company established there",
  "send_to": "The privacy or data-protection contact named in Example Tool's privacy policy (often a privacy@ address or a request form). Send it from the email address on your account.",
  "next_steps": [
    "Send the letter from the email address on your account and keep a copy with the date.",
    "When Example Tool sends the file, bring it to Kelly's import (a file or a paste): Kelly maps each saved system to a rule and lists any condition it can't map.",
    "If no reply comes by the deadline, write again citing your first request's date."
  ],
  "summary": "A GDPR data request to Example Tool for systems, bets; the reply is due within 30 days.",
  "assumptions": [
    "Kelly writes the letter; you send it from your own email. Nothing you enter here is stored."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_6dff1262472cb88612da987c",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`POST /v1/rules:test_exchange`

## Test an exchange trading strategy
public, no key needed · 1 credit, not charged during the beta · MCP tool `test_exchange_strategy` · status live

An exchange trading strategy run tick by tick through recorded exchange markets (ADR-K681): enter when a formula on the runner's order book is true (back or lay; take the best price, join the queue or offer a price), then green up at a take-profit, stop-loss, exit rule or time before the off, or hold to the result. Waiting orders queue behind the money shown at their price; unmatched orders lapse at the off unless kept; removals cut earlier odds; commission is on each market's net winnings. Returns the verdict and its checks, orders, fills, how trades ended, gross, commission, net, ROI on stake matched, a t-test, stress tests (a tick worse, more commission, the other fill model), each market and every trade. Until Betfair Historical Data is loaded it runs on made-up sample markets and says so.

### Parameters
Body, `application/json` (required):

- `entry_when` string  
  When to enter: a formula true or false on each tick of a runner (=AND(seconds_to_off <= 300, price_rank = 1, wom_back > 0.6)). The first tick it is true places an entry order.  
  min length 2 · max length 2000
- `entry_side` string  
  back (bet it to win) or lay (bet it to lose). Default back.  
  One of: `back`, `lay` (open: new values may be added).
- `entry_order` string  
  take: match now at the best price on the other side (back at back_price), walking down the ladder up to max_slippage_ticks. join: offer at the best price on your own side (back at lay_price) and wait in the queue, entry_offset_ticks better or worse. limit: offer at entry_price. Default take.  
  One of: `take`, `join`, `limit` (open: new values may be added).
- `entry_price` number  
  limit only: the price to offer at (a back takes this or longer, a lay this or shorter).  
  min 1.01 · max 1000
- `entry_offset_ticks` integer  
  join only: ticks from the best own-side price; positive asks for a better price (a back offered longer), negative a worse one. Default 0.  
  min -50 · max 50
- `max_slippage_ticks` integer  
  take only: how many ticks past the best price a take may match at; what is left waits at the last price taken. Default 0.  
  min 0 · max 50
- `stake` number  
  The entry stake in the market's currency (a lay's backer's stake unless stake_type is liability). Default 10.0.  
  max 100000
- `stake_type` string  
  lay only: stake is the backer's stake you accept; liability is what you can lose. Default stake.  
  One of: `stake`, `liability` (open: new values may be added).
- `max_entries` integer  
  Entries per runner per market (Bet Angel's 'place bet triggers on the selection'); the next waits until the last is closed. Default 1.  
  min 1 · max 50
- `fill_or_kill_s` number  
  Seconds an unmatched entry may wait before it is cancelled (0 cancels what doesn't match at once). Blank: it waits until the market turns in play.  
  min 0 · max 86400
- `keep_in_play` boolean  
  TRUE keeps unmatched orders when the market turns in play (Betfair's persist); FALSE (default) cancels them at the off (lapse). Default false.
- `take_profit_ticks` integer  
  Once the entry is matched, offer the green-up exit this many ticks in profit and wait for it to match.  
  min 1 · max 300
- `stop_loss_ticks` integer  
  When the position is this many ticks against (position_ticks <= -n), cancel the take-profit and green up now at the best price (a take).  
  min 1 · max 300
- `trailing_stop` boolean  
  The stop loss follows the best position_ticks so far (it trails n ticks behind). Default false.
- `exit_when` string  
  A formula on the runner's ticks that greens up now at the best price when true (may read position_* columns).  
  min length 2 · max length 2000
- `exit_before_off_s` number  
  Green up at the best price this many seconds before the scheduled off (0 is at the off). Blank: no time exit.  
  min -86400 · max 86400
- `green_up` boolean  
  TRUE (default): exits are sized to make the same profit on every outcome. FALSE: no exit, the matched entry is held to the result. Default true.
- `commission` number  
  The exchange's commission on a market's net winnings, as a share (0.05 is 5%). Default 0.05.  
  min 0 · max 0.2
- `min_stake` number  
  The exchange's smallest stake: a green-up smaller than this can't be placed, and the position is held to the result. Default 1.0.  
  max 100
- `fill_model` string  
  queue (default): a waiting order matches only after the money queued ahead of it at that price has traded. touch: it matches as soon as its price trades (optimistic). Default queue.  
  One of: `queue`, `touch` (open: new values may be added).
- `data` string  
  sample (default; made-up markets until Betfair Historical Data is loaded) or betfair.  
  One of: `sample`, `betfair` (open: new values may be added).
- `event_type` string  
  Only this sport's markets.  
  One of: `horse_racing`, `greyhounds`, `harness`, `soccer`, `tennis`, `cricket`, `basketball`, `american_football`, `ice_hockey`, `baseball`, `golf`, `rugby_union`, `rugby_league`, `other` (open: new values may be added).
- `market_type` string  
  Only this market type (WIN, PLACE, MATCH_ODDS...).  
  pattern ^[A-Za-z0-9_]{2,40}$
- `markets` array of string  
  Only these market IDs (1.234567890).  
  min items 1 · max items 500
- `from_date` string  
  First off date (YYYY-MM-DD, UTC).  
  format date
- `to_date` string  
  Last off date (YYYY-MM-DD, UTC).  
  format date
- `detail` string  
  full (default) or summary (no markets or trades lists).  
  One of: `full`, `summary` (open: new values may be added).

### Response
`200` The exchange test facts.

- `object` const · required  
  Always exchange_test.  
  Always `"exchange_test"`.
- `strategy` object · required  
  The strategy as run: every action (exchange.contract.ACTIONS) with its value.
- `data` object · required  
  The markets it ran on.
  - `source` string | array  
    sample (made-up markets) or betfair_historical; a list when markets came from both.
  - `sample` boolean  
    TRUE when every market is a made-up sample: the figures test the simulator, not the strategy.
  - `markets` integer  
    Markets run.
  - `frames` integer  
    Moments stepped through.
  - `ticks` integer  
    Runner rows read.
  - `event_types` array of string  
    Sports.
  - `from` string · nullable  
    The first market's off.
  - `to` string · nullable  
    The last market's off.
- `verdict` object · required  
  The headline and its checks.
  - `headline` string · required  
    The verdict in words.
  - `checks` array of object · required  
    Each check.
    - `key` string · required  
      The check.  
      One of: `enough_trades`, `made_money`, `not_luck`, `tick_worse`, `queue_fills`, `newest_30` (open: new values may be added).
    - `label` string · required  
      The check, in words.
    - `status` string · required  
      pass, fail or na (it can't apply).  
      One of: `pass`, `fail`, `na` (open: new values may be added).
    - `value` string · required  
      The figure behind it, in words.
  - `passed` integer · required  
    Checks passed.
  - `applicable` integer · required  
    Checks that apply.
  - `sample` boolean  
    Sample markets: no verdict is passed.
- `overall` object · required  
  Every trade together.
  - `orders_placed` integer  
    Entry orders placed.
  - `trades` integer  
    Trades with a matched entry.
  - `never_matched` integer  
    Entries that matched nothing.
  - `stake_asked` number  
    Entry stake asked for.
  - `stake_matched` number  
    Entry stake matched.
  - `fill_rate` number · nullable  
    stake_matched over stake_asked.
  - `greened` integer  
    Trades closed level on every outcome.
  - `held_to_result` integer  
    Trades held to the result.
  - `exits` object  
    Greened trades by how they got out.
    - `take_profit` integer  
      take_profit
    - `stop_loss` integer  
      stop_loss
    - `trailing_stop` integer  
      trailing_stop
    - `exit_when` integer  
      exit_when
    - `before_off` integer  
      before_off
  - `exit_blocked` integer  
    Trades whose exit couldn't be placed or lapsed.
  - `won` integer  
    Trades with net above 0.
  - `lost` integer  
    Trades with net below 0.
  - `level` integer  
    Trades with net exactly 0.
  - `gross` number  
    Profit before commission.
  - `commission` number  
    Commission paid.
  - `net` number  
    Profit after commission.
  - `roi` number · nullable  
    net over stake_matched.
  - `mean_net` number · nullable  
    Average net a trade.
  - `sd_net` number · nullable  
    Standard deviation of net a trade.
  - `t` number · nullable  
    t statistic of the mean net against 0.
  - `p_value` number · nullable  
    One-sided p-value of the t-test (trades treated as independent).
  - `avg_ticks` number · nullable  
    Average ticks captured on greened trades.
  - `max_drawdown` number  
    Largest fall in cumulative net, trade by trade.
  - `small_sample` boolean  
    Under 30 matched trades.
- `stress` object · required  
  The same strategy under worse conditions.
  - `one_tick_worse` object  
    Every take matched one tick worse.
    - `trades` integer  
      Trades with a matched entry.
    - `stake_matched` number  
      Entry stake matched.
    - `net` number  
      Profit after commission.
    - `roi` number · nullable  
      net over stake_matched.
  - `commission_plus_3pts` object  
    Commission three points higher.
    - `trades` integer  
      Trades with a matched entry.
    - `stake_matched` number  
      Entry stake matched.
    - `net` number  
      Profit after commission.
    - `roi` number · nullable  
      net over stake_matched.
  - `other_fill_model` object  
    The other fill model (queue or touch).
    - `trades` integer  
      Trades with a matched entry.
    - `stake_matched` number  
      Entry stake matched.
    - `net` number  
      Profit after commission.
    - `roi` number · nullable  
      net over stake_matched.
- `newest_30` object · nullable  
  The newest 30% of markets (10 or more markets).
  - `markets` integer  
    Markets.
  - `trades` integer  
    Trades.
  - `net` number  
    Net.
  - `roi` number · nullable  
    ROI.
- `by_event_type` array of object  
  Each sport, by name.
  - `event_type` string  
    The sport.
  - `trades` integer  
    Trades.
  - `stake_matched` number  
    Stake matched.
  - `won` integer  
    Won.
  - `lost` integer  
    Lost.
  - `net` number  
    Net.
  - `roi` number · nullable  
    ROI.
- `left_out` object · required  
  What didn't become a trade, or settled void.
  - `entry_signals` integer  
    Ticks where the entry rule fired and an order could go in.
  - `no_price` integer  
    Signals with no price to take or join.
  - `lapsed_in_play` integer  
    Unmatched orders lapsed at the turn in play.
  - `below_min_stake` integer  
    Green-ups below the exchange's smallest stake (held instead).
  - `removed_void` integer  
    Trades on removed runners (void).
  - `unsettled` integer  
    Trades in markets with no result yet.
- `markets` array of object  
  Each market, in order of the off (detail full).
  - `market_id` string  
    The exchange's market ID.
  - `event_name` string · nullable  
    The event.
  - `event_type` string · nullable  
    The sport.
  - `market_type` string · nullable  
    WIN, MATCH_ODDS and so on.
  - `off_time` string · nullable  
    The scheduled off (RFC 3339).
  - `source` string · nullable  
    sample or betfair_historical.
  - `trades` integer  
    Trades with a matched bet.
  - `gross` number  
    Profit before commission.
  - `commission` number  
    Commission on the market's net winnings.
  - `net` number  
    Profit after commission.
- `trades` array of object  
  Every trade, in order (detail full).
  - `key` string  
    {market_id}:{selection_id}:{entered_at}.
  - `market_id` string  
    The exchange's market ID.
  - `event_name` string  
    The event.
  - `event_type` string  
    The sport.
  - `selection_id` string  
    The runner's ID in the market.
  - `runner` string  
    The runner.
  - `side` string  
    back or lay.  
    One of: `back`, `lay` (open: new values may be added).
  - `entered_at` string  
    When the entry order went in (RFC 3339).  
    format date-time
  - `seconds_to_off` number · nullable  
    Seconds to the scheduled off then.
  - `in_play` boolean  
    Entered in play.
  - `entry_price` number · nullable  
    The matched entry's average price, decimal.
  - `stake_asked` number  
    The entry stake asked for (a lay's backer's stake).
  - `stake_matched` number  
    The entry stake matched.
  - `shown` number  
    Money shown at the best price on the side taken or joined, when entered.
  - `unmatched_cancelled` number  
    Entry stake cancelled unmatched (fill or kill, the off, an exit).
  - `exit` string  
    How it ended: take_profit, stop_loss, trailing_stop, exit_when, before_off (greened), held (to the result) or never_matched.
  - `exit_note` string · nullable  
    Why an exit didn't happen (below min_stake, lapsed at the off, never matched).
  - `exited_at` string · nullable  
    When the green-up finished matching (RFC 3339).  
    format date-time
  - `exit_price` number · nullable  
    The green-up's average price, decimal.
  - `ticks` integer · nullable  
    Ticks from entry to exit, positive in profit (greened trades).
  - `bets` integer  
    Matched bets the trade made (each partial fill is one).
  - `result` string · nullable  
    The runner's result: winner, loser, placed or removed.
  - `gross` number  
    Profit before commission.
  - `commission` number  
    The trade's share of its market's commission.
  - `net` number  
    Profit after commission.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `engine` string  
  The simulator's revision (results move only when it changes).
- `contract_version` string  
  The tick contract's version.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`rule_not_testable`](/problems/rule_not_testable) · [`query_too_broad`](/problems/query_too_broad)

### Example
```http
POST https://api.askkelly.ai/v1/rules:test_exchange
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "entry_when": "=result = 1"
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/rule_not_testable",
  "title": "Rule can't be tested",
  "status": 422,
  "code": "rule_not_testable",
  "detail": "No attribute named result on tick rows.",
  "param": "entry_when",
  "doc_url": "https://docs.askkelly.ai/problems/rule_not_testable",
  "request_id": "req_5ad8a2412ec1d129ea117878",
  "retryable": false,
  "display_message": "That rule can't be tested on past games as written.",
  "problems": [
    {
      "code": "unknown_name",
      "path": "entry_when",
      "message": "No attribute named result on tick rows.",
      "fixes": []
    }
  ]
}
```

```http
POST https://api.askkelly.ai/v1/rules:test_exchange
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "entry_when": "=AND(seconds_to_off <= 300, price_rank = 1)",
  "take_profit_ticks": 2,
  "stop_loss_ticks": 3,
  "exit_before_off_s": 10,
  "detail": "summary"
}
```

```json
{
  "object": "exchange_test",
  "strategy": {
    "entry_when": "=AND(seconds_to_off <= 300, price_rank = 1)",
    "entry_side": "back",
    "entry_order": "take",
    "entry_price": null,
    "entry_offset_ticks": 0,
    "max_slippage_ticks": 0,
    "stake": 10,
    "stake_type": "stake",
    "max_entries": 1,
    "fill_or_kill_s": null,
    "keep_in_play": false,
    "take_profit_ticks": 2,
    "stop_loss_ticks": 3,
    "trailing_stop": false,
    "exit_when": null,
    "exit_before_off_s": 10,
    "green_up": true,
    "commission": 0.05,
    "min_stake": 1,
    "fill_model": "queue"
  },
  "data": {
    "source": "sample",
    "sample": true,
    "markets": 3,
    "frames": 1004,
    "ticks": 6308,
    "event_types": [
      "greyhounds",
      "horse_racing",
      "soccer"
    ],
    "from": "2026-03-08T20:00:00.000Z",
    "to": "2026-03-08T20:45:00.000Z"
  },
  "verdict": {
    "headline": "Sample markets only: made-up data that tests the simulator, not the strategy",
    "checks": [
      {
        "key": "enough_trades",
        "label": "At least 30 matched trades",
        "status": "fail",
        "value": "3 matched trades"
      },
      {
        "key": "made_money",
        "label": "Made money after commission",
        "status": "pass",
        "value": "net +0.07"
      },
      {
        "key": "not_luck",
        "label": "Not just luck (one-sided t-test, 5%)",
        "status": "fail",
        "value": "p = 0.458"
      },
      {
        "key": "tick_worse",
        "label": "Still makes money with every take a tick worse",
        "status": "fail",
        "value": "net -2.24"
      },
      {
        "key": "newest_30",
        "label": "The newest 30% of markets made money",
        "status": "na",
        "value": "too few markets (under 10)"
      }
    ],
    "passed": 1,
    "applicable": 4,
    "sample": true
  },
  "overall": {
    "orders_placed": 3,
    "trades": 3,
    "never_matched": 0,
    "stake_asked": 30,
    "stake_matched": 30,
    "fill_rate": 1,
    "greened": 3,
    "held_to_result": 0,
    "exits": {
      "take_profit": 2,
      "stop_loss": 1,
      "trailing_stop": 0,
      "exit_when": 0,
      "before_off": 0
    },
    "exit_blocked": 0,
    "won": 2,
    "lost": 1,
    "level": 0,
    "gross": 0.1,
    "commission": 0.03,
    "net": 0.07,
    "roi": 0.0023,
    "mean_net": 0.0233,
    "sd_net": 0.3356,
    "t": 0.12,
    "p_value": 0.4576,
    "avg_ticks": 0,
    "max_drawdown": 0.35,
    "small_sample": true
  },
  "stress": {
    "one_tick_worse": {
      "trades": 3,
      "stake_matched": 30,
      "net": -2.24,
      "roi": -0.0747
    },
    "commission_plus_3pts": {
      "trades": 3,
      "stake_matched": 30,
      "net": 0.06,
      "roi": 0.002,
      "commission": 0.08
    },
    "other_fill_model": {
      "trades": 3,
      "stake_matched": 30,
      "net": 0.07,
      "roi": 0.0023,
      "fill_model": "touch"
    }
  },
  "newest_30": null,
  "by_event_type": [
    {
      "event_type": "greyhounds",
      "trades": 1,
      "stake_matched": 10,
      "won": 1,
      "lost": 0,
      "net": 0.3,
      "roi": 0.03
    },
    {
      "event_type": "horse_racing",
      "trades": 1,
      "stake_matched": 10,
      "won": 1,
      "lost": 0,
      "net": 0.12,
      "roi": 0.012
    },
    {
      "event_type": "soccer",
      "trades": 1,
      "stake_matched": 10,
      "won": 0,
      "lost": 1,
      "net": -0.35,
      "roi": -0.035
    }
  ],
  "left_out": {
    "entry_signals": 4,
    "no_price": 1,
    "lapsed_in_play": 0,
    "below_min_stake": 0,
    "removed_void": 0,
    "unsettled": 0
  },
  "engine": "1",
  "contract_version": "1.0.0",
  "assumptions": [
    "These are made-up sample markets (Kelly holds no real exchange ticks yet): the figures show how the simulator works, not whether the strategy makes money.",
    "Your orders don't move later prices: the recorded book is what it was, so a stake large against the money shown matches more easily here than it would have (each trade lists the money shown).",
    "A waiting order starts behind the money already shown at its price and matches only once that much has traded there (behind the third level's money when its price is further out).",
    "Commission is 5% of each market's net winnings; discounts, premium charges and the exchange's own fees on high-volume accounts aren't applied.",
    "Bets matched on other runners before a removal settle at odds cut by the removed runner's adjustment factor; bets on a removed runner are void.",
    "Unmatched orders lapse when the market turns in play; a position whose exit lapsed is held to the result."
  ],
  "as_of": "2026-10-04T17:30:00Z",
  "summary": "Sample markets only: made-up data that tests the simulator, not the strategy: 3 trades backing in 3 sample markets, 3 greened and 0 held to the result, net +0.07 after 0.03 commission, +0.2% on stake matched (1 of 4 checks passed).",
  "has_more": false,
  "next_cursor": null,
  "source": "kelly",
  "attribution": null,
  "request_id": "req_eb036ecfb9db90e9513b93c4",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`POST /v1/rules:test_batch`

## Test many betting rules at once
public, no key needed · 1 credit, not charged during the beta · MCP tool `test_rules_batch` · status live

Up to 100 betting rules tested on the same seasons and options in one call: a list of formulas, or a template and a grid of values (every combination is a rule). One row each, in the order asked: the record, units, ROI, p-value and the p-value adjusted for every rule tried, this batch's included (tests_charged). A rule the tester refuses keeps its row with its problems and isn't counted. Rows are never sorted by a result.

### Parameters
Body, `application/json` (required):

- `formulas` array of string  
  Rules to test, each a formula true or false on each team-game, starting with = (up to 100 with the grid's).  
  max items 100
- `formula_template` string  
  A formula with {name} slots the grid fills, e.g. =AND(home, rest_days >= {k}).  
  min length 2 · max length 2000
- `grid` array of string  
  Each slot's values as name=numbers, e.g. ["k=1,2,3"]; every combination is a rule.  
  min items 1 · max items 4
- `competition` string  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...; racing: horse_racing, greyhounds or harness (seasons are calendar years).  
  pattern ^[a-z0-9_]{2,24}$
- `seasons` array of string  
  Seasons to test, oldest first (1 to 25), e.g. ["2021", "2022"]; or use from_season and to_season.  
  min items 1 · max items 25
- `from_season` string  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `market` string  
  spread (default), moneyline, over, under or draw, as test_rule reads them (a teaser rule is tested with test_rule).  
  One of: `spread`, `moneyline`, `over`, `under`, `draw` (open: new values may be added).
- `side` string  
  rule (default) bets the team the rule matched; fade bets the other side.  
  One of: `rule`, `fade` (open: new values may be added).
- `bet_moment` string  
  close (default), edition (football: the weekly sheet's Monday 10 AM ET line) or day_before (other sports: 24 hours before the start).  
  One of: `close`, `edition`, `day_before` (open: new values may be added).
- `season_type` string  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).
- `stake` string  
  risk (default): 1 unit risked a bet; to_win: each bet sized to win 1 unit.  
  One of: `risk`, `to_win` (open: new values may be added).
- `price` string  
  consensus (default): Kelly's price at the bet moment; flat_110: every bet at -110.  
  One of: `consensus`, `flat_110` (open: new values may be added).
- `tests` integer  
  Rules tried on this data outside Kelly, this one included (default 1). Kelly counts the account's own; this may only raise that count.  
  min 1 · max 100000

### Response
`200` The rule batch facts.

- `object` const · required  
  Always rule_batch.  
  Always `"rule_batch"`.
- `rule` object  
  The options every rule shared: competition, market, side, bet moment, seasons, season type, stake, price, and the template and grid when given.
- `results` array of object · required  
  One row a rule, in the order asked: the formulas, then the grid's combinations.
  - `formula` string · required  
    The formula tested (a template filled with its values).
  - `values` object · nullable  
    The grid's values for this rule; null for a formula given as is.
  - `rule_hash` string · nullable  
    The rule's identity (see test_rule's rule.rule_hash); null when refused.
  - `tested` boolean · required  
    False when the tester refused the rule (see problems).
  - `problems` array of object · required  
    Why it was refused, each with fixes; empty when tested.
    - `code` string  
      look_ahead, edge_rule, syntax, ...
    - `message` string  
      In words.
  - `left_out` object  
    Games left out: no line at the bet moment, or the rule matched both teams.
  - `bets` integer  
    Graded bets.
  - `decisions` integer  
    Wins plus losses.
  - `record` string  
    W-L-P.
  - `units` number · nullable  
    Units won or lost.
  - `roi` number · nullable  
    Units over units risked, a fraction.
  - `p_value` number · nullable  
    The record's own p-value against no skill at its prices.
  - `p_adjusted` number · nullable  
    The p-value adjusted for every rule tried (tests): Bonferroni.
  - `small_sample` boolean  
    Under 30 decisions.
- `variants` integer · required  
  Rules in the batch.
- `tested` integer · required  
  Rules tested.
- `refused` integer · required  
  Rules the tester refused (not counted).
- `tests_charged` integer · required  
  Rules new to the account's ledger from this batch.
- `tests` integer · required  
  The rules-tried count every p_adjusted uses.
- `tests_on_account` object · nullable  
  The account's ledger after this batch: competition, market, count; null without an account.
- `data_version` string  
  The data every rule read.
- `notice` string  
  It isn't a pick.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout)

### Example
```http
POST https://api.askkelly.ai/v1/rules:test_batch
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "formula_template": "=AND(home, rest_days >= {k})",
  "grid": [
    "k=0,1,2"
  ],
  "competition": "nba",
  "seasons": [
    "2025-26"
  ]
}
```

```json
{
  "object": "rule_batch",
  "rule": {
    "competition": "nba",
    "market": "spread",
    "side": "rule",
    "bet_moment": "close",
    "seasons": [
      "2025-26"
    ],
    "season_type": "regular",
    "stake": "risk",
    "price": "consensus",
    "formula_template": "=AND(home, rest_days >= {k})",
    "grid": [
      "k=0,1,2"
    ]
  },
  "results": [
    {
      "formula": "=AND(home, rest_days >= 0)",
      "values": {
        "k": 0
      },
      "rule_hash": "sha256:ef4d674ec75c877a5b37cfc1e0b4116e4014ff75d00a93d9139071c3ff450616",
      "tested": true,
      "problems": [],
      "left_out": {
        "no_line": 2,
        "both_sides": 0
      },
      "bets": 1,
      "decisions": 1,
      "record": "1-0",
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "p_value": 0.5235602094240838,
      "p_adjusted": 1,
      "small_sample": true
    },
    {
      "formula": "=AND(home, rest_days >= 1)",
      "values": {
        "k": 1
      },
      "rule_hash": "sha256:af2069d0e4d5307d8c4ea7ac707cc0d3e7e13f5c5ea4f95806a58327400b8676",
      "tested": true,
      "problems": [],
      "left_out": {
        "no_line": 2,
        "both_sides": 0
      },
      "bets": 0,
      "decisions": 0,
      "record": "0-0",
      "units": 0,
      "roi": null,
      "p_value": null,
      "p_adjusted": null,
      "small_sample": true
    },
    {
      "formula": "=AND(home, rest_days >= 2)",
      "values": {
        "k": 2
      },
      "rule_hash": "sha256:1e9e3c96193481744619102207b3b7c22de187b64f1fdd3c062d04c31cc8d451",
      "tested": true,
      "problems": [],
      "left_out": {
        "no_line": 1,
        "both_sides": 0
      },
      "bets": 0,
      "decisions": 0,
      "record": "0-0",
      "units": 0,
      "roi": null,
      "p_value": null,
      "p_adjusted": null,
      "small_sample": true
    }
  ],
  "variants": 3,
  "tested": 3,
  "refused": 0,
  "tests_charged": 2,
  "tests": 5,
  "tests_on_account": {
    "competition": "nba",
    "market": "spread",
    "count": 5
  },
  "data_version": "snap_52",
  "notice": "This tests your rules on past games. It isn't a pick and doesn't rank selections.",
  "summary": "(3) rules tested together, (3) run and (0) refused; each p-value is adjusted for (5) rules tried. Test any one with test_rule for its verdict.",
  "assumptions": [
    "Each rule's p_adjusted counts every rule tried on NBA spread (5), this batch's included.",
    "Rows keep the order asked for; they are never sorted by a result."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-11-06T00:00:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_ea7a1a4a7699228aeb77d682",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

```http
POST https://api.askkelly.ai/v1/rules:test_batch
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "formula_template": "=AND(home, rest_days >= {k})",
  "grid": [
    "days=1,2"
  ],
  "competition": "nba",
  "seasons": [
    "2025-26"
  ]
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "code": "invalid_request",
  "detail": "The template's slots (k) and the grid's keys (days) must match.",
  "param": "grid",
  "doc_url": "https://docs.askkelly.ai/problems/invalid_request",
  "request_id": "req_6ca470b3bef4bd2066792cba",
  "retryable": false,
  "display_message": "Something in that request was not understood."
}
```

`GET /v1/rules/runs/{run_id}`

## Get a rule test you ran
public, no key needed · 0 credits, not charged during the beta · MCP tool `get_rule_run` · status live

One of your own kept rule tests by its run_id: the report it returned, on the data it read (data_version), without the bets list. Runs are private: another account's run is not_found.

### Parameters
- `run_id` string · path · required  
  The run_id a test_rule result gave (run_…).  
  pattern ^run_[0-9a-hjkmnp-tv-z]{20}$

### Response
`200` The rule test facts.

- `object` const · required  
  Always rule_test.  
  Always `"rule_test"`.
- `verdict` object · required  
  Verdict v2: the leak gate, nine checks in three groups and the headline.
  - `version` integer  
    2.
  - `headline` string · required  
    The verdict in words.
  - `gate` object  
    The leak gate: a rule reading anything not known at the bet moment is refused first; leak_test is the cut-data rerun's status (clean or not_run).
  - `held_back_by` array of string  
    Why a rule with no failed check isn't holds_up (honest forward ROI at or under 0, PBO over 0.5 across 10 or more variants).
  - `level` string · required  
    too_few, no_profit, no_evidence, luck, promising or holds_up.  
    One of: `too_few`, `no_profit`, `no_evidence`, `luck`, `promising`, `holds_up` (open: new values may be added).
  - `passed` integer · required  
    Checks passed.
  - `applicable` integer · required  
    Checks that apply.
  - `checks` array of object · required  
    The checks, in a fixed order.
    - `key` string · required  
      The check; a teaser keeps v1's six (newest_30, seasons_won, price_worse among them).  
      One of: `enough_bets`, `not_luck`, `beats_base`, `half_point_worse`, `nearby_holds`, `not_concentrated`, `beats_close`, `still_working`, `since_saved`, `calibrated`, `newest_30`, `seasons_won`, `price_worse` (open: new values may be added).
    - `group` string  
      real (is it real?), pressure or still_working; not on a teaser's checks.  
      One of: `real`, `pressure`, `still_working` (open: new values may be added).
    - `label` string · required  
      The check, in words.
    - `status` string · required  
      pass, fail or na (it can't apply).  
      One of: `pass`, `fail`, `na` (open: new values may be added).
    - `zone` string  
      green, yellow (within one standard error of the threshold), red, or na.  
      One of: `green`, `yellow`, `red`, `na` (open: new values may be added).
    - `value` string · required  
      The figure behind it, in words.
    - `statistic` number | integer · nullable  
      The number the check compares.
    - `threshold` number | integer · nullable  
      What it is compared with.
    - `basis` string  
      seasons_won or newest_30 while the full check is still being built; points when Beats the close is judged on points beaten (audit F3).
- `overall` object · required  
  Every graded bet.
  - `record` string  
    Wins-losses(-pushes).
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `bets` integer  
    Graded bets.
  - `decisions` integer  
    Wins plus losses.
  - `units` number · nullable  
    Units won or lost.
  - `roi` number · nullable  
    Units over units risked.
  - `roi_interval` array of number · nullable  
    ROI's 95% interval at 1 unit risked a bet.
  - `win_rate` number · nullable  
    Wins over decisions.
  - `break_even` number · nullable  
    The win rate that breaks even at these prices.
  - `significance` object · nullable  
    The record test (kmath.records.record_test) and verdict v2's statistics (kmath.significance): the p-value, adjusted for the rules tried, and the anytime-valid test.
    - `p_value` number · nullable  
      The larger of the exact and the clustered one-sided p against no skill at these prices (F12, F23).
    - `method` string · nullable  
      exact_binomial, exact_simulation, saddlepoint or z_score.
    - `z` number · nullable  
      The score z: units over the square root of Σ(d − 1).
    - `t_stat` number · nullable  
      The t statistic with the sample variance.
    - `p_value_exact` number · nullable  
      The exact (or z) tail alone.
    - `p_value_clustered` number · nullable  
      The tail with bets clustered by slate and team-season (F23).
    - `p_value_vs_vig` number · nullable  
      Against a random bet at the no-vig close (needs closes).
    - `p_adjusted` number · nullable  
      The p-value adjusted for the rules tried (Romano-Wolf on the ledger's rules, Bonferroni on the count otherwise; F14).
    - `adjust_method` string · nullable  
      romano_wolf, holm or none.
    - `tests` integer · nullable  
      Rules tried in this family, this one included.
    - `tests_effective` number · nullable  
      Effective tests (Li-Ji): near-duplicate rules count as fewer.
    - `reality_check_p` number · nullable  
      White's Reality Check p (when the ledger holds the rules' units).
    - `spa_p` number · nullable  
      Hansen's SPA p (when the ledger holds the rules' units).
    - `clears_t3` boolean · nullable  
      z at or above 3 (Harvey-Liu-Zhu's bar).
    - `haircut` number · nullable  
      Harvey-Liu haircut: the share of the ROI the rules tried take away.
    - `haircut_roi` number · nullable  
      ROI after the haircut, per decision.
    - `anytime_valid` object · nullable  
      The record as a bet against no skill (F17): e-value, anytime p, ROI range.
      - `e_value` number · nullable  
        The e-value now.
      - `p_value` number · nullable  
        1 over the largest e-value so far.
      - `max_e` number · nullable  
        The largest e-value along the path.
      - `roi_cs95` array of number · nullable  
        An ROI range valid at every bet.
  - `roi_ci95` array of number · nullable  
    ROI's 95% score interval, clustered (F13, F23).
  - `units_ci95` array of number · nullable  
    Units' 95% interval: decisions times the ROI interval.
  - `roi_ci` object · nullable  
    ROI intervals at ci_level: score (the one shown), BCa, block bootstrap over slates and anytime-valid (F13).
  - `deflated` object · nullable  
    Per-bet Sharpe, PSR and DSR at the effective tests, and the bets needed: deflated (sample_needed), single test and 80% power, each times the design effect (F15).
    - `sample_needed` integer · nullable  
      Decisions needed, deflated for the rules tried; null with no edge to prove.
    - `sample_needed_single` integer · nullable  
      Decisions needed for one rule tried.
    - `sample_needed_power80` integer · nullable  
      Decisions for 80% power at this ROI.
    - `sample_needed_plan` integer · nullable  
      Decisions for 80% power at plan_roi.
    - `dsr` number · nullable  
      Deflated Sharpe ratio.
    - `psr` number · nullable  
      Probabilistic Sharpe ratio.
  - `sample_needed` object · nullable  
    Bets needed to tell this win rate from break-even (one-sided, with 80% power, ...).
  - `small_sample` boolean  
    Under 30 decisions.
  - `few_decisions` boolean  
    Under 5 decisions.
- `honest` object · nullable  
  The honest forward ROI (F22, the headline ROI): empirical Bayes toward a prior mean (the rule's own closing-line value when at least half its bets have a close, else the usual two-way margin), less the winner's curse for the rules tried and the out-of-sample decay.
  - `roi` number · nullable  
    Honest forward ROI.
  - `ci80` array of number · nullable  
    80% range.
  - `raw_roi` number · nullable  
    The past ROI per decision, beside it.
  - `prior_mean` number · nullable  
    The prior mean the ROI is shrunk toward (prior.source says which).
  - `prior_sd` number · nullable  
    The spread of true ROIs (0.02 until fitted on the ledger).
  - `shrink` number · nullable  
    Weight on the prior, se²/(se² + τ²).
  - `selection_adj` number · nullable  
    Winner's-curse correction for the rules tried.
  - `decay_factor` number · nullable  
    Out-of-sample decay on the excess (0.74).
  - `stabilizes_at_bets` integer · nullable  
    Decisions at which the record and the prior weigh the same.
  - `uses_clv` boolean  
    The prior mean is the rule's own closing-line value.
  - `prior_basis` string  
    fitted (prior_sd from the ledger's fit) or seed.
  - `prior` object  
    Where the prior mean comes from.
    - `source` string  
      clv (the rule's mean closing-line value), margin (the two-way margin, -4.55%) or fitted.
    - `mean` number · nullable  
      The prior mean used.
    - `closes` integer  
      Decided bets with a no-vig close.
    - `capped` boolean  
      A closing-line value above 0 was held at 0: under 50 bets have a close.
    - `words` string  
      The prior, said plainly.
- `dependence` object · nullable  
  Bets clustered by slate (the date; the week in the NFL and college football) and team-season (F23).
  - `clusters` integer  
    Slates.
  - `design_effect` number  
    Clustered over iid variance.
  - `effective_bets` integer  
    Decisions over the design effect (at least 1).
  - `method` string  
    cr1_twoway, cr1_slate, cr1_larger_oneway, wild_bootstrap or wild_bootstrap_webb.
- `base` object · nullable  
  The rule against the rest of its own base (F19): the who-or-when conditions alone, or base_formula.
  - `formula` string · nullable  
    The base, or null for the whole market.
  - `source` string  
    auto, user or market.  
    One of: `auto`, `user`, `market` (open: new values may be added).
  - `status` string  
    measured or na.  
    One of: `measured`, `na` (open: new values may be added).
  - `roi` number · nullable  
    The base's ROI per decision.
  - `lift` number · nullable  
    Rule ROI less base ROI.
  - `p_value_vs_base` number · nullable  
    Season-stratified permutation p of the rule within its base.
  - `units_from_base` number · nullable  
    Units the base alone would have made on the rule's stakes.
  - `units_from_filter` number · nullable  
    The rule's units less units_from_base.
- `clv` object · required  
  Closing-line value as evidence (F21): each bet's no-vig CLV, q_close x price - 1, on bets Kelly holds a close for. Empty when betting at the close.
  - `bets_with_close` integer  
    Bets with a close.
  - `bets_without_close` integer  
    Bets without one.
  - `reference` string  
    The close used: consensus (the no-vig average across books).
  - `devig` string  
    How the vig was removed: multiplicative.
  - `lines_converted` integer  
    Bets whose close was carried from the closing line to the bet's line (NFL spreads and totals).
  - `coverage` number · nullable  
    Share of bets with a close probability (null with no bets).
  - `closes_stale` integer  
    Closes left out as older than 60 minutes at the start, or seen after it (audit F9): those bets keep their result but have no CLV.
  - `points_coverage` number · nullable  
    Share of bets with points beaten (spreads and totals).
  - `points_test` object · nullable  
    The clustered test on points beaten (audit F3).
    - `bets` integer  
      Bets with points beaten.
    - `mean` number · nullable  
      Mean points the bet's line beat the close by.
    - `std_error_clustered` number · nullable  
      Standard error clustered by slate and team-season.
    - `df_clustered` integer  
      Degrees of freedom: the fewer clusters less one.
    - `ci95_clustered` array of number · nullable  
      Clustered 95% interval.  
      min items 2 · max items 2
    - `p_value_clustered` number · nullable  
      One-sided p of mean points beaten > 0.
    - `cluster_method` string  
      How the standard error was clustered.
  - `basis` string  
    What Beats the close is judged on: probability, or points when under 80% of bets have a close probability and more have points beaten (audit F3).  
    One of: `probability`, `points` (open: new values may be added).
  - `mean` number · nullable  
    Mean CLV (fraction): the bets' expected ROI if the close is right.
  - `ci95` array of number · nullable  
    Clustered 95% interval on the mean.  
    min items 2 · max items 2
  - `p_value` number · nullable  
    One-sided clustered p of mean CLV > 0.
  - `beat_close_share` number · nullable  
    Share of bets with CLV above 0, ties counted.
  - `beat_rate` number · nullable  
    Share of bets that beat the close, ties left out.
  - `beat_rate_ci95` array of number · nullable  
    Wilson 95% interval on beat_rate.  
    min items 2 · max items 2
  - `sign_test_p` number · nullable  
    Exact one-sided sign test against half.
  - `mean_prob` number · nullable  
    Mean of the close's no-vig probability less the bet moment's.
  - `mean_points` number · nullable  
    Mean points the bet's line beat the closing line by (spreads and totals).
  - `points_bets` integer  
    Bets mean_points is over.
  - `profit_slope` number · nullable  
    Per-bet units regressed on CLV: near 1 when CLV turned into profit.
  - `profit_slope_se` number · nullable  
    Its slate-clustered standard error.
  - `sample_needed` integer · nullable  
    Bets CLV needs for a 95% interval to clear 0 at this mean and spread (null unless the mean is above 0).
  - `sample_needed_roi` integer · nullable  
    Bets profit would need at the same edge.
  - `significance` object · nullable  
    The CLV mean's tests (null under two bets).
    - `t` number · nullable  
      Mean over its iid standard error.
    - `ci95` array of number · nullable  
      Student 95% interval (iid).  
      min items 2 · max items 2
    - `std_error` number · nullable  
      iid standard error.
    - `bets_needed` number · nullable  
      Bets a t of 2 needs at this mean and spread.
    - `std_error_clustered` number · nullable  
      Standard error clustered by slate and team-season (F23).
    - `df_clustered` integer  
      Degrees of freedom: the fewer clusters less one.
    - `ci95_clustered` array of number · nullable  
      Clustered 95% interval.  
      min items 2 · max items 2
    - `p_value_clustered` number · nullable  
      One-sided p of mean CLV > 0 (wild cluster bootstrap under 42 slates, else Student t); beats_close reads it.
    - `cluster_method` string  
      How the standard error was clustered.
    - `design_effect` number · nullable  
      Clustered variance over iid variance.
  - `note` string  
    Why the block is empty, when it is.
- `luck` object  
  The luck-adjusted result (F20): the units the market's fair probabilities expected the decided bets to make against what they made. Pushes count zero both ways.
  - `reading` string  
    luck (bets before the close: the gap is outcome noise) or versus_the_market (bets at the close: the gap is the rule's edge on the closing market).  
    One of: `luck`, `versus_the_market` (open: new values may be added).
  - `close_source` string  
    consensus.
  - `devig` string  
    multiplicative.
  - `bets` integer  
    Decided bets with a fair probability.
  - `bets_without_prob` integer  
    Decided bets without one.
  - `left_out` object  
    Bets left out.
    - `push` integer  
      Pushes.
    - `half` integer  
      Half results (quarter lines).
  - `lines_converted` integer  
    Bets whose close was carried to the bet's line.
  - `expected_units` number · nullable  
    Sum of stake x (q x (price - 1) - (1 - q)).
  - `actual_units` number · nullable  
    Units the bets made.
  - `luck_units` number · nullable  
    actual_units less expected_units.
  - `luck_se_units` number · nullable  
    luck's standard error given the probabilities.
  - `expected_wins` number · nullable  
    Sum of q.
  - `actual_wins` integer · nullable  
    Wins.
  - `luck_percentile` number · nullable  
    Where the wins sit among the market's (Poisson-binomial, mid-p): 0.95 is luckier than (95) of (100) identical paths.
  - `expected_roi` number · nullable  
    expected_units over units risked.
  - `actual_roi` number · nullable  
    actual_units over units risked.
  - `theta` number · nullable  
    Per-bet units regressed on expected units (30 bets or more): near 1 when the close is calibrated on these bets.
  - `by_season` array of object  
    Each season, in calendar order; luck_units add up to the total.
    - `season` string  
      Season.
    - `bets` integer  
      Decided bets with a probability.
    - `expected_units` number  
      Units the market expected.
    - `actual_units` number  
      Units made.
    - `luck_units` number  
      actual_units less expected_units.
- `capacity` object · nullable  
  F8: the limits Kelly measured at the bet moment (ADR-K783); evidence beside the verdict, never in it. No book publishes its limits, so only measured ones are shown.
  - `available` boolean  
    Whether measured limits are shown for this market and moment.
  - `market` string · nullable  
    The market as line history names it (spreads, totals, h2h).
  - `before_start` string · nullable  
    The time before the start the bet moment falls in.  
    One of: `0_1h`, `1_12h`, `12_36h`, `36_72h`, `72h_plus` (open: new values may be added).
  - `books` array of object  
    Per book, highest median first.
    - `book` string · nullable  
      The book as the vendor names it.
    - `vendor` string · nullable  
      Who measured it.
    - `currency` string · nullable  
      The stake currency, null when the vendor doesn't say.
    - `median` number · nullable  
      The median limit.
    - `p25` number · nullable  
      Its 25th percentile.
    - `p75` number · nullable  
      Its 75th percentile.
    - `min` number · nullable  
      The smallest.
    - `max` number · nullable  
      The largest.
    - `snapshots` integer  
      Limit readings behind it.
    - `games` integer  
      Games behind it.
    - `first_seen` string · nullable  
      The first reading's date.
    - `last_seen` string · nullable  
      The last reading's date.
  - `max_stake_per_bet` object · nullable  
    The highest book median: the most one book typically took on one bet.
    - `book` string · nullable  
      The book.
    - `amount` number · nullable  
      The median limit.
    - `currency` string · nullable  
      Its currency.
  - `per_season_at_limit` number · nullable  
    max_stake_per_bet times the rule's bets a season.
  - `bets_per_season` number · nullable  
    The rule's bets a season.
  - `limits_held` integer  
    Limit readings Kelly holds for this market and moment.
  - `reason` string · nullable  
    Why none are shown, when available is false.
- `stress` object · required  
  The same bets graded harder.
  - `half_point_worse` object · nullable  
    Every line half a point worse (none for moneylines).
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
  - `flat_110` object · nullable  
    Every bet at -110 (none for moneylines).
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
  - `other_side` object  
    The other side of every bet.
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
  - `break_even` object · nullable  
    F7: how much worse the price or line can get before the profit is gone.
    - `price_multiplier` number · nullable  
      The share of each payout (d - 1) that breaks even (under 1: the room to spare).
    - `american_avg` number · nullable  
      The flat American price that breaks even.
    - `decimal_avg` number · nullable  
      The same, decimal.
    - `line_points` number · nullable  
      The most points worse (in halves, up to 3) the line could be with a profit left; 0 when none; null for moneylines.
  - `grid` array of object · nullable  
    F7: the bets at -105 to -120 with the line 0 to 1 point worse (moneylines: payouts cut 0-6%); left out at detail summary.
    - `vig` integer · nullable  
      Every bet at this American price.
    - `line_shift` number · nullable  
      Points the line moved (negative: worse).
    - `price_multiplier` number · nullable  
      Moneylines: the share of each payout kept.
    - `units` number · nullable  
      Units.
    - `roi` number · nullable  
      ROI.
  - `slippage_mc` object · nullable  
    F7: each bet's line worsened by a draw from the market's own Monday-to-close moves, 1,000 seeded runs; null without such moves.
    - `runs` integer  
      Runs.
    - `roi_p05` number · nullable  
      5th percentile ROI.
    - `roi_p50` number · nullable  
      Median ROI.
    - `profitable_share` number · nullable  
      Share of runs with a profit.
    - `moves_from` integer  
      Line moves the draws come from.
    - `move_median` number · nullable  
      Their median size, points.
  - `price_worse` object · nullable  
    Teasers: every ticket ten cents worse (price_american). Racing: every bet's winnings 5% smaller.
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
- `legs` object · nullable  
  Teasers: every teased leg, judged against the per-leg break-even (1/D)^(1/n).
  - `record` string  
    Legs won-lost(-pushed).
  - `decisions` integer  
    Legs won plus lost.
  - `cover_rate` number · nullable  
    Legs won over legs decided.
  - `break_even_per_leg` number  
    The cover rate a leg needs at the ticket's price.
  - `significance` object · nullable  
    The legs' record test against the per-leg break-even.
  - `sample_needed` object · nullable  
    Legs needed to tell this cover rate from the break-even.
- `teaser` object · nullable  
  Teasers: the options tested. Prices are assumed: Kelly holds no historical teaser prices.
  - `points` number  
    Points each leg moved.
  - `legs` integer  
    Legs a ticket.
  - `price` object  
    The ticket's price (American and decimal).
  - `reduced_prices` object  
    Prices for tickets reduced by a pushed leg, by legs left (American).
  - `push` string  
    reduce, lose or ticket_push.  
    One of: `reduce`, `lose`, `ticket_push` (open: new values may be added).
  - `pairing` string  
    all_pairs or chronological.  
    One of: `all_pairs`, `chronological` (open: new values may be added).
  - `leg_market` string  
    spread, over or under.  
    One of: `spread`, `over`, `under` (open: new values may be added).
  - `break_even_per_leg` number  
    (1/D)^(1/n) at the ticket's price.
  - `price_assumed` boolean  
    Always true: the price is the person's or a common book table.
  - `tickets` integer  
    Tickets formed.
- `random_baseline` object · nullable  
  F18: the rule against random bets of the same count on the same games, matched by season and price bucket.
  - `sims` integer  
    Random rules drawn.
  - `bets` integer  
    The rule's bets.
  - `pool` integer  
    Bets the market offered.
  - `percentile` number · nullable  
    Share of random rules with a lower ROI.
  - `beats_per_100` integer  
    Random rules out of 100 the rule beats.
  - `p_value` number · nullable  
    (1 + random rules at or above) / (sims + 1).
  - `analytic_p` number · nullable  
    The finite-population normal cross-check.
  - `random_roi_median` number · nullable  
    Median random ROI (about minus the vig).
  - `random_roi_p05` number · nullable  
    5th percentile random ROI.
  - `random_roi_p95` number · nullable  
    95th percentile.
  - `best_of_tests` object  
    Would the best of M random rules (M = rules tried) do this well?
    - `tests` integer  
      M.
    - `p_value` number · nullable  
      1 - F(ROI)^M.
  - `histogram` object · nullable  
    Random ROIs in 30 bins (edges, counts); full detail only.
- `decay` object · nullable  
  F24: is the rule still making money? Rolling ROI and CLV, one unknown break (sup-F, block permutation p), a CUSUM alarm, a known-date test, the trend and the decay ratio.
  - `bets` integer  
    Graded bets.
  - `window` integer · nullable  
    Rolling window, bets.
  - `rolling` array of object · nullable  
    Up to 200 points; full detail only.
  - `break` object · nullable  
    The most likely date the edge changed.
    - `at` string  
      Date.
    - `bet_index` integer  
      Bets before it.
    - `sup_f` number · nullable  
      sup-F.
    - `p_value` number · nullable  
      Block permutation p-value.
    - `at_edge` boolean  
      Within the first or last 15%: not a confirmed break.
    - `roi_before` number · nullable  
      ROI before.
    - `roi_after` number · nullable  
      ROI after.
    - `bets_after` integer  
      Bets after.
  - `cusum` object · nullable  
    Page's lower CUSUM alarm.
  - `known_break` object · nullable  
    A Chow test at break_date.
  - `trend_per_100_bets` number · nullable  
    Profit per bet's change per 100 bets (1 unit risked).
  - `decay_ratio` number · nullable  
    ROI after the break (or the newest 30%) over ROI before.
  - `clv_break` object · nullable  
    The break test on CLV.
  - `roi_newest_30` number · nullable  
    ROI of the newest 30% of bets.
- `ablation` object · nullable  
  F27: each top-level AND condition's Shapley share of the units beyond the base's ROI.
  - `base` object  
    Every game with a line: decisions and ROI.
  - `total` number · nullable  
    The rule's units beyond the base's ROI (the Shapley values add up to it).
  - `clauses` array of object  
    One a condition, in the order written.
    - `condition` string  
      The condition.
    - `shapley_units` number · nullable  
      Its share of the extra units.
    - `share` number · nullable  
      Of the total.
    - `label` string  
      dead, harmful, load_bearing or helps.  
      One of: `dead`, `harmful`, `load_bearing`, `helps` (open: new values may be added).
    - `fix` object · nullable  
      Remove it: the rule without it.
  - `pairs` array of object  
    Pairs (up to 6 conditions).
  - `method` string  
    exact or sampled.  
    One of: `exact`, `sampled` (open: new values may be added).
- `nearby` object · nullable  
  F28: every number in the rule moved two steps each way (steps fixed by the field).
  - `numbers` array of object  
    The rule's numbers.
  - `variants` integer  
    Variants in the grid.
  - `distinct_bet_sets` integer  
    Variants with their own bets.
  - `roi_median` number · nullable  
    Median ROI of the variants.
  - `roi_p05` number · nullable  
    5th percentile.
  - `roi_p95` number · nullable  
    95th percentile.
  - `plateau_share` number · nullable  
    Share of one-step neighbours that made money.
  - `spike_ratio` number · nullable  
    (ROI - median) / IQR of the variants.
  - `reading` string · nullable  
    plateau, slope or spike.
  - `na` string · nullable  
    Why there are no numbers to move.
- `monte_carlo` object · nullable  
  F31: drawdowns and losing runs the same bets give in other orders.
  - `sims` integer  
    Simulations.
  - `mode` string  
    block, iid or permutation.
  - `max_drawdown_units` object  
    Max drawdown, units.
    - `p05` number · nullable  
      5th percentile.
    - `p50` number · nullable  
      Median.
    - `p95` number · nullable  
      95th percentile.
    - `actual` number · nullable  
      The real order's figure.
  - `longest_losing_run` object  
    Longest losing run, bets.
    - `p05` number · nullable  
      5th percentile.
    - `p50` number · nullable  
      Median.
    - `p95` number · nullable  
      95th percentile.
    - `actual` number · nullable  
      The real order's figure.
  - `final_units` object  
    Final units.
    - `p05` number · nullable  
      5th percentile.
    - `p50` number · nullable  
      Median.
    - `p95` number · nullable  
      95th percentile.
    - `actual` number · nullable  
      The real order's figure.
  - `prob_below_zero` number · nullable  
    Share of runs finishing below zero.
  - `worst_100_bets_units_p05` number · nullable  
    5th percentile of the worst 100-bet stretch.
- `noise` object · nullable  
  F32: jittered inputs, lines moved half a point either way, and an earlier bet moment.
  - `inputs` object · nullable  
    The rule's compared numbers jittered.
    - `runs` integer  
      Runs.
    - `profitable_runs` integer  
      Runs with a profit.
    - `profitable_share` number · nullable  
      Share.
    - `roi_median` number · nullable  
      Median ROI.
    - `roi_p05` number · nullable  
      5th percentile ROI.
    - `overlap_median` number · nullable  
      Median Jaccard overlap of the bets with the rule's.
  - `lines` object · nullable  
    Lines (moneylines: payouts) moved at random.
  - `delay` object · nullable  
    The rule bet at the earlier moment.
- `concentration` object · nullable  
  F34: the profit without the best season, team, opponent, month and weekday.
  - `by` array of object  
    Groupings in a fixed order.
    - `group` string  
      season, team, opponent, month or weekday.
    - `best` object · nullable  
      The best group (3+ bets).
    - `without_best` object · nullable  
      The rule without it.
    - `effective_groups` number · nullable  
      1 / Herfindahl of the profitable groups' shares.
    - `p_more_concentrated` number · nullable  
      Permutation p-value (teams and opponents).
  - `trim_top_0_05` object · nullable  
    Without the top 5% of bets (moneylines) or bet-days.
- `split_dimensions` array of object · nullable  
  F35: the rule by fixed dimensions with shrunk ROI and intervals.
  - `dimension` string  
    The dimension.
  - `heterogeneity_p` number · nullable  
    Chi-square p-value of win rates across its levels.
  - `heterogeneity_q` number · nullable  
    Benjamini-Hochberg q across the dimensions.
  - `real_difference` boolean  
    q < 0.10.
  - `where_profit` string · nullable  
    The level with the most shrunk extra units, when real.
  - `cells` array of object · nullable  
    Levels in a fixed order; full detail only.
- `robustness` object  
  The suite's run: the verdict v2 checks it feeds and its seed.
  - `checks` array of object  
    half_point_worse, nearby_holds, not_concentrated and still_working.
    - `key` string · required  
      The check.  
      One of: `half_point_worse`, `nearby_holds`, `not_concentrated`, `still_working` (open: new values may be added).
    - `label` string · required  
      The check, in words.
    - `status` string · required  
      pass, fail or na.  
      One of: `pass`, `fail`, `na` (open: new values may be added).
    - `value` string · required  
      The figure behind it, in words.
    - `statistic` number · nullable  
      The figure the status compares.
    - `threshold` number · nullable  
      What it is compared with.
  - `fast_path` boolean  
    The rule's numbers were re-bet from its compiled columns.
  - `seed` integer  
    The seed (a hash of the rule and its options).
  - `evaluations` integer  
    Formula evaluations the suite ran.
  - `off` array of string  
    Blocks switched off.
- `path` object  
  The units path in date order: drawdown and longest losing run; at detail full its series (F47).
  - `max_drawdown_units` number  
    The deepest fall from a peak, units.
  - `longest_losing_run` integer  
    Most losses in a row (pushes don't break it).
  - `series` object · nullable  
    Bet-indexed lines of the graded bets (detail full): `index` the bet numbers kept (past 600 bets thinned by LTTB, the deepest drawdown always kept), `dates`, `units`, `drawdown`, `base_units` (the market base's ROI at the same stakes, null unless measured), `band_p025` and `band_p975` (the no-skill range: 1,000 seeded runs of the same bets at their fair chances; null under 20 bets or for racing), `rolling_roi_100` with its no-skill range `rolling_p025` and `rolling_p975`, and `markers` (season starts, the holdout).
    - `x` string  
      Always bet_index.  
      One of: `bet_index` (open: new values may be added).
    - `index` array of integer  
      Bet numbers (1 is the first graded bet).
    - `dates` array of string  
      Each kept bet's date (YYYY-MM-DD, UTC).
    - `units` array of number  
      Units to date.
    - `drawdown` array of number  
      Units below the running peak (0 or below).
    - `base_units` array of number · nullable  
      The market base at the same stakes.
    - `band_p025` array of number · nullable  
      No-skill 2.5th percentile.
    - `band_p975` array of number · nullable  
      No-skill 97.5th percentile.
    - `rolling_roi_100` array of number  
      ROI over the last 100 bets (null before).
    - `rolling_p025` array of number  
      Its no-skill 2.5th percentile.
    - `rolling_p975` array of number  
      Its no-skill 97.5th percentile.
    - `markers` array of object  
      Where each season and the holdout start.
      - `type` string  
        season or holdout.  
        One of: `season`, `holdout` (open: new values may be added).
      - `at` integer  
        The bet number it starts at.
      - `label` string · nullable  
        The season, or newest 30%.
  - `downsampled` boolean  
    The series were thinned to 600 points.
  - `expected_max_drawdown_zero_edge` number · nullable  
    The median deepest drawdown of the no-skill runs, units.
- `holdout` object · nullable  
  The latest 30% of bets against the earlier 70%.
- `seasons` array of object  
  Seasons in calendar order.
- `splits` array of object · nullable  
  Home, away, favorite, underdog and line bands, in a fixed order; null at detail summary.
  - `record` string  
    Wins-losses(-pushes).
  - `bets` integer  
    Bets graded or not.
  - `decisions` integer  
    Wins plus losses.
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `units` number · nullable  
    Units won or lost at the staking asked for.
  - `roi` number · nullable  
    Units over units risked.
  - `p_value` number · nullable  
    The record's own p-value against no skill at its prices.
  - `p_adjusted` number · nullable  
    On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
  - `shown_rows` integer  
    On splits and condition-removed rows: the rows p_adjusted counts.
- `without` array of object · nullable  
  One row a top-level AND condition: the rule's record without it; null at detail summary.
  - `record` string  
    Wins-losses(-pushes).
  - `bets` integer  
    Bets graded or not.
  - `decisions` integer  
    Wins plus losses.
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `units` number · nullable  
    Units won or lost at the staking asked for.
  - `roi` number · nullable  
    Units over units risked.
  - `p_value` number · nullable  
    The record's own p-value against no skill at its prices.
  - `p_adjusted` number · nullable  
    On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
  - `shown_rows` integer  
    On splits and condition-removed rows: the rows p_adjusted counts.
  - `p_value_vs_rule` number · nullable  
    The rule against the bets the condition removes (F19).
  - `p_value_vs_rule_adjusted` number · nullable  
    p_value_vs_rule, Holm-adjusted over the conditions shown.
- `bets` array of object  
  Every bet in date order (left out at detail summary).
  - `key` string  
    {game_id}:{team_id} (racing: {race_id}:{runner_id}).
  - `starts_at` string  
    Kickoff (RFC 3339).  
    format date-time
  - `season` string  
    The season.
  - `label` string  
    Date, team and opponent.
  - `price` object · nullable  
    The price at the bet moment, decimal.
  - `line` number · nullable  
    The bet's line as graded (the team's spread, the total).
  - `result` string · nullable  
    win, loss or push (soccer quarter lines: half_win or half_loss); null until played.
  - `close_prob` number · nullable  
    The fair closing probability of the same side, for CLV.
  - `units_to_date` number  
    Units after this bet, in date order.
  - `how_graded` string · nullable  
    How the bet was graded, in words.
  - `units` number · nullable  
    Units the bet won or lost at the run's staking (racing: its exact profit or loss with dead heats, each way, Rule 4 and commission); null until played.
  - `drawdown_to_date` number · nullable  
    Units to date less their running peak (0 or below); null until played.
  - `side` string · nullable  
    home or away (spread, moneyline), over, under or draw.
  - `market` string  
    The market graded (the other total when fading a total).
  - `bet_moment` string  
    When the bet was taken: edition, day_before or close.
  - `clv_prob` number · nullable  
    The fair closing chance less the fair chance at the bet moment, when Kelly holds both.
  - `sample` string · nullable  
    holdout for the latest 30% of graded bets by time, else in_sample; null with no holdout or until played.  
    One of: `in_sample`, `holdout` (open: new values may be added).
  - `why` array of object  
    Why it matched: up to six conditions (F46).
    - `clause` string  
      The condition as written.
    - `value` number | boolean | string · nullable  
      The compared expression's number for a comparison (rest_days - opponent.rest_days for rest_days - opponent.rest_days >= 3), else true or false.
  - `settlement` array of string  
    The settlement rules that decided the bet (IDs in settlement.rules).
- `leak_test` object  
  The leak test (F3): the rule and each part of it evaluated again on a sample of rows with the data cut at the bet moment. A leak refuses the test (422 rule_not_testable, problem leak_found), so a report always says clean or not_run.
  - `status` string · required  
    clean, leak_found or not_run.  
    One of: `clean`, `leak_found`, `not_run` (open: new values may be added).
  - `rows_checked` integer · required  
    Rows rebuilt at the bet moment.
  - `matched_checked` integer  
    Of them, rows the rule matched.
  - `matches_flipped` integer  
    Rows whose match changed with the data cut.
  - `parts` array of object · required  
    Parts that changed, in the formula's order (empty when clean).
    - `name` string  
      The part, as written (rule is the whole rule).
    - `rows_changed` integer  
      Rows where it changed.
    - `max_change` number · nullable  
      The largest change in a number.
    - `example` string  
      One changed row, {game_id}:{team_id}.
- `warm_up` object  
  The warm-up check (F4): bets taken before the rule's windows had the earlier games they read (one season at a time; windows never reach into last season).
  - `policy` string  
    The policy graded in the report.  
    One of: `as_written`, `require_full` (open: new values may be added).
  - `games_needed` integer  
    Earlier games every window needs (0: the rule has no window).
  - `windows` array of object  
    Each window in the formula's order.
    - `expr` string  
      The window, as written.
    - `games_needed` integer · nullable  
      Earlier games it reads (null: season to date).
    - `short_rows` integer  
      Rows in scope with fewer earlier games this season.
    - `short_bets` integer  
      Bets the rule took with fewer.
  - `short_bets` integer  
    Bets taken with a window short.
  - `by_policy` array of object · nullable  
    as_written, then require_full; null when the rule has no window.
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
  - `warning` boolean  
    Short bets are over 10% of the bets, or leaving them out moves ROI by more than half its 95% interval's half-width.
- `settlement` object  
  How bets were settled (F9): Kelly's own grading rules as data, and each rule's bets.
  - `profile` string  
    The rules profile (kelly_standard).
  - `rules_version` string  
    The rules table's date.
  - `applied` array of object  
    Rules that decided at least one bet, in table order.
    - `rule` string  
      Rule ID.
    - `bets` integer  
      Bets.
  - `rules` array of object  
    The rules for this league and market.
    - `id` string  
      Rule ID.
    - `text` string  
      The rule in words.
    - `effective_from` string  
      The date Kelly's grader took it up.
- `coverage` object  
  Coverage (F10): from every game in scope to the bets graded, each season's priced share, blank inputs and whether the rows left out for no line differ from the bets kept.
  - `flow` array of object  
    The steps in order; rule_true rows = decisions + every row out after it.
    - `step` string  
      in_scope, rule_true, one_bet_a_game, full_windows, priced, graded or decisions.
    - `games` integer  
      Games (in_scope only).
    - `rows` integer  
      Rows.
    - `out` object  
      Rows that left at this step, by reason.
  - `by_season` array of object  
    Every season asked for, in order.
    - `season` string  
      Season.
    - `games` integer  
      Games in scope.
    - `rows` integer  
      Rows.
    - `rule_true` integer  
      Rows the rule matched.
    - `bets` integer  
      Bets graded.
    - `priced_share` number · nullable  
      Share of rows with a price at the bet moment.
  - `inputs_missing` array of object  
    Inputs read bare on the row, with blanks.
    - `attribute` string  
      The input.
    - `rows_blank` integer  
      Rows with no value.
    - `share` number · nullable  
      Share of rows in scope.
  - `left_out_differs` object  
    Rows left out for no line against the bets kept: standardized mean difference over home, neutral site and rest days; flagged over 0.1 with 10 or more left out.
    - `flag` boolean  
      They differ.
    - `max_smd` number · nullable  
      The largest difference.
    - `covariate` string · nullable  
      Where it is.
    - `left_out` integer  
      Rows.
    - `kept` integer  
      Rows.
    - `by_covariate` array of object  
      Each covariate's difference.
- `moment` object  
  The bet moment's clock (F5): its target time, the prices' snapshot age at it and where the lines came from.
  - `bet_moment` string  
    edition, day_before or close.
  - `target` string · nullable  
    The moment's time for a game, in words.
  - `max_stale_minutes` integer  
    Oldest price kept, in minutes before the target.
  - `floor_minutes_before_oct_2022` integer  
    The limit's floor for games before October 2022 (the Odds API's 10-minute snapshots).
  - `rows_priced` integer  
    Rows the rule took that had a price.
  - `rows_aged` integer  
    Rows whose price carries its snapshot time and was kept.
  - `median_snapshot_age_minutes` number · nullable  
    Median minutes from snapshot to target, kept rows.
  - `max_snapshot_age_minutes` number · nullable  
    Oldest kept snapshot, in minutes before the target.
  - `stale_price` integer  
    Rows left out: price older than max_stale_minutes.
  - `after_moment` integer  
    Rows left out: price seen after the target.
  - `age_unknown` integer  
    Rows kept whose price has no snapshot time (Kelly's own frozen lines).
  - `line_sources` object  
    Kept rows by line source (sheet_line, odds_api_early, odds_api_close).
- `left_out` object · required  
  Games the rule matched but didn't bet.
  - `no_line` integer  
    No Kelly line at the bet moment.
  - `both_sides` integer  
    The rule matched both teams.
  - `stale_price` integer  
    The price was older than max_stale_minutes at the bet moment, or seen after it (F5).
  - `unpaired` integer  
    Teasers: legs left off a ticket (a week with too few, or the leftover in chronological pairing).
  - `no_price` integer  
    Racing: runners with no price to settle at.
  - `non_runners` integer  
    Racing: non-runners (void).
  - `void_races` integer  
    Racing: abandoned or void races.
- `risk` object  
  Risk of ruin (F36, kmath.backtest.rule_ruin): the chance of losing ruin_share of the bankroll within horizon_bets bets betting like the record, with its win rate taken as exact and allowing for its sample (a Beta posterior draw a path); the Lundberg bound; the bankroll curve.
  - `bankroll_units` number  
    Bankroll in units.
  - `ruin_share` number  
    Share of the bankroll whose loss counts as ruin.
  - `horizon_bets` integer  
    Bets ahead.
  - `ruin_if_rate_exact` number · nullable  
    Ruin chance if the record's win rate were exact.
  - `ruin_allowing_error` number · nullable  
    Ruin chance allowing for how little the record's sample tells.
  - `estimation_premium` number · nullable  
    The second less the first.
  - `lose_all_ever` number · nullable  
    Lundberg bound on ever losing the whole bankroll at the exact rate.
  - `lose_all_ever_allowing_error` number · nullable  
    The same, averaged over the win rate's posterior.
  - `drawdown_p95_units` number · nullable  
    95th percentile of the worst drop over the horizon, units.
  - `down_after_horizon` number · nullable  
    Chance of being down after the horizon.
  - `bankroll_for_ruin_005_units` number · nullable  
    Smallest bankroll whose ruin chance is at most 0.05.
  - `curve` array of object · nullable  
    Ruin chance by bankroll size; null at detail summary.
  - `status` string  
    ok, or too_few (under 30 decisions: closed form only).  
    One of: `ok`, `too_few` (open: new values may be added).
- `staking_plans` object  
  Staking plans replayed over the real bet order (F37, kmath.backtest.staking_replay). The Kelly criterion's fractions and the kelly plan are stake mode: on askkelly.ai only, for a signed-in, attested person; elsewhere null with withheld (D34).
  - `kelly` object  
    The Kelly criterion at the record's win rate and mean price, the Baker-McHale multiple for its sample size and the fraction bet.
    - `full_fraction` number · nullable  
      Full Kelly criterion (stake mode; null off askkelly.ai).
    - `shrink` number · nullable  
      The shrink for the sample size.
    - `honest_fraction` number · nullable  
      The fraction bet: shrink × full, capped; 0 unless the verdict is promising or holds up (stake mode; null off askkelly.ai).
    - `withheld` string  
      Why the stake-mode figures are null.  
      One of: `stake_first_party_only` (open: new values may be added).
  - `plans` array of object  
    Each plan asked for, in the order asked.
    - `plan` string  
      flat, to_win, percent or kelly.  
      One of: `flat`, `to_win`, `percent`, `kelly` (open: new values may be added).
- `risk_adjusted` object  
  Risk-adjusted stats per unit risked (F40, kmath.backtest.risk_adjusted), with 95% intervals from a day-block bootstrap; at detail summary only sharpe_per_bet and profit_factor.
  - `sharpe_per_bet` number · nullable  
    Mean return over its standard deviation, a bet.
  - `profit_factor` number · nullable  
    Units won over units lost (null with no losing bet).
- `caps` object · nullable  
  Exposure caps applied in time order (F39); the record and checks are on the capped ledger.
  - `skipped` integer  
    Bets the caps skipped.
  - `by_reason` object  
    Skipped bets by cap.
  - `uncapped` object  
    The record without the caps.
  - `random_priority_mean_roi` number · nullable  
    Mean ROI over random tie-breaks.
- `rule` object · required  
  The rule and the options it was tested with.
  - `rule_hash` string  
    The rule's identity: SHA-256 of its canonical formula (spacing, case and the order of AND and OR conditions don't change it) with the competition, market, side, bet moment, seasons, season type, stake and price. Detail and tests are not part of it.  
    pattern ^sha256:[0-9a-f]{64}$
  - `translation_id` string  
    The rules:translate result this formula came from (F43), when the request named one.  
    pattern ^tx_[0-9a-hjkmnp-tv-z]{20}$
  - `reads` array of object  
    Every name the rule reads, once.
    - `name` string  
      The attribute, with its relation (opponent.rest_days).
    - `known` string  
      Its moment: static, pregame, edition, close or final (a window's input is read before the game).
    - `windowed` boolean  
      A backward window reads it (earlier games only).
  - `formula_version` string  
    The formula language version the rule was read with (F45).
  - `catalogue_version` string · nullable  
    The stat catalogue version its names were bound against.
- `report` object  
  A shared report's own facts (get_rule_report only, F54).
  - `report_id` string  
    The report.
  - `report_url` string  
    Its page.  
    format uri
  - `visibility` string  
    unlisted or public.  
    One of: `unlisted`, `public` (open: new values may be added).
  - `author_rules_tried` integer  
    The author's rules tried on this market when shared.
  - `shared_at` string  
    When it was shared.  
    format date-time
  - `frozen` boolean  
    Always true.
  - `rerun` object  
    The run's request, to test it again on today's data.
- `report_url` string · nullable  
  A frozen report of this run anyone with the link can open (F54): only when the request asked (share) and the call has an account; else null. share_rule_run makes or changes one later.  
  format uri
- `charts` array of object  
  Only when the request asked (charts) at detail full: equity against the no-skill band, the drawdown and the rolling ROI as Kelly Chart Specs (F47).
- `transfer` object · nullable  
  Other markets and sports (F33): the same rule on its other market and on other leagues, numbers mapped to the same meaning, pooled with DerSimonian-Laird random effects. Evidence beside the verdict, never part of it; these runs don't count toward rules tried. Present only when the request asks for transfer.
  - `status` string  
    measured or na.  
    One of: `measured`, `na` (open: new values may be added).
  - `why` string · nullable  
    Why nothing ran, when nothing did.
  - `options` object  
    The leagues, markets and thresholds asked for.
  - `cells` array of object  
    Each market and league in a fixed order (the other market first, then sibling leagues), never sorted by a result; up to 12.
    - `competition` string  
      The league.
    - `market` string  
      The market.
    - `thresholds` string  
      literal (the rule's own numbers) or quantile (each number moved to the same percentile of its field in this league).  
      One of: `literal`, `quantile` (open: new values may be added).
    - `formula` string  
      The formula this cell ran (quantile cells carry the moved numbers).
    - `seasons` array of string  
      Seasons read, as this league labels them.
    - `mapped` array of object · nullable  
      Quantile cells only.
      - `number` string  
        The number as written.
      - `field` string  
        What it is compared with.
      - `percentile` number · nullable  
        Its percentile in the rule's own league (a fraction).
      - `value` number · nullable  
        The number at the same percentile here.
    - `decisions` integer  
      Wins plus losses.
    - `bets` integer  
      Graded bets.
    - `record` string  
      Wins-losses(-pushes).
    - `units` number · nullable  
      Units won or lost.
    - `roi` number · nullable  
      Units over units risked.
    - `roi_ci95` array of number · nullable  
      ROI's 95% score interval.
    - `se` number · nullable  
      ROI's standard error at 1 unit risked a bet.
    - `p_value` number · nullable  
      The cell's own one-sided p against no skill at its prices.
    - `p_holm` number · nullable  
      Holm's adjusted p across the cells.
    - `pooled` boolean  
      The cell is in the pool (another league, one a league, 10+ decisions).
  - `pooled` object · nullable  
    The pool of the other leagues' cells.
    - `roi` number · nullable  
      Random-effects ROI.
    - `roi_ci95` array of number · nullable  
      Its 95% interval.
    - `se` number · nullable  
      Its standard error.
    - `p_value` number · nullable  
      Two-sided p of the pooled ROI.
    - `i2` number · nullable  
      I²: the share of the spread across leagues beyond chance (a fraction).
    - `tau2` number · nullable  
      τ²: the between-league variance of true ROI.
    - `q` number · nullable  
      Cochran's Q.
    - `cells` integer  
      Cells pooled.
  - `same_direction` object · nullable  
    Pooled cells whose ROI has the rule's own sign.
    - `agree` integer  
      Cells the same way.
    - `cells` integer  
      Cells.
    - `p_value` number · nullable  
      Two-sided sign-test p.
    - `text` string  
      "4 of 5".
  - `not_testable` array of object  
    Leagues and markets left out, with why.
    - `competition` string  
      The league.
    - `market` string · nullable  
      The market.
    - `missing` array of string  
      Fields that league lacks.
    - `why` string  
      Why.
  - `note` string  
    What the panel is and isn't.
- `run_id` string · nullable  
  This run, kept on the account (`run_…`): the same request on the same data is the same run. GET /v1/rules/runs/{run_id} reads it back. Null without an account.  
  pattern ^run_[0-9a-hjkmnp-tv-z]{20}$
- `data_version` string  
  The data the run read: Kelly's lake snapshot (or the data's as-of time). A new snapshot is a new run of the same rule.
- `manifest` object · nullable  
  What this run read and ran, so the same request can be run again and checked against it (ADR-K885). No prices, lines or rows of source data.
  - `version` integer  
    The manifest's own layout version.
  - `code` object  
    The code that graded the run.
    - `engine` integer  
      The tester's revision; it rises with any fix that can move a result on the same data.
    - `release` string · nullable  
      The deployed commit.
    - `formula_version` string · nullable  
      The formula language's version.
    - `catalogue_version` string · nullable  
      The stat catalogue's version.
    - `attributes_sha256` string · nullable  
      A hash of the attribute registry: what each input means and when it is known.
    - `settlement_rules` string · nullable  
      The settlement rules' version.
  - `data` object  
    The data the run read.
    - `version` string  
      The same value as data_version.
    - `snapshots` array of string  
      The lake snapshots read, in order.
    - `one_snapshot` boolean  
      Whether every season was read on one snapshot.
    - `as_of` string · nullable  
      When the read was made (RFC 3339).  
      format date-time
    - `data_through` object  
      How far Kelly's history went, by league.
    - `latest_result` string · nullable  
      The newest game read that had a result.
    - `rows_built_at` string · nullable  
      When the prepared rows were built, where the run read them.  
      format date-time
    - `queries` object  
      Each reviewed lake query the tester reads, with a hash of its text.
  - `request` object  
    The request.
    - `request_hash` string  
      The request's hash.
    - `rule_hash` string  
      The rule's hash.
    - `seed` integer  
      The seed every simulation in the run used.
  - `sources` object  
    Where the run's inputs came from.
    - `prices` object  
      Bets priced, by the source of the line.
    - `inputs` array of object  
      Each input the rule read, with the moment it is known.
      - `name` string  
        The input.
      - `known` string · nullable  
        The moment it is known.
  - `seasons` array of object  
    Each season read.
    - `season` string  
      The season.
    - `rows` integer  
      Team-games in scope.
    - `priced_share` number · nullable  
      The share Kelly holds a price for at the bet moment.
  - `left_out` object  
    Matched games that were not bet, by reason.
  - `sha256` string  
    The hash of this block. Two runs with the same hash read the same data with the same code.
- `since_run` object · nullable  
  Only on a run read back: what has changed in Kelly's tester since the run was kept.
  - `status` string  
    current: nothing that can move its numbers changed. superseded: something did. no_manifest: the run was kept before manifests.  
    One of: `current`, `superseded`, `no_manifest` (open: new values may be added).
  - `engine_changed` boolean · nullable  
    Whether the tester's revision has risen since.
  - `changed` array of object  
    The parts that differ, each with its value then (from) and now (to).
    - `part` string  
      engine, release, formula_language, catalogue, attributes, settlement_rules or queries.
- `tested_at` string  
  When the run was kept (RFC 3339); only on a run read back.  
  format date-time
- `rule_version` object · nullable  
  The saved rule this test was kept under (save, or rule_id): its rule_id, name, version and versions_tried. Null when the test wasn't saved.
  - `rule_id` string · required  
    The saved rule (rl_…).  
    pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$
  - `name` string  
    Its name.
  - `version` integer · required  
    This rule's version under it: the same rule again keeps its version.  
    min 1
  - `new_version` boolean  
    This test made a new version.
  - `versions_tried` integer · required  
    Versions saved under it, this one included.  
    min 1
- `since_saved` object · nullable  
  The saved version's record since it was saved (backtester T6, F50), when the test names its rule_id and repeats that version: verdict v2's since_saved check reads it. Null for a new version (its clock starts now) or an unsaved test.
  - `saved_at` string · nullable  
    When the clock started: the version's save, or the registration (RFC 3339).  
    format date-time
  - `record` string · required  
    Wins-losses(-pushes) since then.
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `decisions` integer · required  
    Wins plus losses.
  - `bets` integer  
    Graded bets.
  - `units` number · required  
    Units won or lost.
  - `roi` number · nullable  
    Units over units risked, a fraction.
  - `clv_mean` number · nullable  
    Mean closing-line value of the bets (null at the close: none by definition).
  - `clv_bets` integer  
    Bets with a closing-line value.
  - `e_value` number · nullable  
    Anytime-valid e-value of the forward bets against no edge at the prices taken (safe to read every day).
  - `max_e_value` number · nullable  
    Its running maximum.
  - `e_threshold` number  
    The e-value that counts as evidence at alpha 0.05 (20).
  - `vs_backtest` object · nullable  
    Is live consistent with the backtest?
    - `win_rate_backtest` number  
      The backtest's win rate.
    - `win_rate_forward` number · nullable  
      The win rate since the save.
    - `p_value_difference` number · nullable  
      Two-sided p-value that the two win rates differ.
    - `method` string · nullable  
      fisher_exact (under 30 forward decisions) or two_proportion_z.
    - `e_value_worse` number  
      E-value that live wins less often than the backtest; 20 or more fails the check.
  - `pending` integer  
    Bets recorded at their bet moment, not yet final.
  - `no_line` integer  
    Matches Kelly held no line for at the bet moment (kept, never skipped).
  - `void` integer  
    Postponed games past the window.
  - `status` string · required  
    The since_saved check: na until min_decisions, then pass or fail.  
    One of: `na`, `pass`, `fail` (open: new values may be added).
  - `min_decisions` integer  
    Forward decisions before the check is judged (30).
  - `last_bet_at` string · nullable  
    The latest bet moment recorded.  
    format date-time
- `tests_on_account` object · nullable  
  Rules this account has tried on this competition and market, this one included (the rules-tried ledger: every distinct rule tested on the site, the API or Kelly MCP, kept for good). The not-luck check adjusts for the larger of this count and the request's own tests. Null when the call has no account.
  - `competition` string · required  
    The competition.
  - `market` string · required  
    The market.
  - `count` integer · required  
    Distinct rules tried.  
    min 1
  - `shown_counted` integer  
    Variants an earlier report showed (its condition-removed forms, nearby numbers and home or away splits) that joined the count because this rule is one of them (audit F6).
- `staking` string  
  How each bet was staked.
- `matched` integer  
  Bets taken.
- `ungraded` integer  
  Bets not yet played.
- `notice` string · required  
  This tests a rule on past games; it isn't a pick.
- `calibration` object · nullable  
  output: probability only. The formula's chances against the market's no-vig close of the same side (moneyline: the team wins; spread: it covers the bet's line), on the newest 30% of the scored team-games (whole days), and the bets it makes at the edge threshold.
  - `formula` string  
    The probability formula as sent.
  - `bet_formula` string  
    The rule it bets: the chance at the bet's own price worth more than the edge threshold (the rule tested, counted and kept).
  - `edge_threshold` number  
    Expected return a bet needs, p × decimal price − 1 (0.02 by default).
  - `basis` string  
    newest_30: scored on the holdout only.  
    One of: `newest_30` (open: new values may be added).
  - `games` integer  
    Games scored.
  - `rows` integer  
    Team-games scored (both teams of a game).
  - `in_sample_rows` integer  
    Team-games before the holdout, not scored.
  - `holdout_from` string · nullable  
    The holdout's first day.
  - `left_out` object  
    Team-games not scored.
    - `pushes` integer  
      Pushes and half results.
    - `outside_0_1` integer  
      Values below 0 or above 1.
    - `no_value` integer  
      Rows the formula gave no number for.
  - `clipped` integer  
    Values of 0 or 1 clipped to 1e-6 from the edge.
  - `brier` number · nullable  
    Brier score of the formula.
  - `brier_market` number · nullable  
    Brier score of the close.
  - `brier_skill` number · nullable  
    1 − formula / close (above 0: the formula scores better).
  - `log_loss` number · nullable  
    Log loss of the formula.
  - `log_loss_market` number · nullable  
    Log loss of the close.
  - `log_loss_skill` number · nullable  
    1 − formula / close.
  - `dm_p_value` number · nullable  
    Diebold–Mariano p on the per-game log-loss difference (two-sided).
  - `dm_statistic` number · nullable  
    The HLN-corrected statistic (positive: the formula's loss is higher).
  - `mcb` number · nullable  
    CORP miscalibration (Brier).
  - `dsc` number · nullable  
    CORP discrimination.
  - `unc` number · nullable  
    Uncertainty; brier = mcb − dsc + unc.
  - `mcb_p_value` number · nullable  
    The MCB test: the chance a calibrated formula looks this miscalibrated (999 resamples).
  - `reliability` array of object · nullable  
    The CORP reliability curve at up to 20 forecast values.
    - `p` number · nullable  
      The formula's probability.
    - `observed` number · nullable  
      How often it happened (PAV fit).
    - `lo` number · nullable  
      90% consistency band, low.
    - `hi` number · nullable  
      90% consistency band, high.
  - `ece` number · nullable  
    Expected calibration error over ten equal-width bins (bin-dependent; for familiarity).
  - `distinct_forecasts` integer  
    Distinct values the formula gave.
  - `slope` number · nullable  
    Calibration slope b in y ~ a + b·logit p (1 is ideal; under 1 overconfident).
  - `slope_se` number · nullable  
    Its game-clustered standard error.
  - `intercept` number · nullable  
    Calibration intercept a (0 is ideal).
  - `encompassing` object · nullable  
    y ~ a + b_q·logit q + b_p·logit p, game-clustered: does the formula know something the close doesn't?
    - `b_model` number · nullable  
      b_p.
    - `b_market` number · nullable  
      b_q.
    - `se_model` number · nullable  
      b_p's standard error.
    - `p_value` number · nullable  
      Two-sided p of b_p.
  - `edge_bins` array of object · nullable  
    Realized results against the formula's edge.
    - `edge` number · nullable  
      Mean of p − q in the bin.
    - `realized_minus_market` number · nullable  
      Mean of y − q in the bin.
    - `rows` integer  
      Team-games in the bin.
  - `status` string  
    The calibrated check: pass, fail or na (under 200 games, or one value).  
    One of: `pass`, `fail`, `na` (open: new values may be added).
  - `value` string  
    The check's line.
  - `statistic` number · nullable  
    The encompassing p.
  - `threshold` number · nullable  
    0.05.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found)

### Example
```http
GET https://api.askkelly.ai/v1/rules/runs/run_mkytv75qe5a297z7y3af
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "rule_test",
  "clv": {
    "ci95": null,
    "mean": null,
    "note": "Bets at the close have no closing-line value by definition.",
    "basis": "probability",
    "devig": "multiplicative",
    "p_value": null,
    "coverage": 0,
    "beat_rate": null,
    "mean_prob": null,
    "reference": "consensus",
    "mean_points": null,
    "points_bets": 0,
    "points_test": null,
    "sign_test_p": null,
    "closes_stale": 0,
    "profit_slope": null,
    "significance": null,
    "sample_needed": null,
    "beat_rate_ci95": null,
    "bets_with_close": 0,
    "lines_converted": 0,
    "points_coverage": 0,
    "profit_slope_se": null,
    "beat_close_share": null,
    "sample_needed_roi": null,
    "bets_without_close": 1
  },
  "base": {
    "why": "the rule has no who-or-when condition to filter, so its base is the whole market",
    "source": "market",
    "status": "na",
    "formula": null
  },
  "caps": null,
  "luck": {
    "bets": 0,
    "devig": "multiplicative",
    "theta": null,
    "reading": "versus_the_market",
    "left_out": {
      "half": 0,
      "push": 0
    },
    "by_season": [],
    "actual_roi": null,
    "luck_units": null,
    "actual_wins": null,
    "actual_units": null,
    "close_source": "consensus",
    "expected_roi": null,
    "expected_wins": null,
    "luck_se_units": null,
    "expected_units": null,
    "lines_converted": 0,
    "luck_percentile": null,
    "bets_without_prob": 1
  },
  "path": {
    "series": {
      "x": "bet_index",
      "dates": [
        "2025-10-21"
      ],
      "index": [
        1
      ],
      "units": [
        0.91
      ],
      "markers": [
        {
          "at": 1,
          "type": "season",
          "label": "2025-26"
        }
      ],
      "drawdown": [
        0
      ],
      "band_p025": null,
      "band_p975": null,
      "base_units": null,
      "rolling_p025": [
        null
      ],
      "rolling_p975": [
        null
      ],
      "rolling_roi_100": [
        null
      ]
    },
    "downsampled": false,
    "longest_losing_run": 0,
    "max_drawdown_units": 0,
    "expected_max_drawdown_zero_edge": null
  },
  "risk": {
    "seed": 6899137762779026,
    "curve": [],
    "paths": 5000,
    "method": "lundberg+posterior_monte_carlo",
    "status": "too_few",
    "percent": {
      "status": "too_few",
      "drawdown_p95": null,
      "stake_fraction": 0.02,
      "ruin_if_rate_exact": null,
      "ruin_allowing_error": null
    },
    "staking": "flat",
    "warnings": [
      "too_few_decisions"
    ],
    "ruin_share": 0.5,
    "drawdown_p95": null,
    "horizon_bets": 500,
    "lose_all_ever": 0,
    "bankroll_units": 100,
    "stake_fraction": null,
    "down_after_horizon": null,
    "drawdown_p95_units": null,
    "estimation_premium": null,
    "ruin_if_rate_exact": null,
    "ruin_allowing_error": null,
    "ruin_ever_if_rate_exact": 0,
    "bankroll_for_ruin_005_units": null,
    "lose_all_ever_allowing_error": 0.277131008418
  },
  "rule": {
    "side": "rule",
    "price": "consensus",
    "reads": [
      {
        "name": "home",
        "known": "pregame",
        "windowed": false
      }
    ],
    "stake": "risk",
    "market": "spread",
    "formula": "=home",
    "seasons": [
      "2025-26"
    ],
    "rule_hash": "sha256:c9a3bcfd2d08b46b86935391523bd2671a885a30b3b1f15bf69e12c5e399441b",
    "bet_moment": "close",
    "competition": "nba",
    "season_type": "regular",
    "base_formula": null,
    "formula_version": "1.0.0",
    "catalogue_version": "1:0",
    "detail": "full"
  },
  "as_of": "2026-11-06T00:00:00Z",
  "decay": {
    "bets": 1,
    "break": null,
    "cusum": null,
    "window": 50,
    "rolling": [],
    "clv_break": null,
    "decay_ratio": null,
    "known_break": null,
    "roi_newest_30": null,
    "status_reason": "fewer than (100) graded bets",
    "trend_per_100_bets": null
  },
  "noise": {
    "seed": 3397954809,
    "delay": {
      "na": "day-before lines for this league are still loading",
      "bet_moment": "day_before"
    },
    "lines": {
      "runs": 200,
      "roi_p05": 0.9099999999999999,
      "line_prob": 0.5,
      "roi_median": 0.9099999999999999,
      "profitable_runs": 200,
      "profitable_share": 1
    },
    "inputs": null,
    "inputs_na": "the rule compares no numbers",
    "low_power": true
  },
  "stale": false,
  "honest": {
    "roi": -0.04514385341429974,
    "ci80": [
      -0.07077022186419332,
      -0.019517484964406154
    ],
    "prior": {
      "mean": -0.04545450206611379,
      "words": "shrunk toward the market's usual margin of -4.5%",
      "capped": false,
      "closes": 0,
      "source": "margin"
    },
    "tries": 1,
    "shrink": 0.999560632688928,
    "raw_roi": 0.9099999999999999,
    "prior_sd": 0.02,
    "uses_clv": false,
    "prior_mean": -0.04545450206611379,
    "basis_rules": 0,
    "prior_basis": "seed",
    "decay_factor": 0.74,
    "posterior_sd": 0.019995605844174143,
    "selection_adj": 0,
    "stabilizes_at_bets": 2275
  },
  "moment": {
    "target": "the start",
    "rows_aged": 0,
    "bet_moment": "close",
    "age_unknown": 1,
    "rows_priced": 1,
    "stale_price": 0,
    "after_moment": 0,
    "line_sources": {
      "sheet_line": 1
    },
    "max_stale_minutes": 60,
    "max_snapshot_age_minutes": null,
    "median_snapshot_age_minutes": null,
    "floor_minutes_before_oct_2022": 10
  },
  "nearby": {
    "na": "the rule compares no numbers",
    "grid": null,
    "numbers": [],
    "reading": null,
    "roi_p05": null,
    "roi_p95": null,
    "variants": 0,
    "roi_median": null,
    "spike_ratio": null,
    "plateau_share": null,
    "distinct_bet_sets": 0
  },
  "notice": "This tests your rule on past games. It isn't a pick and doesn't rank selections.",
  "run_id": "run_mkytv75qe5a297z7y3af",
  "splits": [
    {
      "roi": 0.9099999999999999,
      "bets": 1,
      "label": "Home",
      "units": 0.9099999999999999,
      "record": "1-0",
      "p_value": 0.5235602094240838,
      "decisions": 1,
      "p_adjusted": 1,
      "shown_rows": 2
    },
    {
      "roi": 0.9099999999999999,
      "bets": 1,
      "label": "Favorite",
      "units": 0.9099999999999999,
      "record": "1-0",
      "p_value": 0.5235602094240838,
      "decisions": 1,
      "p_adjusted": 1,
      "shown_rows": 2
    }
  ],
  "stress": {
    "grid": [
      {
        "roi": 0.9523809523809523,
        "vig": -105,
        "units": 0.9523809523809523,
        "line_shift": 0
      },
      {
        "roi": 0.9523809523809523,
        "vig": -105,
        "units": 0.9523809523809523,
        "line_shift": -0.5
      },
      {
        "roi": 0.9523809523809523,
        "vig": -105,
        "units": 0.9523809523809523,
        "line_shift": -1
      },
      {
        "roi": 0.9090909090909092,
        "vig": -110,
        "units": 0.9090909090909092,
        "line_shift": 0
      },
      {
        "roi": 0.9090909090909092,
        "vig": -110,
        "units": 0.9090909090909092,
        "line_shift": -0.5
      },
      {
        "roi": 0.9090909090909092,
        "vig": -110,
        "units": 0.9090909090909092,
        "line_shift": -1
      },
      {
        "roi": 0.8695652173913042,
        "vig": -115,
        "units": 0.8695652173913042,
        "line_shift": 0
      },
      {
        "roi": 0.8695652173913042,
        "vig": -115,
        "units": 0.8695652173913042,
        "line_shift": -0.5
      },
      {
        "roi": 0.8695652173913042,
        "vig": -115,
        "units": 0.8695652173913042,
        "line_shift": -1
      },
      {
        "roi": 0.8333333333333335,
        "vig": -120,
        "units": 0.8333333333333335,
        "line_shift": 0
      },
      {
        "roi": 0.8333333333333335,
        "vig": -120,
        "units": 0.8333333333333335,
        "line_shift": -0.5
      },
      {
        "roi": 0.8333333333333335,
        "vig": -120,
        "units": 0.8333333333333335,
        "line_shift": -1
      }
    ],
    "flat_110": {
      "roi": 0.9090909090909092,
      "bets": 1,
      "units": 0.9090909090909092,
      "record": "1-0",
      "p_value": 0.5238095238095238,
      "decisions": 1
    },
    "break_even": {
      "decimal_avg": null,
      "line_points": 3,
      "american_avg": null,
      "price_multiplier": 0
    },
    "other_side": {
      "roi": -1,
      "bets": 1,
      "units": -1,
      "record": "0-1",
      "p_value": 1,
      "decisions": 1
    },
    "slippage_mc": null,
    "half_point_worse": {
      "roi": 0.9099999999999999,
      "bets": 1,
      "units": 0.9099999999999999,
      "record": "1-0",
      "p_value": 0.5235602094240838,
      "decisions": 1
    }
  },
  "holdout": null,
  "matched": 1,
  "overall": {
    "roi": 0.9099999999999999,
    "bets": 1,
    "wins": 1,
    "units": 0.9099999999999999,
    "losses": 0,
    "pushes": 0,
    "record": "1-0",
    "roi_ci": {
      "bca": null,
      "level": 0.95,
      "score": [
        -0.6054908095394765,
        0.9099999999999999
      ],
      "method": "score",
      "iid_score": [
        -0.6054908095394765,
        0.9099999999999999
      ],
      "anytime_valid": [
        -0.999045,
        0.9090450000000001
      ],
      "block_bootstrap": null
    },
    "deflated": {
      "dsr": null,
      "psr": null,
      "skew": null,
      "roi_bar": null,
      "kurtosis": null,
      "sample_needed": null,
      "sharpe_per_bet": null,
      "trials_effective": 1,
      "sample_needed_plan": null,
      "sharpe_expected_max": null,
      "sample_needed_single": null,
      "sample_needed_power80": null
    },
    "formulas": [
      "F3.2@1",
      "F12.1@1",
      "F12.3@1",
      "F12.4@1",
      "F36.2@1"
    ],
    "roi_ci95": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "warnings": [
      "fixed_n_p_value",
      "small_sample"
    ],
    "win_rate": 1,
    "decisions": 1,
    "break_even": 0.5235602094240838,
    "units_ci95": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "roi_interval": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "significance": {
      "z": 0.9539392014169455,
      "null": "break_even",
      "seed": null,
      "sims": null,
      "alpha": 0.05,
      "spa_p": null,
      "tests": 1,
      "method": "exact_binomial",
      "t_stat": null,
      "haircut": null,
      "p_value": 0.5235602094240838,
      "clears_t3": false,
      "p_adjusted": 0.5235602094240838,
      "haircut_roi": null,
      "significant": false,
      "adjust_method": "none",
      "anytime_valid": {
        "max_e": 1.0580125,
        "method": "kelly_betting_mixture",
        "crossed": false,
        "e_value": 1.0580125,
        "p_value": 0.9451684171973394,
        "roi_cs95": [
          -0.999045,
          0.9090450000000001
        ],
        "kelly_fraction": 0.5
      },
      "p_value_exact": 0.5235602094240838,
      "p_value_vs_vig": null,
      "reality_check_p": null,
      "tests_effective": 1,
      "p_value_clustered": 0.17005720935900537,
      "coin_match_per_100": 50,
      "multiple_comparisons": null,
      "no_skill_match_per_100": 52.35602094240838
    },
    "small_sample": true,
    "few_decisions": true,
    "sample_needed": null,
    "over_break_even": 0.47643979057591623
  },
  "seasons": [
    {
      "roi": 0.9099999999999999,
      "bets": 1,
      "wins": 1,
      "units": 0.9099999999999999,
      "losses": 0,
      "pushes": 0,
      "record": "1-0",
      "season": "2025-26",
      "clv_mean": null,
      "win_rate": 1,
      "decisions": 1,
      "break_even": 0.5235602094240838,
      "roi_interval": [
        0.9099999999999999,
        0.9099999999999999
      ],
      "significance": {
        "z": 0.9539392014169455,
        "alpha": 0.05,
        "p_value": 0.5235602094240838,
        "significant": false,
        "anytime_valid": {
          "crossed": false,
          "e_value": 1.0500500000000001,
          "p_value": 0.9523356030665205
        },
        "coin_match_per_100": 50,
        "multiple_comparisons": null,
        "no_skill_match_per_100": 52.35602094240838
      },
      "small_sample": true,
      "few_decisions": true,
      "sample_needed": null,
      "over_break_even": 0.47643979057591623
    }
  ],
  "staking": "flat, 1 unit risked a bet",
  "verdict": {
    "gate": {
      "key": "no_look_ahead",
      "value": "every value the rule reads is known at the bet moment",
      "status": "pass",
      "leak_test": "clean"
    },
    "level": "too_few",
    "checks": [
      {
        "key": "enough_bets",
        "zone": "red",
        "group": "real",
        "label": "Enough bets",
        "value": "(1) decisions are too few to size the sample",
        "status": "fail",
        "statistic": 1,
        "threshold": null
      },
      {
        "key": "not_luck",
        "zone": "red",
        "group": "real",
        "label": "Not just luck",
        "value": "p 0.524",
        "status": "fail",
        "statistic": 0.5235602094240838,
        "threshold": 0.05
      },
      {
        "key": "beats_base",
        "zone": "na",
        "group": "real",
        "label": "Beats its own base",
        "value": "the rule has no who-or-when condition to filter, so its base is the whole market",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "half_point_worse",
        "zone": "na",
        "group": "pressure",
        "label": "Holds ½ point worse",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "nearby_holds",
        "zone": "na",
        "group": "pressure",
        "label": "Nearby thresholds hold",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "not_concentrated",
        "zone": "na",
        "group": "pressure",
        "label": "Not one lucky stretch",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "beats_close",
        "zone": "na",
        "group": "still_working",
        "label": "Beats the close",
        "value": "bets at the close can't beat it",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "still_working",
        "zone": "na",
        "group": "still_working",
        "label": "Still working",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "since_saved",
        "zone": "na",
        "group": "still_working",
        "label": "Since saved",
        "value": "(0) of (30) bets since it was saved",
        "status": "na",
        "statistic": null,
        "threshold": null
      }
    ],
    "passed": 0,
    "version": 2,
    "headline": "Too few bets to judge",
    "applicable": 2,
    "held_back_by": []
  },
  "warm_up": {
    "policy": "as_written",
    "warning": false,
    "windows": [],
    "by_policy": null,
    "short_bets": 0,
    "games_needed": 0
  },
  "without": [],
  "ablation": null,
  "capacity": {
    "books": [],
    "market": "spreads",
    "reason": "Kelly holds no measured spreads limits for nba at this moment yet.",
    "available": false,
    "limits_held": 0,
    "before_start": "0_1h",
    "bets_per_season": null,
    "max_stake_per_bet": null,
    "per_season_at_limit": null
  },
  "coverage": {
    "flow": [
      {
        "rows": 6,
        "step": "in_scope",
        "games": 3
      },
      {
        "rows": 3,
        "step": "rule_true"
      },
      {
        "out": {
          "both_sides": 0,
          "same_game_total": 0
        },
        "rows": 3,
        "step": "one_bet_a_game"
      },
      {
        "out": {
          "no_line": 2
        },
        "rows": 1,
        "step": "priced"
      },
      {
        "out": {
          "void": 0,
          "not_played_yet": 0
        },
        "rows": 1,
        "step": "graded"
      },
      {
        "out": {
          "push": 0
        },
        "rows": 1,
        "step": "decisions"
      }
    ],
    "by_season": [
      {
        "bets": 1,
        "rows": 6,
        "games": 3,
        "season": "2025-26",
        "rule_true": 3,
        "priced_share": 0.3333
      }
    ],
    "inputs_missing": [
      {
        "rows": 6,
        "share": 0,
        "attribute": "home",
        "rows_blank": 0,
        "seasons_blank": []
      }
    ],
    "left_out_differs": {
      "flag": false,
      "kept": 1,
      "max_smd": null,
      "left_out": 2,
      "covariate": null,
      "by_covariate": []
    }
  },
  "left_out": {
    "no_line": 2,
    "both_sides": 0,
    "stale_price": 0
  },
  "manifest": {
    "code": {
      "engine": 8,
      "release": null,
      "formula_version": "1.0.0",
      "settlement_rules": "2026-11-08",
      "attributes_sha256": "0000000000000000",
      "catalogue_version": "1:0"
    },
    "data": {
      "as_of": "2026-11-06T00:00:00Z",
      "queries": {
        "rule_test_games": "0000000000000000"
      },
      "version": "snap_52",
      "snapshots": [
        "snap_52"
      ],
      "data_through": {},
      "one_snapshot": true,
      "latest_result": "2025-10-25T23:00:00Z",
      "rows_built_at": "2026-11-06T00:00:00Z"
    },
    "sha256": "sha256:d78d99c7954d4b2367b7baa69328756b5aa4464bb52ddcb24cdf05a0484557ad",
    "request": {
      "seed": 18147943352127158000,
      "rule_hash": "sha256:c9a3bcfd2d08b46b86935391523bd2671a885a30b3b1f15bf69e12c5e399441b",
      "request_hash": "sha256:13e69ec9c84eb683918ee67e91ae21ac69cc813cfbc4758f625524596be5d3da"
    },
    "seasons": [
      {
        "rows": 6,
        "season": "2025-26",
        "priced_share": 0.3333
      }
    ],
    "sources": {
      "inputs": [
        {
          "name": "home",
          "known": "pregame"
        }
      ],
      "prices": {
        "sheet_line": 1
      }
    },
    "version": 1,
    "left_out": {
      "no_line": 2,
      "both_sides": 0,
      "stale_price": 0
    }
  },
  "ungraded": 0,
  "leak_test": {
    "parts": [],
    "status": "clean",
    "rows_checked": 6,
    "matched_checked": 3,
    "matches_flipped": 0
  },
  "dependence": {
    "se": null,
    "slate": "date",
    "method": "none",
    "se_iid": null,
    "clusters": 1,
    "cluster_by": [
      "slate",
      "team_season"
    ],
    "design_effect": 1,
    "effective_bets": 1
  },
  "robustness": {
    "off": [],
    "seed": 769905824,
    "checks": [
      {
        "key": "half_point_worse",
        "label": "Holds ½ point worse",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "nearby_holds",
        "label": "Holds with nearby numbers",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "not_concentrated",
        "label": "Not one team or season",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "still_working",
        "label": "Still working",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      }
    ],
    "fast_path": true,
    "evaluations": 1
  },
  "settlement": {
    "rules": [
      {
        "id": "final_score",
        "text": "Every market grades on the final score as Kelly's score source records it, overtime and extra innings included.",
        "effective_from": "2026-11-06"
      },
      {
        "id": "spread_push",
        "text": "A spread bet whose margin lands exactly on the line pushes: the stake comes back.",
        "effective_from": "2026-11-06"
      },
      {
        "id": "postponed_void",
        "text": "A game with no final score 48 hours after its scheduled start is void: the bet is left out.",
        "effective_from": "2026-11-07"
      },
      {
        "id": "not_played_yet",
        "text": "A game still to be played is listed with no result and left out of every figure.",
        "effective_from": "2026-11-06"
      }
    ],
    "applied": [
      {
        "bets": 1,
        "rule": "final_score"
      }
    ],
    "profile": "kelly_standard",
    "rules_version": "2026-11-08"
  },
  "assumptions": [
    "Each bet is taken at Kelly's consensus close price; games Kelly holds no close line for are left out (2).",
    "Games where the rule matched both teams are left out (0).",
    "One flat unit risked a bet."
  ],
  "monte_carlo": null,
  "since_saved": null,
  "data_through": {},
  "data_version": "snap_52",
  "rule_version": null,
  "concentration": {
    "by": [
      {
        "best": null,
        "group": "season",
        "groups": 1,
        "without_best": null,
        "effective_groups": 1,
        "jackknife_roi_se": null,
        "without_best_two": null,
        "p_more_concentrated": null
      },
      {
        "best": null,
        "group": "team",
        "groups": 1,
        "without_best": null,
        "effective_groups": 1,
        "jackknife_roi_se": null,
        "without_best_two": null,
        "p_more_concentrated": null
      },
      {
        "best": null,
        "group": "opponent",
        "groups": 1,
        "without_best": null,
        "effective_groups": 1,
        "jackknife_roi_se": null,
        "without_best_two": null,
        "p_more_concentrated": null
      },
      {
        "best": null,
        "group": "month",
        "groups": 1,
        "without_best": null,
        "effective_groups": 1,
        "jackknife_roi_se": null,
        "without_best_two": null,
        "p_more_concentrated": null
      },
      {
        "best": null,
        "group": "weekday",
        "groups": 1,
        "without_best": null,
        "effective_groups": 1,
        "jackknife_roi_se": null,
        "without_best_two": null,
        "p_more_concentrated": null
      }
    ],
    "bets": 1,
    "units": 0.9099999999999999,
    "trim_top_0_05": null
  },
  "latest_result": "2025-10-25T23:00:00Z",
  "risk_adjusted": {
    "sqn": null,
    "bets": 1,
    "warnings": [
      "no_losing_bets",
      "no_spread_in_returns",
      "small_sample"
    ],
    "ulcer_index": 0,
    "martin_ratio": null,
    "sharpe_daily": null,
    "avg_win_units": 0.9099999999999999,
    "profit_factor": null,
    "avg_loss_units": null,
    "sharpe_per_bet": null,
    "recovery_factor": null,
    "sortino_per_bet": null,
    "sharpe_per_season": null,
    "max_drawdown_units": 0,
    "profit_factor_ci95": null,
    "return_on_drawdown": null,
    "sharpe_per_bet_ci95": null,
    "probabilistic_sharpe": null,
    "sortino_per_bet_ci95": null,
    "current_drawdown_units": 0,
    "expected_units_per_bet": 0.9099999999999999,
    "longest_underwater_bets": 0,
    "longest_underwater_days": 0
  },
  "rows_built_at": "2026-11-06T00:00:00Z",
  "staking_plans": {
    "kelly": {
      "basis": "record",
      "capped": null,
      "shrink": 1,
      "win_rate": 1,
      "withheld": "stake_first_party_only",
      "push_rate": 0,
      "multiplier": null,
      "simultaneous": false,
      "zero_because": "too_few",
      "full_fraction": null,
      "honest_fraction": null,
      "multiplier_rule": "honest"
    },
    "plans": [
      {
        "roi": 0.9099999999999966,
        "bets": 1,
        "plan": "flat",
        "units": 0.9099999999999966,
        "status": "ok",
        "max_drawdown": 0,
        "growth_per_bet": 0.009058844488345926,
        "stopped_at_bet": null,
        "end_bankroll_units": 100.91
      },
      {
        "roi": 0.9099999999999999,
        "bets": 1,
        "plan": "to_win",
        "units": 1,
        "status": "ok",
        "max_drawdown": 0,
        "growth_per_bet": 0.009950330853168092,
        "stopped_at_bet": null,
        "end_bankroll_units": 101
      },
      {
        "roi": 0.9099999999999966,
        "bets": 1,
        "plan": "percent",
        "units": 1.8199999999999932,
        "status": "ok",
        "max_drawdown": 0,
        "growth_per_bet": 0.018036362486098575,
        "stake_fraction": 0.02,
        "stopped_at_bet": null,
        "end_bankroll_units": 101.82
      },
      {
        "plan": "kelly",
        "status": "withheld",
        "withheld": "stake_first_party_only"
      }
    ],
    "percent": 0.02,
    "warnings": [
      "small_sample"
    ],
    "kelly_cap": 0.05,
    "bankroll_units": 100
  },
  "random_baseline": null,
  "split_dimensions": [],
  "tests_on_account": {
    "count": 1,
    "market": "spread",
    "competition": "nba",
    "shown_counted": 0
  },
  "matched_both_sides": 0,
  "matched_without_line": 2,
  "tested_at": "2026-10-04T17:30:00Z",
  "since_run": {
    "status": "current",
    "engine_changed": false,
    "changed": []
  },
  "summary": "Too few bets to judge: honest forward ROI -4.5%, 1-0 against the spread, 2025-26, +0.9 units, +91.0% ROI past (0 of 2 checks passed).",
  "has_more": false,
  "next_cursor": null,
  "source": "kelly",
  "attribution": null,
  "request_id": "req_5bc2152f1f186610ad0d7ecd",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

```http
GET https://api.askkelly.ai/v1/rules/runs/run_zzzzzzzzzzzzzzzzzzzz
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/not_found",
  "title": "Not found",
  "status": 404,
  "code": "not_found",
  "detail": "No run with that ID on this account.",
  "param": "run_id",
  "doc_url": "https://docs.askkelly.ai/problems/not_found",
  "request_id": "req_0e159e15ddc94f8dc2cb4f43",
  "retryable": false,
  "display_message": "That could not be found."
}
```

`GET /v1/rules/{rule_id}/versions`

## List a saved rule's versions
public, no key needed · 0 credits, not charged during the beta · MCP tool `list_rule_versions` · status live

A rule you saved (test_rule with save or rule_id) and every version tested under it, oldest first: each formula and its options, and its latest run's record, units, ROI, p-value and verdict. Versions are never deleted, so versions_tried is honest.

### Parameters
- `rule_id` string · path · required  
  A saved rule's ID (rl_…), from test_rule's rule_version.  
  pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$

### Response
`200` The rule versions facts.

- `object` const · required  
  Always rule_versions.  
  Always `"rule_versions"`.
- `rule_id` string · required  
  The saved rule (rl_…).  
  pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$
- `name` string · required  
  Its name.
- `competition` string  
  The competition every version is tested on.
- `market` string  
  The market every version is tested on.
- `created_at` string  
  When it was first saved (RFC 3339).  
  format date-time
- `versions_tried` integer · required  
  Versions saved under it, hidden ones included.  
  min 1
- `versions` array of object · required  
  Every version, oldest first.
  - `version` integer · required  
    1, 2, ... in the order they were saved.  
    min 1
  - `formula` string · required  
    The formula as typed.
  - `rule_hash` string · required  
    The rule's identity (see rule.rule_hash).  
    pattern ^sha256:[0-9a-f]{64}$
  - `params` object  
    The options it was tested with: competition, market, side, bet moment, seasons, season type, stake, price.
  - `created_at` string · required  
    When this version was saved (RFC 3339).  
    format date-time
  - `hidden` boolean  
    Hidden by the person; it still counts as a version tried.
  - `run_id` string · nullable  
    Its latest kept run.
  - `data_version` string · nullable  
    The data that run read.
  - `bets` integer · nullable  
    Bets taken.
  - `decisions` integer · nullable  
    Wins plus losses.
  - `record` string · nullable  
    W-L-P.
  - `units` number · nullable  
    Units won or lost.
  - `roi` number · nullable  
    Return on units risked, a fraction.
  - `p_value` number · nullable  
    The record's own p-value.
  - `level` string · nullable  
    The verdict's level.
  - `headline` string · nullable  
    The verdict's headline.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found)

### Example
```http
GET https://api.askkelly.ai/v1/rules/rl_5bbmw66t2r1jvg6cpxt2/versions
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "rule_versions",
  "rule_id": "rl_5bbmw66t2r1jvg6cpxt2",
  "name": "Home teams",
  "competition": "nba",
  "market": "spread",
  "created_at": "2026-10-04T17:30:00Z",
  "versions_tried": 2,
  "versions": [
    {
      "version": 1,
      "formula": "=home",
      "rule_hash": "sha256:c9a3bcfd2d08b46b86935391523bd2671a885a30b3b1f15bf69e12c5e399441b",
      "created_at": "2026-10-04T17:30:00Z",
      "hidden": false,
      "run_id": "run_rc69h189x95wy5rhfet2",
      "data_version": "snap_52",
      "bets": 1,
      "decisions": 1,
      "record": "1-0",
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "p_value": 0.5235602094240838,
      "level": "too_few",
      "headline": "Too few bets to judge",
      "params": {
        "side": "rule",
        "price": "consensus",
        "stake": "risk",
        "market": "spread",
        "robust": {
          "off": [],
          "line_prob": 0.5,
          "skip_prob": 0,
          "break_date": null,
          "noise_runs": 200,
          "input_scale": 0.1,
          "trim_winners": 0,
          "monte_carlo_mode": "block",
          "monte_carlo_sims": null,
          "random_baseline_sims": 2000
        },
        "sizing": {
          "caps": {
            "priority": "earliest",
            "max_open_stake": null,
            "max_bets_per_day": null,
            "max_bets_per_game": null,
            "daily_stop_loss_units": null,
            "max_bets_per_team_week": null
          },
          "paths": 5000,
          "percent": 0.02,
          "kelly_cap": 0.05,
          "ruin_share": 0.5,
          "horizon_bets": 500,
          "staking_plans": [
            "flat",
            "to_win",
            "percent",
            "kelly"
          ],
          "bankroll_units": 100,
          "kelly_fraction": null
        },
        "teaser": null,
        "seasons": [
          "2025-26"
        ],
        "warm_up": "as_written",
        "ci_level": 0.95,
        "plan_roi": null,
        "stake_ok": false,
        "bet_moment": "close",
        "competition": "nba",
        "season_type": "regular",
        "base_formula": null
      }
    },
    {
      "version": 2,
      "formula": "=AND(home, rest_days >= 1)",
      "rule_hash": "sha256:af2069d0e4d5307d8c4ea7ac707cc0d3e7e13f5c5ea4f95806a58327400b8676",
      "created_at": "2026-10-04T17:30:00Z",
      "hidden": false,
      "run_id": "run_ewabjhkycqv5zk6mvbkn",
      "data_version": "snap_52",
      "bets": 0,
      "decisions": 0,
      "record": "0-0",
      "units": 0,
      "roi": null,
      "p_value": null,
      "level": "too_few",
      "headline": "No bets",
      "params": {
        "side": "rule",
        "price": "consensus",
        "stake": "risk",
        "market": "spread",
        "robust": {
          "off": [],
          "line_prob": 0.5,
          "skip_prob": 0,
          "break_date": null,
          "noise_runs": 200,
          "input_scale": 0.1,
          "trim_winners": 0,
          "monte_carlo_mode": "block",
          "monte_carlo_sims": null,
          "random_baseline_sims": 2000
        },
        "sizing": {
          "caps": {
            "priority": "earliest",
            "max_open_stake": null,
            "max_bets_per_day": null,
            "max_bets_per_game": null,
            "daily_stop_loss_units": null,
            "max_bets_per_team_week": null
          },
          "paths": 5000,
          "percent": 0.02,
          "kelly_cap": 0.05,
          "ruin_share": 0.5,
          "horizon_bets": 500,
          "staking_plans": [
            "flat",
            "to_win",
            "percent",
            "kelly"
          ],
          "bankroll_units": 100,
          "kelly_fraction": null
        },
        "teaser": null,
        "seasons": [
          "2025-26"
        ],
        "warm_up": "as_written",
        "ci_level": 0.95,
        "plan_roi": null,
        "stake_ok": false,
        "bet_moment": "close",
        "competition": "nba",
        "season_type": "regular",
        "base_formula": null
      }
    }
  ],
  "summary": "Home teams: (2) versions tried.",
  "assumptions": [],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_9d856ff26b3c4955513933ee",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

```http
GET https://api.askkelly.ai/v1/rules/rl_zzzzzzzzzzzzzzzzzzzz/versions
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/not_found",
  "title": "Not found",
  "status": 404,
  "code": "not_found",
  "detail": "No saved rule with that rule_id on this account.",
  "param": "rule_id",
  "doc_url": "https://docs.askkelly.ai/problems/not_found",
  "request_id": "req_56678091b4df5f34b027177f",
  "retryable": false,
  "display_message": "That could not be found."
}
```

`GET /v1/rules/{rule_id}/diff`

## Compare two versions of a saved rule
public, no key needed · 0 credits, not charged during the beta · MCP tool `compare_rule_versions` · status live

What changed between two versions of a rule you saved, bet by bet: the games the newer version bets that the older didn't and the reverse (by key, with result and units), and the change in units and ROI, each on its latest kept run.

### Parameters
- `rule_id` string · path · required  
  A saved rule's ID (rl_…), from test_rule's rule_version.  
  pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$

- `from` integer · query · required  
  The older version's number.  
  min 1
- `to` integer · query · required  
  The newer version's number.  
  min 1

### Response
`200` The rule diff facts.

- `object` const · required  
  Always rule_diff.  
  Always `"rule_diff"`.
- `rule_id` string · required  
  The saved rule.
- `name` string  
  Its name.
- `from` object · required  
  One version of a saved rule, with its latest kept run's numbers (null when it has none).
  - `version` integer · required  
    1, 2, ... in the order they were saved.  
    min 1
  - `formula` string · required  
    The formula as typed.
  - `rule_hash` string · required  
    The rule's identity (see rule.rule_hash).  
    pattern ^sha256:[0-9a-f]{64}$
  - `params` object  
    The options it was tested with: competition, market, side, bet moment, seasons, season type, stake, price.
  - `created_at` string · required  
    When this version was saved (RFC 3339).  
    format date-time
  - `hidden` boolean  
    Hidden by the person; it still counts as a version tried.
  - `run_id` string · nullable  
    Its latest kept run.
  - `data_version` string · nullable  
    The data that run read.
  - `bets` integer · nullable  
    Bets taken.
  - `decisions` integer · nullable  
    Wins plus losses.
  - `record` string · nullable  
    W-L-P.
  - `units` number · nullable  
    Units won or lost.
  - `roi` number · nullable  
    Return on units risked, a fraction.
  - `p_value` number · nullable  
    The record's own p-value.
  - `level` string · nullable  
    The verdict's level.
  - `headline` string · nullable  
    The verdict's headline.
- `to` object · required  
  One version of a saved rule, with its latest kept run's numbers (null when it has none).
  - `version` integer · required  
    1, 2, ... in the order they were saved.  
    min 1
  - `formula` string · required  
    The formula as typed.
  - `rule_hash` string · required  
    The rule's identity (see rule.rule_hash).  
    pattern ^sha256:[0-9a-f]{64}$
  - `params` object  
    The options it was tested with: competition, market, side, bet moment, seasons, season type, stake, price.
  - `created_at` string · required  
    When this version was saved (RFC 3339).  
    format date-time
  - `hidden` boolean  
    Hidden by the person; it still counts as a version tried.
  - `run_id` string · nullable  
    Its latest kept run.
  - `data_version` string · nullable  
    The data that run read.
  - `bets` integer · nullable  
    Bets taken.
  - `decisions` integer · nullable  
    Wins plus losses.
  - `record` string · nullable  
    W-L-P.
  - `units` number · nullable  
    Units won or lost.
  - `roi` number · nullable  
    Return on units risked, a fraction.
  - `p_value` number · nullable  
    The record's own p-value.
  - `level` string · nullable  
    The verdict's level.
  - `headline` string · nullable  
    The verdict's headline.
- `bets_added` integer · required  
  Bets the newer version takes that the older didn't.
- `bets_removed` integer · required  
  Bets the older version took that the newer doesn't.
- `bets_kept` integer  
  Bets both take.
- `units_added` number  
  Units the added bets won or lost.
- `units_removed` number  
  Units the removed bets won or lost.
- `units_delta` number · nullable  
  The newer version's units minus the older's.
- `roi_delta` number · nullable  
  The newer version's ROI minus the older's, a fraction.
- `same_data` boolean  
  Both runs read the same data_version.
- `added` array of object · required  
  Every added bet, by key.
  - `key` string  
    {game_id}:{team_id}.
  - `result` string · nullable  
    win, loss, push, or null while ungraded.
  - `units` number · nullable  
    Units it won or lost.
- `removed` array of object · required  
  Every removed bet, by key.
  - `key` string  
    {game_id}:{team_id}.
  - `result` string · nullable  
    win, loss, push, or null while ungraded.
  - `units` number · nullable  
    Units it won or lost.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found)

### Example
```http
GET https://api.askkelly.ai/v1/rules/rl_5bbmw66t2r1jvg6cpxt2/diff?from=1&to=2
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "rule_diff",
  "rule_id": "rl_5bbmw66t2r1jvg6cpxt2",
  "name": "Home teams",
  "from": {
    "version": 1,
    "formula": "=home",
    "rule_hash": "sha256:c9a3bcfd2d08b46b86935391523bd2671a885a30b3b1f15bf69e12c5e399441b",
    "created_at": "2026-10-04T17:30:00Z",
    "hidden": false,
    "run_id": "run_rc69h189x95wy5rhfet2",
    "data_version": "snap_52",
    "bets": 1,
    "decisions": 1,
    "record": "1-0",
    "units": 0.9099999999999999,
    "roi": 0.9099999999999999,
    "p_value": 0.5235602094240838,
    "level": "too_few",
    "headline": "Too few bets to judge",
    "params": {
      "side": "rule",
      "price": "consensus",
      "stake": "risk",
      "market": "spread",
      "robust": {
        "off": [],
        "line_prob": 0.5,
        "skip_prob": 0,
        "break_date": null,
        "noise_runs": 200,
        "input_scale": 0.1,
        "trim_winners": 0,
        "monte_carlo_mode": "block",
        "monte_carlo_sims": null,
        "random_baseline_sims": 2000
      },
      "sizing": {
        "caps": {
          "priority": "earliest",
          "max_open_stake": null,
          "max_bets_per_day": null,
          "max_bets_per_game": null,
          "daily_stop_loss_units": null,
          "max_bets_per_team_week": null
        },
        "paths": 5000,
        "percent": 0.02,
        "kelly_cap": 0.05,
        "ruin_share": 0.5,
        "horizon_bets": 500,
        "staking_plans": [
          "flat",
          "to_win",
          "percent",
          "kelly"
        ],
        "bankroll_units": 100,
        "kelly_fraction": null
      },
      "teaser": null,
      "seasons": [
        "2025-26"
      ],
      "warm_up": "as_written",
      "ci_level": 0.95,
      "plan_roi": null,
      "stake_ok": false,
      "bet_moment": "close",
      "competition": "nba",
      "season_type": "regular",
      "base_formula": null
    }
  },
  "to": {
    "version": 2,
    "formula": "=AND(home, rest_days >= 1)",
    "rule_hash": "sha256:af2069d0e4d5307d8c4ea7ac707cc0d3e7e13f5c5ea4f95806a58327400b8676",
    "created_at": "2026-10-04T17:30:00Z",
    "hidden": false,
    "run_id": "run_ewabjhkycqv5zk6mvbkn",
    "data_version": "snap_52",
    "bets": 0,
    "decisions": 0,
    "record": "0-0",
    "units": 0,
    "roi": null,
    "p_value": null,
    "level": "too_few",
    "headline": "No bets",
    "params": {
      "side": "rule",
      "price": "consensus",
      "stake": "risk",
      "market": "spread",
      "robust": {
        "off": [],
        "line_prob": 0.5,
        "skip_prob": 0,
        "break_date": null,
        "noise_runs": 200,
        "input_scale": 0.1,
        "trim_winners": 0,
        "monte_carlo_mode": "block",
        "monte_carlo_sims": null,
        "random_baseline_sims": 2000
      },
      "sizing": {
        "caps": {
          "priority": "earliest",
          "max_open_stake": null,
          "max_bets_per_day": null,
          "max_bets_per_game": null,
          "daily_stop_loss_units": null,
          "max_bets_per_team_week": null
        },
        "paths": 5000,
        "percent": 0.02,
        "kelly_cap": 0.05,
        "ruin_share": 0.5,
        "horizon_bets": 500,
        "staking_plans": [
          "flat",
          "to_win",
          "percent",
          "kelly"
        ],
        "bankroll_units": 100,
        "kelly_fraction": null
      },
      "teaser": null,
      "seasons": [
        "2025-26"
      ],
      "warm_up": "as_written",
      "ci_level": 0.95,
      "plan_roi": null,
      "stake_ok": false,
      "bet_moment": "close",
      "competition": "nba",
      "season_type": "regular",
      "base_formula": null
    }
  },
  "bets_added": 0,
  "bets_removed": 1,
  "bets_kept": 0,
  "units_added": 0,
  "units_removed": 0.91,
  "units_delta": -0.91,
  "roi_delta": null,
  "same_data": true,
  "added": [],
  "removed": [
    {
      "key": "gm_1hnx5nrmk4xjpz6fzyfz:tm_b4w5y9xy5f9sgg1cmkvy",
      "result": "win",
      "units": 0.91
    }
  ],
  "summary": "Home teams, version 1 to 2: (0) bets added, (1) removed, -0.9 units.",
  "assumptions": [],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_44e0850b8956a358966980cf",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

```http
GET https://api.askkelly.ai/v1/rules/rl_5bbmw66t2r1jvg6cpxt2/diff?from=1&to=9
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/not_found",
  "title": "Not found",
  "status": 404,
  "code": "not_found",
  "detail": "This rule has no version 9.",
  "param": "to",
  "doc_url": "https://docs.askkelly.ai/problems/not_found",
  "request_id": "req_fec3da3f6b4d35a869ac2e8a",
  "retryable": false,
  "display_message": "That could not be found."
}
```

`POST /v1/rules:translate`

## Write a rule from words
public, no key needed · 0 credits, not charged during the beta · MCP tool `translate_rule` · status live

A betting rule in the person's words written as a rule formula (backtester T8, F43): candidate formulas from Kelly's model, each checked by the formula engine and the rule tester's refusals (look-ahead, Kelly's edge), grouped by the games they would bet; the largest group's formula with a plain-English readback written by a fixed template, and one question when the words read two ways. Words about the game's own outcome, data Kelly doesn't hold or stake sizes come back as problems. Nothing runs: test the formula with POST /v1/rules:test (translation_id). Free, and never counted toward rules tried.

### Parameters
Body, `application/json` (required):

- `text` string  
  The rule in the person's words (or a formula starting with =, read back as is), up to 1,000 characters.  
  min length 1 · max length 1000
- `competition` string  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...  
  pattern ^[a-z0-9_]{2,24}$
- `market` string  
  spread, moneyline, over, under or draw; left out, the market the words name (spread when they name none).  
  One of: `spread`, `moneyline`, `over`, `under`, `draw` (open: new values may be added).
- `side` string  
  rule or fade; left out, what the words say.  
  One of: `rule`, `fade` (open: new values may be added).
- `bet_moment` string  
  close (default) or edition: the moment the formula is checked against.  
  One of: `close`, `edition` (open: new values may be added).
- `seasons` array of string  
  Seasons to compare the candidate formulas on (default: the latest two).  
  min items 1 · max items 25
- `from_season` string  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `season_type` string  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).

### Response
`200` The rule translation facts.

- `object` string · required  
  rule_translation.  
  One of: `rule_translation` (open: new values may be added).
- `text` string  
  The words, as sent.
- `competition` string  
  The competition.
- `market` string  
  The market (the request's, or the one the words name; spread by default).
- `side` string  
  rule, or fade when the words bet against the teams described.
- `bet_moment` string  
  The bet moment the formula was checked at.
- `formula` string · required · nullable  
  The chosen formula; null when the words can't be a rule.
- `readback` string · required · nullable  
  The formula in plain English, written by template.
- `candidates` integer  
  Formulas the model wrote.
- `valid` integer  
  Those that passed Kelly's checks.
- `agreement` number · nullable  
  Share of the valid candidates that bet the same games as the chosen one.
- `question` string · required · nullable  
  One question when the words read two ways.
- `choices` array of object  
  The readings the question offers.
  - `label` string  
    In words.
  - `formula` string  
    Its formula.
- `problems` array of object · required  
  Why there is no formula, when there isn't.
  - `code` string  
    missing_data, look_ahead, stake_rule, team_named, not_a_rule, not_understood or the rule tester's own refusal code.
  - `path` string · nullable  
    The field or data it names.
  - `message` string  
    What to change.
  - `fixes` array of object  
    Fixes, when there are any.
- `translation_id` string · required  
  Pass it to test_rule to keep the words with the test.  
  pattern ^tx_[0-9a-hjkmnp-tv-z]{20}$
- `prompt_version` string  
  The translator's prompt version.
- `seasons_checked` array of string  
  Seasons the candidates were compared on.
- `method` string  
  ai (words) or formula (a formula sent as is, read back without the model).  
  One of: `ai`, `formula` (open: new values may be added).
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large)

### Example
```http
POST https://api.askkelly.ai/v1/rules:translate
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "text": "=AND(home, rest_days >= 2)",
  "competition": "nba",
  "seasons": [
    "2025-26"
  ]
}
```

```json
{
  "object": "rule_translation",
  "text": "=AND(home, rest_days >= 2)",
  "competition": "nba",
  "market": "spread",
  "side": "rule",
  "bet_moment": "close",
  "formula": "=AND(home, rest_days >= 2)",
  "readback": "Bets the team against the spread when it is at home, and its rest in days is at least 2.",
  "candidates": 1,
  "valid": 1,
  "agreement": 1,
  "question": null,
  "choices": [],
  "problems": [],
  "translation_id": "tx_xbj639zqrcq2kg653rsf",
  "prompt_version": "t8-nl-1",
  "seasons_checked": [],
  "method": "formula",
  "summary": "Bets the team against the spread when it is at home, and its rest in days is at least 2. Formula: =AND(home, rest_days >= 2). Nothing has run yet; test it to see its record.",
  "assumptions": [],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_65c75377c603b7dea913e749",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

```http
POST https://api.askkelly.ai/v1/rules:translate
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "text": "",
  "competition": "nba"
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "code": "invalid_request",
  "detail": "text: '' should be non-empty",
  "param": "text",
  "doc_url": "https://docs.askkelly.ai/problems/invalid_request",
  "request_id": "req_e81de766467deb1e6e85c93c",
  "retryable": false,
  "display_message": "Something in that request was not understood."
}
```

`GET /v1/rules/{rule_id}/record`

## Get a saved rule's record since it was saved
public, no key needed · 0 credits, not charged during the beta · MCP tool `get_rule_record` · status live

A rule you saved, from the moment it was saved: each bet taken at its bet moment after the save, at the line Kelly held then, graded when final, beside its backtest. Record, units, ROI, closing-line value, an anytime-valid e-value and whether live is consistent with the backtest. Never reset: an edit is a new version with its own record. No prices are returned.

### Parameters
- `rule_id` string · path · required  
  A saved rule's ID (rl_…), from test_rule's rule_version.  
  pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$

- `version` integer · query  
  The version to read (default the newest).  
  min 1

### Response
`200` The rule record facts.

- `object` const · required  
  Always rule_record.  
  Always `"rule_record"`.
- `rule_id` string · required  
  The saved rule.  
  pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$
- `name` string  
  Its name.
- `competition` string  
  Its competition.
- `market` string  
  Its market.
- `version` integer · required  
  The version read.  
  min 1
- `versions_tried` integer  
  Versions saved under the rule.  
  min 1
- `formula` string  
  The version's formula.
- `bet_moment` string  
  edition or close.
- `since_saved` object · required  
  The record since the save.
  - `saved_at` string · nullable  
    When the clock started: the version's save, or the registration (RFC 3339).  
    format date-time
  - `record` string · required  
    Wins-losses(-pushes) since then.
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `decisions` integer · required  
    Wins plus losses.
  - `bets` integer  
    Graded bets.
  - `units` number · required  
    Units won or lost.
  - `roi` number · nullable  
    Units over units risked, a fraction.
  - `clv_mean` number · nullable  
    Mean closing-line value of the bets (null at the close: none by definition).
  - `clv_bets` integer  
    Bets with a closing-line value.
  - `e_value` number · nullable  
    Anytime-valid e-value of the forward bets against no edge at the prices taken (safe to read every day).
  - `max_e_value` number · nullable  
    Its running maximum.
  - `e_threshold` number  
    The e-value that counts as evidence at alpha 0.05 (20).
  - `vs_backtest` object · nullable  
    Is live consistent with the backtest?
    - `win_rate_backtest` number  
      The backtest's win rate.
    - `win_rate_forward` number · nullable  
      The win rate since the save.
    - `p_value_difference` number · nullable  
      Two-sided p-value that the two win rates differ.
    - `method` string · nullable  
      fisher_exact (under 30 forward decisions) or two_proportion_z.
    - `e_value_worse` number  
      E-value that live wins less often than the backtest; 20 or more fails the check.
  - `pending` integer  
    Bets recorded at their bet moment, not yet final.
  - `no_line` integer  
    Matches Kelly held no line for at the bet moment (kept, never skipped).
  - `void` integer  
    Postponed games past the window.
  - `status` string · required  
    The since_saved check: na until min_decisions, then pass or fail.  
    One of: `na`, `pass`, `fail` (open: new values may be added).
  - `min_decisions` integer  
    Forward decisions before the check is judged (30).
  - `last_bet_at` string · nullable  
    The latest bet moment recorded.  
    format date-time
- `backtest` object  
  The version's latest kept backtest run.
  - `run_id` string · nullable  
    The run.
  - `record` string · nullable  
    Its record.
  - `decisions` integer · nullable  
    Wins plus losses.
  - `units` number · nullable  
    Units.
  - `roi` number · nullable  
    ROI, a fraction.
  - `win_rate` number · nullable  
    Win rate.
  - `seasons` array of string · nullable  
    Seasons tested.
- `registration` object · nullable  
  The version's public registration, if any.
  - `registration_id` string  
    reg_….  
    pattern ^reg_[0-9a-hjkmnp-tv-z]{20}$
  - `status` string  
    Its status.
  - `registered_at` string  
    When (RFC 3339).  
    format date-time
- `bets` array of object · required  
  The forward bets, newest first (up to 200).
  - `key` string  
    {game_id}:{team_id}.
  - `label` string  
    The game, from the side bet.
  - `bet_moment` string  
    edition or close.
  - `moment_at` string  
    When the bet was taken (RFC 3339).  
    format date-time
  - `line` number · nullable  
    The line at the bet moment.
  - `status` string  
    pending, graded, void or no_line.  
    One of: `pending`, `graded`, `void`, `no_line` (open: new values may be added).
  - `result` string · nullable  
    win, loss, push, half_win or half_loss once graded.
  - `units` number · nullable  
    Units won or lost.
  - `clv` number · nullable  
    Closing-line value, a fraction.
- `notice` string  
  It isn't a pick.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found)

### Example
```http
GET https://api.askkelly.ai/v1/rules/rl_5bbmw66t2r1jvg6cpxt2/record
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "rule_record",
  "rule_id": "rl_5bbmw66t2r1jvg6cpxt2",
  "name": "Home teams",
  "competition": "nba",
  "market": "spread",
  "version": 2,
  "versions_tried": 2,
  "formula": "=AND(home, rest_days >= 1)",
  "bet_moment": "close",
  "since_saved": {
    "saved_at": "2026-10-04T17:30:00Z",
    "record": "0-0",
    "wins": 0,
    "losses": 0,
    "pushes": 0,
    "decisions": 0,
    "bets": 0,
    "units": 0,
    "roi": null,
    "clv_mean": null,
    "clv_bets": 0,
    "e_value": null,
    "max_e_value": null,
    "e_threshold": 20,
    "vs_backtest": null,
    "pending": 0,
    "no_line": 0,
    "void": 0,
    "status": "na",
    "min_decisions": 30,
    "last_bet_at": null
  },
  "backtest": {
    "run_id": "run_ewabjhkycqv5zk6mvbkn",
    "record": "0-0",
    "decisions": 0,
    "units": 0,
    "roi": null,
    "win_rate": null,
    "seasons": [
      "2025-26"
    ]
  },
  "registration": null,
  "bets": [],
  "notice": "A saved rule's record from the moment it was saved, at the line Kelly held at its bet moment. It isn't a pick.",
  "summary": "Home teams (version 2) since it was saved: 0-0, +0.0 units, no ROI yet (0) decisions, (0) pending.",
  "assumptions": [
    "A saved rule's record from the moment it was saved, at the line Kelly held at its bet moment. It isn't a pick."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_b85bb844fd56266d471b4716",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

```http
GET https://api.askkelly.ai/v1/rules/rl_zzzzzzzzzzzzzzzzzzzz/record
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/not_found",
  "title": "Not found",
  "status": 404,
  "code": "not_found",
  "detail": "No saved rule with that rule_id on this account.",
  "param": "rule_id",
  "doc_url": "https://docs.askkelly.ai/problems/not_found",
  "request_id": "req_3853cadefa4e444ac772f889",
  "retryable": false,
  "display_message": "That could not be found."
}
```

`POST /v1/rules/{rule_id}:register`

## Register a saved rule in public
public, no key needed · 0 credits, not charged during the beta · MCP tool `register_rule` · status live

Registers one of your saved versions in public with its pass bar set now: an e-value to reach (20 by default, alpha 0.05) or a fixed number of decisions. The frozen rule is hashed and the hash published; its record counts only bets after this moment, and it can never be edited, only withdrawn. A formula can stay hidden until embargo_until; the record is public from day one.

### Parameters
- `rule_id` string · path · required  
  A saved rule's ID (rl_…), from test_rule's rule_version.  
  pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$

Body, `application/json` (required):

- `rule_id` string  
  A saved rule's ID (rl_…), from test_rule's rule_version.  
  pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$
- `version` integer  
  The version to register (default the newest).  
  min 1
- `success_type` string  
  The pass bar: e_value (default; met when the forward e-value reaches the threshold) or fixed_n (a one-sided test at success_n decisions).  
  One of: `e_value`, `fixed_n` (open: new values may be added).
- `success_threshold` number  
  e_value only: the e-value to reach, 20 (alpha 0.05) or more.  
  min 20 · max 10000
- `success_n` integer  
  fixed_n only: forward decisions to judge it at (30 to 5000).  
  min 30 · max 5000
- `public_formula` boolean  
  false hides the formula until embargo_until (the record is public anyway).
- `embargo_until` string  
  With public_formula false: the date the formula is shown (YYYY-MM-DD, within a year).  
  format date

### Response
`200` The rule registration facts.

- `object` const · required  
  Always rule_registration.  
  Always `"rule_registration"`.
- `registration_id` string · required  
  reg_….  
  pattern ^reg_[0-9a-hjkmnp-tv-z]{20}$
- `reg_hash` string · required  
  sha256 of the canonical registration JSON (reg_json, keys sorted, no spaces): recompute it to check nothing changed.  
  pattern ^sha256:[0-9a-f]{64}$
- `registered_at` string · required  
  When it was registered (RFC 3339); its record counts bets after this.  
  format date-time
- `status` string · required  
  running, met, failed or withdrawn.  
  One of: `running`, `met`, `failed`, `withdrawn` (open: new values may be added).
- `withdrawn_at` string · nullable  
  When the author withdrew it.  
  format date-time
- `formula_hidden` boolean  
  The author hid the formula until embargo_until; the record is public anyway.
- `embargo_until` string · nullable  
  The date the formula is shown.  
  format date
- `rule` object  
  The frozen rule: formula (null while hidden), competition, market, side, bet moment, price policy and stake.
- `success` object · required  
  The pass bar set at registration: e_value (met when the forward e-value reaches threshold) or fixed_n (a one-sided test at n decisions).
  - `type` string  
    e_value or fixed_n.  
    One of: `e_value`, `fixed_n` (open: new values may be added).
  - `threshold` number  
    e_value: the e-value to reach (20 is alpha 0.05).
  - `n` integer  
    fixed_n: the forward decisions it is judged at.
  - `alpha` number  
    The test's level.
- `progress` object  
  How far it is toward the bar.
  - `statistic` number · nullable  
    The running maximum e-value, or the fixed-n p-value once judged.
  - `threshold` number  
    The bar.
  - `progress` number  
    0 to 1.
- `backtest` object · nullable  
  The backtest it rests on: run, data version, tester revision, seasons, record, ROI.
- `author_rules_tried` integer  
  Rules the author had tried on this competition and market when registering (the rules-tried ledger).  
  min 1
- `author_registrations` object  
  Every registration the author has made, by status.
  - `total` integer  
    All of them.
  - `running` integer  
    Running.
  - `met` integer  
    Met.
  - `failed` integer  
    Failed.
  - `withdrawn` integer  
    Withdrawn.
- `record` object · required  
  The record since registration.
  - `saved_at` string · nullable  
    When the clock started: the version's save, or the registration (RFC 3339).  
    format date-time
  - `record` string · required  
    Wins-losses(-pushes) since then.
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `decisions` integer · required  
    Wins plus losses.
  - `bets` integer  
    Graded bets.
  - `units` number · required  
    Units won or lost.
  - `roi` number · nullable  
    Units over units risked, a fraction.
  - `clv_mean` number · nullable  
    Mean closing-line value of the bets (null at the close: none by definition).
  - `clv_bets` integer  
    Bets with a closing-line value.
  - `e_value` number · nullable  
    Anytime-valid e-value of the forward bets against no edge at the prices taken (safe to read every day).
  - `max_e_value` number · nullable  
    Its running maximum.
  - `e_threshold` number  
    The e-value that counts as evidence at alpha 0.05 (20).
  - `vs_backtest` object · nullable  
    Is live consistent with the backtest?
    - `win_rate_backtest` number  
      The backtest's win rate.
    - `win_rate_forward` number · nullable  
      The win rate since the save.
    - `p_value_difference` number · nullable  
      Two-sided p-value that the two win rates differ.
    - `method` string · nullable  
      fisher_exact (under 30 forward decisions) or two_proportion_z.
    - `e_value_worse` number  
      E-value that live wins less often than the backtest; 20 or more fails the check.
  - `pending` integer  
    Bets recorded at their bet moment, not yet final.
  - `no_line` integer  
    Matches Kelly held no line for at the bet moment (kept, never skipped).
  - `void` integer  
    Postponed games past the window.
  - `status` string · required  
    The since_saved check: na until min_decisions, then pass or fail.  
    One of: `na`, `pass`, `fail` (open: new values may be added).
  - `min_decisions` integer  
    Forward decisions before the check is judged (30).
  - `last_bet_at` string · nullable  
    The latest bet moment recorded.  
    format date-time
- `bets` array of object  
  The bets since registration, newest first (up to 200).
  - `key` string  
    {game_id}:{team_id}.
  - `label` string  
    The game, from the side bet.
  - `bet_moment` string  
    edition or close.
  - `moment_at` string  
    When the bet was taken (RFC 3339).  
    format date-time
  - `line` number · nullable  
    The line at the bet moment.
  - `status` string  
    pending, graded, void or no_line.  
    One of: `pending`, `graded`, `void`, `no_line` (open: new values may be added).
  - `result` string · nullable  
    win, loss, push, half_win or half_loss once graded.
  - `units` number · nullable  
    Units won or lost.
  - `clv` number · nullable  
    Closing-line value, a fraction.
- `anchor` object · nullable  
  The registration day's Merkle root and its RFC 3161 timestamp (null until the day is over).
  - `day` string  
    The UTC day.
  - `merkle_root` string  
    sha256 root.
  - `leaves` integer  
    Registrations that day.
  - `tsa` string · nullable  
    The timestamp authority.
  - `stamped_at` string · nullable  
    When it was stamped.  
    format date-time
- `reg_json` object · nullable  
  The registration as hashed (null while the formula is hidden).
- `notice` string  
  It isn't a pick.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`not_found`](/problems/not_found) · [`conflict`](/problems/conflict)

### Example
```http
POST https://api.askkelly.ai/v1/rules/rl_5bbmw66t2r1jvg6cpxt2:register
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/conflict",
  "title": "Conflict",
  "status": 409,
  "code": "conflict",
  "detail": "This version is already registered; withdraw it first or save a new version.",
  "param": "rule_id",
  "doc_url": "https://docs.askkelly.ai/problems/conflict",
  "request_id": "req_529f74a562c7fa54276958f8",
  "retryable": false,
  "display_message": "That's already in use."
}
```

```http
POST https://api.askkelly.ai/v1/rules/rl_5bbmw66t2r1jvg6cpxt2:register
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "success_type": "e_value",
  "success_threshold": 20
}
```

```json
{
  "object": "rule_registration",
  "registration_id": "reg_h7gxzwtpbbhn6rkgsrs4",
  "reg_hash": "sha256:cfb004340b9bf7088544384474b3d3014851046d98f16d393fe33e9cbc94fa8d",
  "registered_at": "2026-10-04T17:30:00Z",
  "status": "running",
  "withdrawn_at": null,
  "formula_hidden": false,
  "embargo_until": null,
  "rule": {
    "name": "Home teams",
    "side": "rule",
    "price": "consensus",
    "stake": "risk",
    "market": "spread",
    "formula": "=AND(home, rest_days >= 1)",
    "rule_id": "rl_5bbmw66t2r1jvg6cpxt2",
    "version": 2,
    "warm_up": "as_written",
    "rule_hash": "sha256:af2069d0e4d5307d8c4ea7ac707cc0d3e7e13f5c5ea4f95806a58327400b8676",
    "bet_moment": "close",
    "competition": "nba",
    "season_type": "regular",
    "canonical_formula": "{\"args\":[{\"args\":[{\"k\":\"name\",\"path\":[\"rest_days\"]},{\"k\":\"num\",\"v\":1}],\"k\":\"op\",\"op\":\">=\"},{\"k\":\"name\",\"path\":[\"home\"]}],\"fn\":\"AND\",\"k\":\"call\"}"
  },
  "success": {
    "type": "e_value",
    "alpha": 0.05,
    "threshold": 20
  },
  "progress": {
    "statistic": 0,
    "threshold": 20,
    "progress": 0
  },
  "backtest": {
    "roi": null,
    "wins": 0,
    "units": 0,
    "engine": 8,
    "losses": 0,
    "record": "0-0",
    "run_id": "run_ewabjhkycqv5zk6mvbkn",
    "seasons": [
      "2025-26"
    ],
    "win_rate": null,
    "decisions": 0,
    "data_version": "snap_52"
  },
  "author_rules_tried": 2,
  "author_registrations": {
    "total": 1,
    "running": 1,
    "met": 0,
    "failed": 0,
    "withdrawn": 0
  },
  "record": {
    "saved_at": "2026-10-04T17:30:00Z",
    "record": "0-0",
    "wins": 0,
    "losses": 0,
    "pushes": 0,
    "decisions": 0,
    "bets": 0,
    "units": 0,
    "roi": null,
    "clv_mean": null,
    "clv_bets": 0,
    "e_value": null,
    "max_e_value": null,
    "e_threshold": 20,
    "vs_backtest": null,
    "pending": 0,
    "no_line": 0,
    "void": 0,
    "status": "na",
    "min_decisions": 30,
    "last_bet_at": null
  },
  "bets": [],
  "anchor": null,
  "reg_json": {
    "v": 1,
    "kind": "kelly.rule_registration",
    "rule": {
      "name": "Home teams",
      "side": "rule",
      "price": "consensus",
      "stake": "risk",
      "market": "spread",
      "formula": "=AND(home, rest_days >= 1)",
      "rule_id": "rl_5bbmw66t2r1jvg6cpxt2",
      "version": 2,
      "warm_up": "as_written",
      "rule_hash": "sha256:af2069d0e4d5307d8c4ea7ac707cc0d3e7e13f5c5ea4f95806a58327400b8676",
      "bet_moment": "close",
      "competition": "nba",
      "season_type": "regular",
      "canonical_formula": "{\"args\":[{\"args\":[{\"k\":\"name\",\"path\":[\"rest_days\"]},{\"k\":\"num\",\"v\":1}],\"k\":\"op\",\"op\":\">=\"},{\"k\":\"name\",\"path\":[\"home\"]}],\"fn\":\"AND\",\"k\":\"call\"}"
    },
    "reg_id": "reg_h7gxzwtpbbhn6rkgsrs4",
    "success": {
      "type": "e_value",
      "alpha": 0.05,
      "threshold": 20
    },
    "backtest": {
      "roi": null,
      "wins": 0,
      "units": 0,
      "engine": 8,
      "losses": 0,
      "record": "0-0",
      "run_id": "run_ewabjhkycqv5zk6mvbkn",
      "seasons": [
        "2025-26"
      ],
      "win_rate": null,
      "decisions": 0,
      "data_version": "snap_52"
    },
    "embargo_until": null,
    "registered_at": "2026-10-04T17:30:00Z",
    "public_formula": true,
    "primary_outcome": "units at the registered bet moment, graded by Kelly's rule tester",
    "author_rules_tried": 2
  },
  "notice": "This tracks a betting rule's record from the day it was registered. It isn't a pick.",
  "summary": "Home teams (version 2) is registered: sha256:cfb004340b9b…, met when its e-value reaches 20. Its record counts bets after 2026-10-04T17:30:00Z.",
  "assumptions": [
    "This tracks a betting rule's record from the day it was registered. It isn't a pick."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_2ceb6410bd9e25bcbc2c8b66",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`GET /v1/registrations/{registration_id}`

## Get a registered rule
public, no key needed · 0 credits, not charged during the beta · MCP tool `get_registration` · status live

A public registration: the frozen rule (its formula hidden until an embargo ends), the pass bar, the record since registration and its status (running, met, failed, withdrawn), the published hash, the day's timestamped Merkle root, and how many rules and registrations the author has made.

### Parameters
- `registration_id` string · path · required  
  A registration's ID (reg_…), from register_rule.  
  pattern ^reg_[0-9a-hjkmnp-tv-z]{20}$

### Response
`200` The rule registration facts.

- `object` const · required  
  Always rule_registration.  
  Always `"rule_registration"`.
- `registration_id` string · required  
  reg_….  
  pattern ^reg_[0-9a-hjkmnp-tv-z]{20}$
- `reg_hash` string · required  
  sha256 of the canonical registration JSON (reg_json, keys sorted, no spaces): recompute it to check nothing changed.  
  pattern ^sha256:[0-9a-f]{64}$
- `registered_at` string · required  
  When it was registered (RFC 3339); its record counts bets after this.  
  format date-time
- `status` string · required  
  running, met, failed or withdrawn.  
  One of: `running`, `met`, `failed`, `withdrawn` (open: new values may be added).
- `withdrawn_at` string · nullable  
  When the author withdrew it.  
  format date-time
- `formula_hidden` boolean  
  The author hid the formula until embargo_until; the record is public anyway.
- `embargo_until` string · nullable  
  The date the formula is shown.  
  format date
- `rule` object  
  The frozen rule: formula (null while hidden), competition, market, side, bet moment, price policy and stake.
- `success` object · required  
  The pass bar set at registration: e_value (met when the forward e-value reaches threshold) or fixed_n (a one-sided test at n decisions).
  - `type` string  
    e_value or fixed_n.  
    One of: `e_value`, `fixed_n` (open: new values may be added).
  - `threshold` number  
    e_value: the e-value to reach (20 is alpha 0.05).
  - `n` integer  
    fixed_n: the forward decisions it is judged at.
  - `alpha` number  
    The test's level.
- `progress` object  
  How far it is toward the bar.
  - `statistic` number · nullable  
    The running maximum e-value, or the fixed-n p-value once judged.
  - `threshold` number  
    The bar.
  - `progress` number  
    0 to 1.
- `backtest` object · nullable  
  The backtest it rests on: run, data version, tester revision, seasons, record, ROI.
- `author_rules_tried` integer  
  Rules the author had tried on this competition and market when registering (the rules-tried ledger).  
  min 1
- `author_registrations` object  
  Every registration the author has made, by status.
  - `total` integer  
    All of them.
  - `running` integer  
    Running.
  - `met` integer  
    Met.
  - `failed` integer  
    Failed.
  - `withdrawn` integer  
    Withdrawn.
- `record` object · required  
  The record since registration.
  - `saved_at` string · nullable  
    When the clock started: the version's save, or the registration (RFC 3339).  
    format date-time
  - `record` string · required  
    Wins-losses(-pushes) since then.
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `decisions` integer · required  
    Wins plus losses.
  - `bets` integer  
    Graded bets.
  - `units` number · required  
    Units won or lost.
  - `roi` number · nullable  
    Units over units risked, a fraction.
  - `clv_mean` number · nullable  
    Mean closing-line value of the bets (null at the close: none by definition).
  - `clv_bets` integer  
    Bets with a closing-line value.
  - `e_value` number · nullable  
    Anytime-valid e-value of the forward bets against no edge at the prices taken (safe to read every day).
  - `max_e_value` number · nullable  
    Its running maximum.
  - `e_threshold` number  
    The e-value that counts as evidence at alpha 0.05 (20).
  - `vs_backtest` object · nullable  
    Is live consistent with the backtest?
    - `win_rate_backtest` number  
      The backtest's win rate.
    - `win_rate_forward` number · nullable  
      The win rate since the save.
    - `p_value_difference` number · nullable  
      Two-sided p-value that the two win rates differ.
    - `method` string · nullable  
      fisher_exact (under 30 forward decisions) or two_proportion_z.
    - `e_value_worse` number  
      E-value that live wins less often than the backtest; 20 or more fails the check.
  - `pending` integer  
    Bets recorded at their bet moment, not yet final.
  - `no_line` integer  
    Matches Kelly held no line for at the bet moment (kept, never skipped).
  - `void` integer  
    Postponed games past the window.
  - `status` string · required  
    The since_saved check: na until min_decisions, then pass or fail.  
    One of: `na`, `pass`, `fail` (open: new values may be added).
  - `min_decisions` integer  
    Forward decisions before the check is judged (30).
  - `last_bet_at` string · nullable  
    The latest bet moment recorded.  
    format date-time
- `bets` array of object  
  The bets since registration, newest first (up to 200).
  - `key` string  
    {game_id}:{team_id}.
  - `label` string  
    The game, from the side bet.
  - `bet_moment` string  
    edition or close.
  - `moment_at` string  
    When the bet was taken (RFC 3339).  
    format date-time
  - `line` number · nullable  
    The line at the bet moment.
  - `status` string  
    pending, graded, void or no_line.  
    One of: `pending`, `graded`, `void`, `no_line` (open: new values may be added).
  - `result` string · nullable  
    win, loss, push, half_win or half_loss once graded.
  - `units` number · nullable  
    Units won or lost.
  - `clv` number · nullable  
    Closing-line value, a fraction.
- `anchor` object · nullable  
  The registration day's Merkle root and its RFC 3161 timestamp (null until the day is over).
  - `day` string  
    The UTC day.
  - `merkle_root` string  
    sha256 root.
  - `leaves` integer  
    Registrations that day.
  - `tsa` string · nullable  
    The timestamp authority.
  - `stamped_at` string · nullable  
    When it was stamped.  
    format date-time
- `reg_json` object · nullable  
  The registration as hashed (null while the formula is hidden).
- `notice` string  
  It isn't a pick.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found)

### Example
```http
GET https://api.askkelly.ai/v1/registrations/reg_h7gxzwtpbbhn6rkgsrs4
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "rule_registration",
  "registration_id": "reg_h7gxzwtpbbhn6rkgsrs4",
  "reg_hash": "sha256:cfb004340b9bf7088544384474b3d3014851046d98f16d393fe33e9cbc94fa8d",
  "registered_at": "2026-10-04T17:30:00Z",
  "status": "running",
  "withdrawn_at": null,
  "formula_hidden": false,
  "embargo_until": null,
  "rule": {
    "name": "Home teams",
    "side": "rule",
    "price": "consensus",
    "stake": "risk",
    "market": "spread",
    "formula": "=AND(home, rest_days >= 1)",
    "rule_id": "rl_5bbmw66t2r1jvg6cpxt2",
    "version": 2,
    "warm_up": "as_written",
    "rule_hash": "sha256:af2069d0e4d5307d8c4ea7ac707cc0d3e7e13f5c5ea4f95806a58327400b8676",
    "bet_moment": "close",
    "competition": "nba",
    "season_type": "regular",
    "canonical_formula": "{\"args\":[{\"args\":[{\"k\":\"name\",\"path\":[\"rest_days\"]},{\"k\":\"num\",\"v\":1}],\"k\":\"op\",\"op\":\">=\"},{\"k\":\"name\",\"path\":[\"home\"]}],\"fn\":\"AND\",\"k\":\"call\"}"
  },
  "success": {
    "type": "e_value",
    "alpha": 0.05,
    "threshold": 20
  },
  "progress": {
    "statistic": 0,
    "threshold": 20,
    "progress": 0
  },
  "backtest": {
    "roi": null,
    "wins": 0,
    "units": 0,
    "engine": 8,
    "losses": 0,
    "record": "0-0",
    "run_id": "run_ewabjhkycqv5zk6mvbkn",
    "seasons": [
      "2025-26"
    ],
    "win_rate": null,
    "decisions": 0,
    "data_version": "snap_52"
  },
  "author_rules_tried": 2,
  "author_registrations": {
    "total": 1,
    "running": 1,
    "met": 0,
    "failed": 0,
    "withdrawn": 0
  },
  "record": {
    "saved_at": "2026-10-04T17:30:00Z",
    "record": "0-0",
    "wins": 0,
    "losses": 0,
    "pushes": 0,
    "decisions": 0,
    "bets": 0,
    "units": 0,
    "roi": null,
    "clv_mean": null,
    "clv_bets": 0,
    "e_value": null,
    "max_e_value": null,
    "e_threshold": 20,
    "vs_backtest": null,
    "pending": 0,
    "no_line": 0,
    "void": 0,
    "status": "na",
    "min_decisions": 30,
    "last_bet_at": null
  },
  "bets": [],
  "anchor": null,
  "reg_json": {
    "v": 1,
    "kind": "kelly.rule_registration",
    "rule": {
      "name": "Home teams",
      "side": "rule",
      "price": "consensus",
      "stake": "risk",
      "market": "spread",
      "formula": "=AND(home, rest_days >= 1)",
      "rule_id": "rl_5bbmw66t2r1jvg6cpxt2",
      "version": 2,
      "warm_up": "as_written",
      "rule_hash": "sha256:af2069d0e4d5307d8c4ea7ac707cc0d3e7e13f5c5ea4f95806a58327400b8676",
      "bet_moment": "close",
      "competition": "nba",
      "season_type": "regular",
      "canonical_formula": "{\"args\":[{\"args\":[{\"k\":\"name\",\"path\":[\"rest_days\"]},{\"k\":\"num\",\"v\":1}],\"k\":\"op\",\"op\":\">=\"},{\"k\":\"name\",\"path\":[\"home\"]}],\"fn\":\"AND\",\"k\":\"call\"}"
    },
    "reg_id": "reg_h7gxzwtpbbhn6rkgsrs4",
    "success": {
      "type": "e_value",
      "alpha": 0.05,
      "threshold": 20
    },
    "backtest": {
      "roi": null,
      "wins": 0,
      "units": 0,
      "engine": 8,
      "losses": 0,
      "record": "0-0",
      "run_id": "run_ewabjhkycqv5zk6mvbkn",
      "seasons": [
        "2025-26"
      ],
      "win_rate": null,
      "decisions": 0,
      "data_version": "snap_52"
    },
    "embargo_until": null,
    "registered_at": "2026-10-04T17:30:00Z",
    "public_formula": true,
    "primary_outcome": "units at the registered bet moment, graded by Kelly's rule tester",
    "author_rules_tried": 2
  },
  "notice": "This tracks a betting rule's record from the day it was registered. It isn't a pick.",
  "summary": "Registration reg_h7gxzwtpbbhn6rkgsrs4: running, 0-0 since 2026-10-04, +0.0 units (met when its e-value reaches 20).",
  "assumptions": [
    "This tracks a betting rule's record from the day it was registered. It isn't a pick."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_2e1ecd758c89417812ff7acf",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

```http
GET https://api.askkelly.ai/v1/registrations/reg_zzzzzzzzzzzzzzzzzzzz
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/not_found",
  "title": "Not found",
  "status": 404,
  "code": "not_found",
  "detail": "No registration with that ID.",
  "param": "registration_id",
  "doc_url": "https://docs.askkelly.ai/problems/not_found",
  "request_id": "req_a16da7860dc9d726052ae6eb",
  "retryable": false,
  "display_message": "That could not be found."
}
```

`POST /v1/registrations/{registration_id}:withdraw`

## Withdraw a registration
public, no key needed · 0 credits, not charged during the beta · MCP tool `withdraw_registration` · status live

Withdraws one of your registrations. Its record to date stays public as a tombstone.

### Parameters
- `registration_id` string · path · required  
  A registration's ID (reg_…), from register_rule.  
  pattern ^reg_[0-9a-hjkmnp-tv-z]{20}$

### Response
`200` The rule registration facts.

- `object` const · required  
  Always rule_registration.  
  Always `"rule_registration"`.
- `registration_id` string · required  
  reg_….  
  pattern ^reg_[0-9a-hjkmnp-tv-z]{20}$
- `reg_hash` string · required  
  sha256 of the canonical registration JSON (reg_json, keys sorted, no spaces): recompute it to check nothing changed.  
  pattern ^sha256:[0-9a-f]{64}$
- `registered_at` string · required  
  When it was registered (RFC 3339); its record counts bets after this.  
  format date-time
- `status` string · required  
  running, met, failed or withdrawn.  
  One of: `running`, `met`, `failed`, `withdrawn` (open: new values may be added).
- `withdrawn_at` string · nullable  
  When the author withdrew it.  
  format date-time
- `formula_hidden` boolean  
  The author hid the formula until embargo_until; the record is public anyway.
- `embargo_until` string · nullable  
  The date the formula is shown.  
  format date
- `rule` object  
  The frozen rule: formula (null while hidden), competition, market, side, bet moment, price policy and stake.
- `success` object · required  
  The pass bar set at registration: e_value (met when the forward e-value reaches threshold) or fixed_n (a one-sided test at n decisions).
  - `type` string  
    e_value or fixed_n.  
    One of: `e_value`, `fixed_n` (open: new values may be added).
  - `threshold` number  
    e_value: the e-value to reach (20 is alpha 0.05).
  - `n` integer  
    fixed_n: the forward decisions it is judged at.
  - `alpha` number  
    The test's level.
- `progress` object  
  How far it is toward the bar.
  - `statistic` number · nullable  
    The running maximum e-value, or the fixed-n p-value once judged.
  - `threshold` number  
    The bar.
  - `progress` number  
    0 to 1.
- `backtest` object · nullable  
  The backtest it rests on: run, data version, tester revision, seasons, record, ROI.
- `author_rules_tried` integer  
  Rules the author had tried on this competition and market when registering (the rules-tried ledger).  
  min 1
- `author_registrations` object  
  Every registration the author has made, by status.
  - `total` integer  
    All of them.
  - `running` integer  
    Running.
  - `met` integer  
    Met.
  - `failed` integer  
    Failed.
  - `withdrawn` integer  
    Withdrawn.
- `record` object · required  
  The record since registration.
  - `saved_at` string · nullable  
    When the clock started: the version's save, or the registration (RFC 3339).  
    format date-time
  - `record` string · required  
    Wins-losses(-pushes) since then.
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `decisions` integer · required  
    Wins plus losses.
  - `bets` integer  
    Graded bets.
  - `units` number · required  
    Units won or lost.
  - `roi` number · nullable  
    Units over units risked, a fraction.
  - `clv_mean` number · nullable  
    Mean closing-line value of the bets (null at the close: none by definition).
  - `clv_bets` integer  
    Bets with a closing-line value.
  - `e_value` number · nullable  
    Anytime-valid e-value of the forward bets against no edge at the prices taken (safe to read every day).
  - `max_e_value` number · nullable  
    Its running maximum.
  - `e_threshold` number  
    The e-value that counts as evidence at alpha 0.05 (20).
  - `vs_backtest` object · nullable  
    Is live consistent with the backtest?
    - `win_rate_backtest` number  
      The backtest's win rate.
    - `win_rate_forward` number · nullable  
      The win rate since the save.
    - `p_value_difference` number · nullable  
      Two-sided p-value that the two win rates differ.
    - `method` string · nullable  
      fisher_exact (under 30 forward decisions) or two_proportion_z.
    - `e_value_worse` number  
      E-value that live wins less often than the backtest; 20 or more fails the check.
  - `pending` integer  
    Bets recorded at their bet moment, not yet final.
  - `no_line` integer  
    Matches Kelly held no line for at the bet moment (kept, never skipped).
  - `void` integer  
    Postponed games past the window.
  - `status` string · required  
    The since_saved check: na until min_decisions, then pass or fail.  
    One of: `na`, `pass`, `fail` (open: new values may be added).
  - `min_decisions` integer  
    Forward decisions before the check is judged (30).
  - `last_bet_at` string · nullable  
    The latest bet moment recorded.  
    format date-time
- `bets` array of object  
  The bets since registration, newest first (up to 200).
  - `key` string  
    {game_id}:{team_id}.
  - `label` string  
    The game, from the side bet.
  - `bet_moment` string  
    edition or close.
  - `moment_at` string  
    When the bet was taken (RFC 3339).  
    format date-time
  - `line` number · nullable  
    The line at the bet moment.
  - `status` string  
    pending, graded, void or no_line.  
    One of: `pending`, `graded`, `void`, `no_line` (open: new values may be added).
  - `result` string · nullable  
    win, loss, push, half_win or half_loss once graded.
  - `units` number · nullable  
    Units won or lost.
  - `clv` number · nullable  
    Closing-line value, a fraction.
- `anchor` object · nullable  
  The registration day's Merkle root and its RFC 3161 timestamp (null until the day is over).
  - `day` string  
    The UTC day.
  - `merkle_root` string  
    sha256 root.
  - `leaves` integer  
    Registrations that day.
  - `tsa` string · nullable  
    The timestamp authority.
  - `stamped_at` string · nullable  
    When it was stamped.  
    format date-time
- `reg_json` object · nullable  
  The registration as hashed (null while the formula is hidden).
- `notice` string  
  It isn't a pick.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found) · [`conflict`](/problems/conflict)

### Example
```http
POST https://api.askkelly.ai/v1/registrations/reg_h7gxzwtpbbhn6rkgsrs4:withdraw
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{}
```

```json
{
  "object": "rule_registration",
  "registration_id": "reg_h7gxzwtpbbhn6rkgsrs4",
  "reg_hash": "sha256:cfb004340b9bf7088544384474b3d3014851046d98f16d393fe33e9cbc94fa8d",
  "registered_at": "2026-10-04T17:30:00Z",
  "status": "withdrawn",
  "withdrawn_at": "2026-10-04T17:30:00Z",
  "formula_hidden": false,
  "embargo_until": null,
  "rule": {
    "name": "Home teams",
    "side": "rule",
    "price": "consensus",
    "stake": "risk",
    "market": "spread",
    "formula": "=AND(home, rest_days >= 1)",
    "rule_id": "rl_5bbmw66t2r1jvg6cpxt2",
    "version": 2,
    "warm_up": "as_written",
    "rule_hash": "sha256:af2069d0e4d5307d8c4ea7ac707cc0d3e7e13f5c5ea4f95806a58327400b8676",
    "bet_moment": "close",
    "competition": "nba",
    "season_type": "regular",
    "canonical_formula": "{\"args\":[{\"args\":[{\"k\":\"name\",\"path\":[\"rest_days\"]},{\"k\":\"num\",\"v\":1}],\"k\":\"op\",\"op\":\">=\"},{\"k\":\"name\",\"path\":[\"home\"]}],\"fn\":\"AND\",\"k\":\"call\"}"
  },
  "success": {
    "type": "e_value",
    "alpha": 0.05,
    "threshold": 20
  },
  "progress": {
    "statistic": 0,
    "threshold": 20,
    "progress": 0
  },
  "backtest": {
    "roi": null,
    "wins": 0,
    "units": 0,
    "engine": 8,
    "losses": 0,
    "record": "0-0",
    "run_id": "run_ewabjhkycqv5zk6mvbkn",
    "seasons": [
      "2025-26"
    ],
    "win_rate": null,
    "decisions": 0,
    "data_version": "snap_52"
  },
  "author_rules_tried": 2,
  "author_registrations": {
    "total": 1,
    "running": 0,
    "met": 0,
    "failed": 0,
    "withdrawn": 1
  },
  "record": {
    "saved_at": "2026-10-04T17:30:00Z",
    "record": "0-0",
    "wins": 0,
    "losses": 0,
    "pushes": 0,
    "decisions": 0,
    "bets": 0,
    "units": 0,
    "roi": null,
    "clv_mean": null,
    "clv_bets": 0,
    "e_value": null,
    "max_e_value": null,
    "e_threshold": 20,
    "vs_backtest": null,
    "pending": 0,
    "no_line": 0,
    "void": 0,
    "status": "na",
    "min_decisions": 30,
    "last_bet_at": null
  },
  "bets": [],
  "anchor": null,
  "reg_json": {
    "v": 1,
    "kind": "kelly.rule_registration",
    "rule": {
      "name": "Home teams",
      "side": "rule",
      "price": "consensus",
      "stake": "risk",
      "market": "spread",
      "formula": "=AND(home, rest_days >= 1)",
      "rule_id": "rl_5bbmw66t2r1jvg6cpxt2",
      "version": 2,
      "warm_up": "as_written",
      "rule_hash": "sha256:af2069d0e4d5307d8c4ea7ac707cc0d3e7e13f5c5ea4f95806a58327400b8676",
      "bet_moment": "close",
      "competition": "nba",
      "season_type": "regular",
      "canonical_formula": "{\"args\":[{\"args\":[{\"k\":\"name\",\"path\":[\"rest_days\"]},{\"k\":\"num\",\"v\":1}],\"k\":\"op\",\"op\":\">=\"},{\"k\":\"name\",\"path\":[\"home\"]}],\"fn\":\"AND\",\"k\":\"call\"}"
    },
    "reg_id": "reg_h7gxzwtpbbhn6rkgsrs4",
    "success": {
      "type": "e_value",
      "alpha": 0.05,
      "threshold": 20
    },
    "backtest": {
      "roi": null,
      "wins": 0,
      "units": 0,
      "engine": 8,
      "losses": 0,
      "record": "0-0",
      "run_id": "run_ewabjhkycqv5zk6mvbkn",
      "seasons": [
        "2025-26"
      ],
      "win_rate": null,
      "decisions": 0,
      "data_version": "snap_52"
    },
    "embargo_until": null,
    "registered_at": "2026-10-04T17:30:00Z",
    "public_formula": true,
    "primary_outcome": "units at the registered bet moment, graded by Kelly's rule tester",
    "author_rules_tried": 2
  },
  "notice": "This tracks a betting rule's record from the day it was registered. It isn't a pick.",
  "summary": "Registration reg_h7gxzwtpbbhn6rkgsrs4 is withdrawn; its record to date (0-0) stays public.",
  "assumptions": [
    "This tracks a betting rule's record from the day it was registered. It isn't a pick."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_5c908e27466f1e05b5c41324",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`GET /v1/rules/{rule_id}/matches`

## List a saved rule's matches now
public, no key needed · 0 credits, not charged during the beta · MCP tool `list_rule_matches` · status live

The games a saved rule's alert automations hold now: matched, just unmatched, or frozen at their bet moment, with the worst price at which the backtest still breaks even. Turn alerts on with an automation whose scope names the rule (scope.rule_id).

### Parameters
- `rule_id` string · path · required  
  A saved rule's ID (rl_…), from test_rule's rule_version.  
  pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$

- `version` integer · query  
  The version whose backtest sets the price guard (default the newest).  
  min 1

### Response
`200` The rule matches facts.

- `object` const · required  
  Always rule_matches.  
  Always `"rule_matches"`.
- `rule_id` string · required  
  The saved rule.  
  pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$
- `name` string  
  Its name.
- `version` integer  
  The version read.  
  min 1
- `break_even_price` object · nullable  
  The worst price at which the backtest still breaks even (its win rate's 80% Wilson lower bound). Null without an edge to guard.
  - `american` integer  
    American odds.
- `matched` integer · required  
  Games matched now.
- `matches` array of object · required  
  Games, matched first.
  - `key` string  
    {game_id}:{team_id}.
  - `state` string  
    matched, unmatched or frozen (reached its bet moment).  
    One of: `matched`, `unmatched`, `frozen` (open: new values may be added).
  - `version` integer  
    The version alerted.
  - `moment_at` string · nullable  
    Its bet moment.  
    format date-time
  - `changed_at` string  
    When its state last changed.  
    format date-time
  - `alerted` string · nullable  
    The last event sent for it.
- `alerts_on` boolean  
  The rule has an alert automation.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found)

### Example
```http
GET https://api.askkelly.ai/v1/rules/rl_5bbmw66t2r1jvg6cpxt2/matches
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "rule_matches",
  "rule_id": "rl_5bbmw66t2r1jvg6cpxt2",
  "name": "Home teams",
  "version": 2,
  "break_even_price": null,
  "matched": 0,
  "matches": [],
  "alerts_on": false,
  "summary": "Home teams: (0) games match now.",
  "assumptions": [],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_0a4c579dc55200489daee103",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`POST /v1/rules:sweep`

## Sweep a betting rule's numbers
public, no key needed · 1 credit, not charged during the beta · MCP tool `sweep_rule` · status live

Up to three of a rule's numbers swept as slots ({1..6}, {-7..-3 step 0.5}, {1|2|4}; 256 settings at most), every setting bet on the same games and the search charged (backtester T8: F41, F16, F29, F30). The headline is the median ROI across every setting; the plateau pick sits beside the single best; the newest 30% of the bets are sealed and opened once for the picked setting; PBO, SPA and Reality Check p, the deflated ROI, walk-forward over seasons and purged cross-validation; then the picked setting's full rule test, its verdict reading the sweep. Every setting counts toward the account's rules tried. Never a pick or a ranking.

### Parameters
Body, `application/json` (required):

- `formula` string  
  The rule with up to three slots where numbers go: {1..6}, {-7..-3 step 0.5} or {1|2|4}, e.g. =AND(home, rest_days - opponent.rest_days >= {1..6}). At most 256 settings.  
  min length 2 · max length 2000
- `competition` string  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...; racing: horse_racing, greyhounds or harness (seasons are calendar years).  
  pattern ^[a-z0-9_]{2,24}$
- `seasons` array of string  
  Seasons to test, oldest first (1 to 25), e.g. ["2021", "2022"]; or use from_season and to_season.  
  min items 1 · max items 25
- `from_season` string  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `side` string  
  rule (default) bets the team the rule matched; fade bets the other side.  
  One of: `rule`, `fade` (open: new values may be added).
- `bet_moment` string  
  close (default), edition (football: the weekly sheet's Monday 10 AM ET line) or day_before (other sports: 24 hours before the start).  
  One of: `close`, `edition`, `day_before` (open: new values may be added).
- `season_type` string  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).
- `stake` string  
  risk (default): 1 unit risked a bet; to_win: each bet sized to win 1 unit.  
  One of: `risk`, `to_win` (open: new values may be added).
- `price` string  
  consensus (default): Kelly's price at the bet moment; flat_110: every bet at -110.  
  One of: `consensus`, `flat_110` (open: new values may be added).
- `tests` integer  
  Rules tried on this data outside Kelly, this one included (default 1). Kelly counts the account's own; this may only raise that count.  
  min 1 · max 100000
- `base_formula` string  
  The base the rule filters, e.g. =AND(NOT(home), spread_close > 0); it must hold on every game the rule bets. Default: Kelly takes the rule's who-or-when conditions.  
  min length 2 · max length 2000
- `plan_roi` number  
  Also report the bets needed to prove this ROI (a fraction, 0.05 is 5%).
- `ci_level` number  
  The ROI interval's level, 0.8 to 0.99 (default 0.95).  
  min 0.8 · max 0.99
- `max_stale_minutes` integer  
  Leave out a price whose snapshot is older than this at the bet moment (default 60 at the close, 360 earlier; never under 10 for games before October 2022).  
  min 5 · max 10080
- `bankroll_units` number  
  Bankroll in units for the ruin chance and the staking replays (default 100).  
  max 1000000
- `ruin_share` number  
  Share of the bankroll whose loss counts as ruin (default 0.5; 1 = all of it).  
  max 1
- `horizon_bets` integer  
  Bets ahead the ruin chance looks (default 500).  
  min 1 · max 1000
- `paths` integer  
  Simulated futures for the ruin chance (default 5000).  
  min 1000 · max 10000
- `staking_plans` array of string  
  Staking plans to replay: flat, to_win, percent, kelly (default all four).  
  min items 1 · max items 4
- `percent` number  
  Share of the bankroll the percent plan bets (default 0.02).  
  max 0.5
- `kelly_fraction` number  
  Multiple of the Kelly criterion the kelly plan bets; omitted, the honest multiple from the record's sample size.  
  max 1
- `kelly_cap` number  
  Most of the bankroll the kelly plan puts on one bet (default 0.05).  
  max 1
- `max_bets_per_day` integer  
  Cap: bets a day (ET).  
  min 1 · max 1000
- `max_bets_per_game` integer  
  Cap: bets a game.  
  min 1 · max 10
- `max_bets_per_team_week` integer  
  Cap: bets on a team a week.  
  min 1 · max 50
- `max_open_stake` number  
  Cap: share of the bankroll at risk at once.  
  max 1
- `daily_stop_loss_units` number  
  Cap: no more bets that day once this many units are lost.  
  max 100000
- `cap_priority` string  
  Which bets a cap keeps: earliest (default) or random.  
  One of: `earliest`, `random` (open: new values may be added).
- `warm_up` string  
  as_written (default) grades every bet; require_full grades only bets whose windows had all the earlier games they read (ROLLING_AVG(margin, 5) needs 5).  
  One of: `as_written`, `require_full` (open: new values may be added).
- `settle` string  
  Racing only: the price bets settle at: sp (industry SP; win default, each_way), bsp (Betfair SP; place, lay and lay_place default) or tote.  
  One of: `sp`, `bsp`, `tote` (open: new values may be added).
- `commission` number  
  Racing only: Betfair commission on a winning BSP bet's winnings, as a share (default 0.05).  
  min 0 · max 0.2
- `ew_places` integer  
  Racing each_way only: places paid, instead of the standard terms by field size.  
  min 1 · max 8
- `ew_fraction` number  
  Racing each_way only: the place fraction of the win odds (0.2 is 1/5, 0.25 is 1/4), instead of the standard terms.  
  max 1
- `robustness_off` array of string  
  Robustness blocks to leave out (all of them with "all"); every block runs by default.  
  max items 10
- `ablation` string  
  shapley (default): each condition's share of the extra units (Shapley values); leave_one_out: only the rule without each condition.  
  One of: `shapley`, `leave_one_out` (open: new values may be added).
- `break_date` string  
  A date to test for a change in the edge (a Chow test), e.g. 2023-09-01.  
  format date
- `random_baseline_sims` integer  
  Random rules drawn for the baseline (default 2,000).  
  min 100 · max 10000
- `monte_carlo_sims` integer  
  Reorderings of the bets (default 10,000; fewer, never under 2,000, for long records).  
  min 100 · max 20000
- `monte_carlo_mode` string  
  block (default: whole bet-days resampled in runs of about a week), iid or permutation.  
  One of: `block`, `iid`, `permutation` (open: new values may be added).
- `skip_prob` number  
  Chance each bet is missed in the Monte Carlo and noise runs (default 0).  
  min 0 · max 0.5
- `trim_winners` number  
  Share of the biggest winners removed before the Monte Carlo (default 0).  
  min 0 · max 0.2
- `noise_runs` integer  
  Runs a noise family (default 200).  
  min 10 · max 1000
- `input_scale` number  
  Noise on the numbers the rule compares, as a share of their spread (default 0.10).  
  min 0 · max 0.5
- `line_prob` number  
  Chance each bet's line moves half a point either way in the line noise (default 0.5).  
  min 0 · max 1
- `save` boolean  
  true keeps this rule as a version of a saved rule named name (or of rule_id): the same rule again keeps its version, a different one is the next.
- `name` string  
  The saved rule's name, for a new one (1 to 120 characters).  
  min length 1 · max length 120
- `rule_id` string  
  Add this test as a version of a rule already saved (rl_…).  
  pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$
- `transfer` boolean  
  Also run the rule on its other market (spread and moneyline; over and under) and on other leagues, with its numbers moved to the same percentile there, pooled across leagues (transfer). Evidence beside the verdict; these runs don't count toward rules tried.
- `transfer_leagues` array of string  
  Leagues to carry it to (default: sibling leagues first, then the rest).  
  min items 1 · max items 13
- `transfer_markets` string  
  auto (default) adds the other market of the rule's own league; none leaves it out.  
  One of: `auto`, `none` (open: new values may be added).
- `transfer_thresholds` string  
  both (default), literal (the rule's numbers as written) or quantile (each number moved to the same percentile of its field in the other league).  
  One of: `both`, `literal`, `quantile` (open: new values may be added).
- `translation_id` string  
  The translation_id a translate_rule result gave, when the formula came from the person's words; it is kept with the test.  
  pattern ^tx_[0-9a-hjkmnp-tv-z]{20}$
- `share` boolean  
  true also makes a frozen report link for this run (report_url), for anyone with the link; needs an account.
- `charts` boolean  
  true adds the equity, drawdown and rolling ROI charts as Kelly Chart Specs (detail full).
- `market` string  
  spread (default), moneyline, over, under or draw (soccer).  
  One of: `spread`, `moneyline`, `over`, `under`, `draw` (open: new values may be added).
- `detail` string  
  full (default) or summary (no grid, windows, paths, bets list, splits or condition impact).  
  One of: `full`, `summary` (open: new values may be added).
- `pick` string  
  plateau (default): the setting whose neighbours did best; peak: the single best setting.  
  One of: `plateau`, `peak` (open: new values may be added).
- `walk_forward_window` string  
  anchored (default): train on every earlier season; rolling: the last walk_forward_train_seasons only.  
  One of: `anchored`, `rolling` (open: new values may be added).
- `walk_forward_train_seasons` integer  
  Training seasons (anchored: the fewest, default 2; rolling: the window, default 3).  
  min 1 · max 10
- `walk_forward_step` string  
  season (default) or half (NBA, WNBA, NHL, MLB: half seasons).  
  One of: `season`, `half` (open: new values may be added).
- `walk_forward_objective` string  
  What each window chooses by: z (default; with 30 decisions), units or roi.  
  One of: `z`, `units`, `roi` (open: new values may be added).
- `cv_groups` integer  
  Purged cross-validation's time groups (default 6).  
  min 3 · max 10
- `cv_test_groups` integer  
  Groups held out in each split (default 2).  
  min 1 · max 4

### Response
`200` The rule sweep facts.

- `object` const · required  
  Always rule_sweep.  
  Always `"rule_sweep"`.
- `rule` object · required  
  The rule as swept.
  - `formula` string  
    The formula with its slots.
  - `competition` string  
    League.
  - `market` string  
    Market.
  - `side` string  
    rule or fade.
  - `bet_moment` string  
    close or edition.
  - `seasons` array of string  
    Seasons.
  - `season_type` string  
    Season type.
  - `stake` string  
    risk or to_win.
  - `price` string  
    consensus or flat_110.
- `headline_roi` number · required · nullable  
  The headline ROI: the median across every setting (= sweep.spp_median_roi).
- `sweep` object · required  
  The sweep (F41): every setting on the same games, the search charged.
  - `slots` array of object  
    The swept numbers (up to three).
    - `name` string  
      a, b or c, in the order written.
    - `written` string  
      The slot as written, e.g. {1..6}.
    - `values` array of number  
      Its values, in order.
  - `variants` integer  
    Settings tried (up to 256); each one counts as a rule tried.
  - `tests_added` integer  
    Settings new to the account's rules tried (0 when the same sweep runs again).
  - `grid` array of object · nullable  
    Every setting before the sealed window, in grid order (summary detail: null).
    - `setting` object  
      A setting: each slot's name (a, b, c) and its value.
    - `formula` string  
      The rule at this setting.
    - `decisions` integer  
      Wins plus losses.
    - `record` string  
      Wins-losses(-pushes).
    - `units` number  
      Units won or lost.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      One-sided p against no skill at these prices (z = Σ units / √Σ s²(d − 1)).
  - `spp_median_roi` number · nullable  
    The headline: the median ROI across every setting (System Parameter Permutation), what the idea made, not its luckiest setting.
  - `roi_p05` number · nullable  
    5th percentile of the settings' ROIs.
  - `roi_p95` number · nullable  
    95th percentile of the settings' ROIs.
  - `share_profitable` number · nullable  
    Share of settings that made money before the sealed window.
  - `pick_rule` string  
    plateau (default): the best neighbourhood; peak: the best single setting.  
    One of: `plateau`, `peak` (open: new values may be added).
  - `min_decisions_to_pick` integer  
    Decisions a setting needs before it can be picked.
  - `fast_path` boolean  
    Settings were moved on the rule's circuit (true) or each evaluated.
  - `best` object · nullable  
    The best single setting before the sealed window (shown beside the pick, not instead).
    - `index` integer  
      The setting's place in the grid (row-major, the last slot moving fastest).
    - `setting` object  
      A setting: each slot's name (a, b, c) and its value.
    - `formula` string  
      The rule at this setting.
    - `roi` number · nullable  
      ROI before the sealed window.
    - `decisions` integer  
      Wins plus losses before the sealed window.
  - `picked` object · nullable  
    The picked setting.
    - `index` integer  
      Its place in the grid.
    - `setting` object  
      A setting: each slot's name (a, b, c) and its value.
    - `formula` string  
      The rule at this setting.
    - `roi` number · nullable  
      ROI before the sealed window.
    - `decisions` integer  
      Wins plus losses.
    - `reason` string  
      plateau or peak.
    - `neighbourhood_roi` number · nullable  
      The mean ROI of its neighbourhood (plateau pick).
    - `edge_of_range` array of string  
      Slots where the pick is the end of the range: the results may keep rising past it; widening the range counts as more rules tried.
  - `pbo` number · nullable  
    Probability of backtest overfitting (F16, CSCV on pooled ROI): the chance the in-sample best setting does no better than the median setting out of sample. Over 0.5 is worse than picking at random.
  - `blocks` integer · nullable  
    Time blocks PBO split the bets into (16; 10 under 300 bets; 8 under 160).
  - `splits` integer · nullable  
    Halves PBO tried: C(blocks, blocks/2).
  - `degradation_slope` number · nullable  
    Slope of out-of-sample ROI on in-sample ROI for the in-sample best (negative: what looks best does worse).
  - `prob_oos_loss` number · nullable  
    Share of halves where the in-sample best lost money out of sample.
  - `logit_median` number · nullable  
    Median logit of the in-sample best's out-of-sample rank.
  - `spa_p_value` number · nullable  
    Hansen's SPA p for the best setting (stationary bootstrap over days).
  - `reality_check_p` number · nullable  
    White's Reality Check p for the best setting.
  - `p_adjusted_picked` number · nullable  
    Romano-Wolf adjusted p for the picked setting.
  - `k_effective` number · nullable  
    Effective settings (Li-Ji): near-duplicate settings count as fewer.
  - `deflated_roi` number · nullable  
    The best ROI less the best a search of k_effective settings finds by chance.
  - `expected_max_roi` number · nullable  
    That expected best by chance.
  - `selection` object  
    The window the settings were chosen on.
    - `from` string · nullable  
      First day (YYYY-MM-DD).
    - `to` string · nullable  
      Last day.
    - `bets` integer  
      Rows any setting bet in it.
  - `forward` object · nullable  
    The sealed newest 30% (by day), opened once for the picked setting only.
    - `from` string  
      First sealed day.
    - `to` string  
      Last day.
    - `bets` integer  
      Bets.
    - `decisions` integer  
      Wins plus losses.
    - `record` string  
      Wins-losses(-pushes).
    - `units` number  
      Units won or lost.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      One-sided p against no skill.
  - `na` string · nullable  
    Why there is no pick, when there isn't.
- `walk_forward` object · required · nullable  
  Walk-forward (F29): the setting chosen on earlier seasons, bet on the next.
  - `window` string  
    anchored or rolling.  
    One of: `anchored`, `rolling` (open: new values may be added).
  - `train_seasons` integer  
    Training seasons (anchored: at least this many).
  - `step` string  
    season or half.  
    One of: `season`, `half` (open: new values may be added).
  - `objective` string  
    z, units or roi.  
    One of: `z`, `units`, `roi` (open: new values may be added).
  - `min_decisions` integer  
    Decisions a setting needs to be chosen.
  - `windows` array of object  
    Each window in time order.
    - `train` array of string  
      First and last training season (or half).
    - `test` string  
      The test season (or half).
    - `chosen` object · nullable  
      The setting chosen on the training seasons.
    - `chosen_formula` string  
      That setting's rule.
    - `carried` boolean  
      No setting had enough decisions; the previous choice was kept.
    - `is_roi` number · nullable  
      Its ROI on the training seasons.
    - `is_decisions` integer  
      Its decisions on the training seasons.
    - `oos` object · nullable  
      Its record on the test season.
      - `record` string  
        Wins-losses(-pushes).
      - `decisions` integer  
        Wins plus losses.
      - `units` number  
        Units won or lost.
      - `roi` number · nullable  
        Units over units risked.
    - `note` string  
      Why the window has no choice.
  - `oos` object · nullable  
    The test seasons stitched together.
    - `record` string  
      Wins-losses(-pushes).
    - `decisions` integer  
      Wins plus losses.
    - `units` number  
      Units won or lost.
    - `roi` number · nullable  
      Units over units risked.
    - `roi_ci95` array of number · nullable  
      ROI's 95% interval (normal, at break-even variance).
    - `p_value` number · nullable  
      One-sided p against no skill.
  - `wfe` number · nullable  
    Walk-forward efficiency: out-of-sample ROI over the chosen settings' in-sample ROI.
  - `windows_profitable` number · nullable  
    Share of windows that made money.
  - `max_window_share` number · nullable  
    The biggest window's share of the out-of-sample units.
  - `parameter_stability` number · nullable  
    Share of windows that chose the most chosen setting.
  - `matrix` array of object · nullable  
    Rolling windows of 2, 3 and 4 seasons by season (and half season where the league allows).
    - `train_seasons` integer  
      Rolling training seasons.
    - `step` string  
      season or half.
    - `windows` integer  
      Windows.
    - `oos_units` number · nullable  
      Out-of-sample units.
    - `wfe` number · nullable  
      Walk-forward efficiency.
    - `pass` boolean  
      Pardo's four criteria passed.
  - `matrix_passed` integer · nullable  
    Cells passed.
  - `matrix_cells` integer · nullable  
    Cells run.
  - `matrix_robust` boolean · nullable  
    At least two thirds of the cells passed.
  - `status` string  
    pass, fail or na.  
    One of: `pass`, `fail`, `na` (open: new values may be added).
  - `na` string · nullable  
    Why it can't run.
- `cross_validation` object · required · nullable  
  Purged cross-validation (F30): settings chosen on the rest, bet on the held-out groups.
  - `groups` integer  
    Contiguous groups of about equal bets.
  - `test_groups` integer  
    Groups held out a split.
  - `splits` integer · nullable  
    Splits: C(groups, test_groups).
  - `paths` integer · nullable  
    Full out-of-sample paths.
  - `weak` boolean  
    Fewer than three seasons: 4 groups, 1 held out.
  - `lookback_days` number  
    Days the rule's longest window reads back.
  - `season_to_date` boolean  
    The rule reads a season-to-date window (purged to the season's start).
  - `embargo_days` number  
    Days after each held-out group left out of training.
  - `purged_rows` integer  
    Bets left out of some training set by the purge or embargo.
  - `path_results` array of object · nullable  
    Each path (summary detail: null).
    - `path` integer  
      Path number.
    - `decisions` integer  
      Wins plus losses.
    - `record` string  
      Wins-losses(-pushes).
    - `units` number  
      Units won or lost.
    - `roi` number · nullable  
      Units over units risked.
    - `incomplete` boolean  
      A split on the path had no setting with enough decisions.
  - `roi_paths_min` number · nullable  
    Lowest path ROI.
  - `roi_paths_median` number · nullable  
    Median path ROI.
  - `roi_paths_max` number · nullable  
    Highest path ROI.
  - `paths_profitable` number · nullable  
    Share of paths that made money.
  - `pbo` number · nullable  
    PBO over the splits.
  - `degradation` number · nullable  
    Median path ROI over the chosen settings' median in-sample ROI.
  - `status` string  
    pass (PBO < 0.5 and 60% of paths profitable), fail or na.  
    One of: `pass`, `fail`, `na` (open: new values may be added).
  - `na` string · nullable  
    Why it can't run.
- `picked_test` object · required · nullable  
  The picked setting's full rule test (as test_rule returns it), its verdict reading the sweep: not just luck needs PBO ≤ 0.25, SPA p ≤ 0.05 and cross-validation; still working is the sealed window and walk-forward.
  - `verdict` object  
    Verdict v2: the leak gate, nine checks in three groups and the headline.
    - `version` integer  
      2.
    - `headline` string · required  
      The verdict in words.
    - `gate` object  
      The leak gate: a rule reading anything not known at the bet moment is refused first; leak_test is the cut-data rerun's status (clean or not_run).
    - `held_back_by` array of string  
      Why a rule with no failed check isn't holds_up (honest forward ROI at or under 0, PBO over 0.5 across 10 or more variants).
    - `level` string · required  
      too_few, no_profit, no_evidence, luck, promising or holds_up.  
      One of: `too_few`, `no_profit`, `no_evidence`, `luck`, `promising`, `holds_up` (open: new values may be added).
    - `passed` integer · required  
      Checks passed.
    - `applicable` integer · required  
      Checks that apply.
    - `checks` array of object · required  
      The checks, in a fixed order.
      - `key` string · required  
        The check; a teaser keeps v1's six (newest_30, seasons_won, price_worse among them).  
        One of: `enough_bets`, `not_luck`, `beats_base`, `half_point_worse`, `nearby_holds`, `not_concentrated`, `beats_close`, `still_working`, `since_saved`, `calibrated`, `newest_30`, `seasons_won`, `price_worse` (open: new values may be added).
      - `group` string  
        real (is it real?), pressure or still_working; not on a teaser's checks.  
        One of: `real`, `pressure`, `still_working` (open: new values may be added).
      - `label` string · required  
        The check, in words.
      - `status` string · required  
        pass, fail or na (it can't apply).  
        One of: `pass`, `fail`, `na` (open: new values may be added).
      - `zone` string  
        green, yellow (within one standard error of the threshold), red, or na.  
        One of: `green`, `yellow`, `red`, `na` (open: new values may be added).
      - `value` string · required  
        The figure behind it, in words.
      - `statistic` number | integer · nullable  
        The number the check compares.
      - `threshold` number | integer · nullable  
        What it is compared with.
      - `basis` string  
        seasons_won or newest_30 while the full check is still being built; points when Beats the close is judged on points beaten (audit F3).
  - `overall` object  
    Every graded bet.
    - `record` string  
      Wins-losses(-pushes).
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `bets` integer  
      Graded bets.
    - `decisions` integer  
      Wins plus losses.
    - `units` number · nullable  
      Units won or lost.
    - `roi` number · nullable  
      Units over units risked.
    - `roi_interval` array of number · nullable  
      ROI's 95% interval at 1 unit risked a bet.
    - `win_rate` number · nullable  
      Wins over decisions.
    - `break_even` number · nullable  
      The win rate that breaks even at these prices.
    - `significance` object · nullable  
      The record test (kmath.records.record_test) and verdict v2's statistics (kmath.significance): the p-value, adjusted for the rules tried, and the anytime-valid test.
      - `p_value` number · nullable  
        The larger of the exact and the clustered one-sided p against no skill at these prices (F12, F23).
      - `method` string · nullable  
        exact_binomial, exact_simulation, saddlepoint or z_score.
      - `z` number · nullable  
        The score z: units over the square root of Σ(d − 1).
      - `t_stat` number · nullable  
        The t statistic with the sample variance.
      - `p_value_exact` number · nullable  
        The exact (or z) tail alone.
      - `p_value_clustered` number · nullable  
        The tail with bets clustered by slate and team-season (F23).
      - `p_value_vs_vig` number · nullable  
        Against a random bet at the no-vig close (needs closes).
      - `p_adjusted` number · nullable  
        The p-value adjusted for the rules tried (Romano-Wolf on the ledger's rules, Bonferroni on the count otherwise; F14).
      - `adjust_method` string · nullable  
        romano_wolf, holm or none.
      - `tests` integer · nullable  
        Rules tried in this family, this one included.
      - `tests_effective` number · nullable  
        Effective tests (Li-Ji): near-duplicate rules count as fewer.
      - `reality_check_p` number · nullable  
        White's Reality Check p (when the ledger holds the rules' units).
      - `spa_p` number · nullable  
        Hansen's SPA p (when the ledger holds the rules' units).
      - `clears_t3` boolean · nullable  
        z at or above 3 (Harvey-Liu-Zhu's bar).
      - `haircut` number · nullable  
        Harvey-Liu haircut: the share of the ROI the rules tried take away.
      - `haircut_roi` number · nullable  
        ROI after the haircut, per decision.
      - `anytime_valid` object · nullable  
        The record as a bet against no skill (F17): e-value, anytime p, ROI range.
        - `e_value` number · nullable  
          The e-value now.
        - `p_value` number · nullable  
          1 over the largest e-value so far.
        - `max_e` number · nullable  
          The largest e-value along the path.
        - `roi_cs95` array of number · nullable  
          An ROI range valid at every bet.
    - `roi_ci95` array of number · nullable  
      ROI's 95% score interval, clustered (F13, F23).
    - `units_ci95` array of number · nullable  
      Units' 95% interval: decisions times the ROI interval.
    - `roi_ci` object · nullable  
      ROI intervals at ci_level: score (the one shown), BCa, block bootstrap over slates and anytime-valid (F13).
    - `deflated` object · nullable  
      Per-bet Sharpe, PSR and DSR at the effective tests, and the bets needed: deflated (sample_needed), single test and 80% power, each times the design effect (F15).
      - `sample_needed` integer · nullable  
        Decisions needed, deflated for the rules tried; null with no edge to prove.
      - `sample_needed_single` integer · nullable  
        Decisions needed for one rule tried.
      - `sample_needed_power80` integer · nullable  
        Decisions for 80% power at this ROI.
      - `sample_needed_plan` integer · nullable  
        Decisions for 80% power at plan_roi.
      - `dsr` number · nullable  
        Deflated Sharpe ratio.
      - `psr` number · nullable  
        Probabilistic Sharpe ratio.
    - `sample_needed` object · nullable  
      Bets needed to tell this win rate from break-even (one-sided, with 80% power, ...).
    - `small_sample` boolean  
      Under 30 decisions.
    - `few_decisions` boolean  
      Under 5 decisions.
  - `honest` object · nullable  
    The honest forward ROI (F22, the headline ROI): empirical Bayes toward a prior mean (the rule's own closing-line value when at least half its bets have a close, else the usual two-way margin), less the winner's curse for the rules tried and the out-of-sample decay.
    - `roi` number · nullable  
      Honest forward ROI.
    - `ci80` array of number · nullable  
      80% range.
    - `raw_roi` number · nullable  
      The past ROI per decision, beside it.
    - `prior_mean` number · nullable  
      The prior mean the ROI is shrunk toward (prior.source says which).
    - `prior_sd` number · nullable  
      The spread of true ROIs (0.02 until fitted on the ledger).
    - `shrink` number · nullable  
      Weight on the prior, se²/(se² + τ²).
    - `selection_adj` number · nullable  
      Winner's-curse correction for the rules tried.
    - `decay_factor` number · nullable  
      Out-of-sample decay on the excess (0.74).
    - `stabilizes_at_bets` integer · nullable  
      Decisions at which the record and the prior weigh the same.
    - `uses_clv` boolean  
      The prior mean is the rule's own closing-line value.
    - `prior_basis` string  
      fitted (prior_sd from the ledger's fit) or seed.
    - `prior` object  
      Where the prior mean comes from.
      - `source` string  
        clv (the rule's mean closing-line value), margin (the two-way margin, -4.55%) or fitted.
      - `mean` number · nullable  
        The prior mean used.
      - `closes` integer  
        Decided bets with a no-vig close.
      - `capped` boolean  
        A closing-line value above 0 was held at 0: under 50 bets have a close.
      - `words` string  
        The prior, said plainly.
  - `dependence` object · nullable  
    Bets clustered by slate (the date; the week in the NFL and college football) and team-season (F23).
    - `clusters` integer  
      Slates.
    - `design_effect` number  
      Clustered over iid variance.
    - `effective_bets` integer  
      Decisions over the design effect (at least 1).
    - `method` string  
      cr1_twoway, cr1_slate, cr1_larger_oneway, wild_bootstrap or wild_bootstrap_webb.
  - `base` object · nullable  
    The rule against the rest of its own base (F19): the who-or-when conditions alone, or base_formula.
    - `formula` string · nullable  
      The base, or null for the whole market.
    - `source` string  
      auto, user or market.  
      One of: `auto`, `user`, `market` (open: new values may be added).
    - `status` string  
      measured or na.  
      One of: `measured`, `na` (open: new values may be added).
    - `roi` number · nullable  
      The base's ROI per decision.
    - `lift` number · nullable  
      Rule ROI less base ROI.
    - `p_value_vs_base` number · nullable  
      Season-stratified permutation p of the rule within its base.
    - `units_from_base` number · nullable  
      Units the base alone would have made on the rule's stakes.
    - `units_from_filter` number · nullable  
      The rule's units less units_from_base.
  - `clv` object  
    Closing-line value as evidence (F21): each bet's no-vig CLV, q_close x price - 1, on bets Kelly holds a close for. Empty when betting at the close.
    - `bets_with_close` integer  
      Bets with a close.
    - `bets_without_close` integer  
      Bets without one.
    - `reference` string  
      The close used: consensus (the no-vig average across books).
    - `devig` string  
      How the vig was removed: multiplicative.
    - `lines_converted` integer  
      Bets whose close was carried from the closing line to the bet's line (NFL spreads and totals).
    - `coverage` number · nullable  
      Share of bets with a close probability (null with no bets).
    - `closes_stale` integer  
      Closes left out as older than 60 minutes at the start, or seen after it (audit F9): those bets keep their result but have no CLV.
    - `points_coverage` number · nullable  
      Share of bets with points beaten (spreads and totals).
    - `points_test` object · nullable  
      The clustered test on points beaten (audit F3).
      - `bets` integer  
        Bets with points beaten.
      - `mean` number · nullable  
        Mean points the bet's line beat the close by.
      - `std_error_clustered` number · nullable  
        Standard error clustered by slate and team-season.
      - `df_clustered` integer  
        Degrees of freedom: the fewer clusters less one.
      - `ci95_clustered` array of number · nullable  
        Clustered 95% interval.  
        min items 2 · max items 2
      - `p_value_clustered` number · nullable  
        One-sided p of mean points beaten > 0.
      - `cluster_method` string  
        How the standard error was clustered.
    - `basis` string  
      What Beats the close is judged on: probability, or points when under 80% of bets have a close probability and more have points beaten (audit F3).  
      One of: `probability`, `points` (open: new values may be added).
    - `mean` number · nullable  
      Mean CLV (fraction): the bets' expected ROI if the close is right.
    - `ci95` array of number · nullable  
      Clustered 95% interval on the mean.  
      min items 2 · max items 2
    - `p_value` number · nullable  
      One-sided clustered p of mean CLV > 0.
    - `beat_close_share` number · nullable  
      Share of bets with CLV above 0, ties counted.
    - `beat_rate` number · nullable  
      Share of bets that beat the close, ties left out.
    - `beat_rate_ci95` array of number · nullable  
      Wilson 95% interval on beat_rate.  
      min items 2 · max items 2
    - `sign_test_p` number · nullable  
      Exact one-sided sign test against half.
    - `mean_prob` number · nullable  
      Mean of the close's no-vig probability less the bet moment's.
    - `mean_points` number · nullable  
      Mean points the bet's line beat the closing line by (spreads and totals).
    - `points_bets` integer  
      Bets mean_points is over.
    - `profit_slope` number · nullable  
      Per-bet units regressed on CLV: near 1 when CLV turned into profit.
    - `profit_slope_se` number · nullable  
      Its slate-clustered standard error.
    - `sample_needed` integer · nullable  
      Bets CLV needs for a 95% interval to clear 0 at this mean and spread (null unless the mean is above 0).
    - `sample_needed_roi` integer · nullable  
      Bets profit would need at the same edge.
    - `significance` object · nullable  
      The CLV mean's tests (null under two bets).
      - `t` number · nullable  
        Mean over its iid standard error.
      - `ci95` array of number · nullable  
        Student 95% interval (iid).  
        min items 2 · max items 2
      - `std_error` number · nullable  
        iid standard error.
      - `bets_needed` number · nullable  
        Bets a t of 2 needs at this mean and spread.
      - `std_error_clustered` number · nullable  
        Standard error clustered by slate and team-season (F23).
      - `df_clustered` integer  
        Degrees of freedom: the fewer clusters less one.
      - `ci95_clustered` array of number · nullable  
        Clustered 95% interval.  
        min items 2 · max items 2
      - `p_value_clustered` number · nullable  
        One-sided p of mean CLV > 0 (wild cluster bootstrap under 42 slates, else Student t); beats_close reads it.
      - `cluster_method` string  
        How the standard error was clustered.
      - `design_effect` number · nullable  
        Clustered variance over iid variance.
    - `note` string  
      Why the block is empty, when it is.
  - `luck` object  
    The luck-adjusted result (F20): the units the market's fair probabilities expected the decided bets to make against what they made. Pushes count zero both ways.
    - `reading` string  
      luck (bets before the close: the gap is outcome noise) or versus_the_market (bets at the close: the gap is the rule's edge on the closing market).  
      One of: `luck`, `versus_the_market` (open: new values may be added).
    - `close_source` string  
      consensus.
    - `devig` string  
      multiplicative.
    - `bets` integer  
      Decided bets with a fair probability.
    - `bets_without_prob` integer  
      Decided bets without one.
    - `left_out` object  
      Bets left out.
      - `push` integer  
        Pushes.
      - `half` integer  
        Half results (quarter lines).
    - `lines_converted` integer  
      Bets whose close was carried to the bet's line.
    - `expected_units` number · nullable  
      Sum of stake x (q x (price - 1) - (1 - q)).
    - `actual_units` number · nullable  
      Units the bets made.
    - `luck_units` number · nullable  
      actual_units less expected_units.
    - `luck_se_units` number · nullable  
      luck's standard error given the probabilities.
    - `expected_wins` number · nullable  
      Sum of q.
    - `actual_wins` integer · nullable  
      Wins.
    - `luck_percentile` number · nullable  
      Where the wins sit among the market's (Poisson-binomial, mid-p): 0.95 is luckier than (95) of (100) identical paths.
    - `expected_roi` number · nullable  
      expected_units over units risked.
    - `actual_roi` number · nullable  
      actual_units over units risked.
    - `theta` number · nullable  
      Per-bet units regressed on expected units (30 bets or more): near 1 when the close is calibrated on these bets.
    - `by_season` array of object  
      Each season, in calendar order; luck_units add up to the total.
      - `season` string  
        Season.
      - `bets` integer  
        Decided bets with a probability.
      - `expected_units` number  
        Units the market expected.
      - `actual_units` number  
        Units made.
      - `luck_units` number  
        actual_units less expected_units.
  - `capacity` object · nullable  
    F8: the limits Kelly measured at the bet moment (ADR-K783); evidence beside the verdict, never in it. No book publishes its limits, so only measured ones are shown.
    - `available` boolean  
      Whether measured limits are shown for this market and moment.
    - `market` string · nullable  
      The market as line history names it (spreads, totals, h2h).
    - `before_start` string · nullable  
      The time before the start the bet moment falls in.  
      One of: `0_1h`, `1_12h`, `12_36h`, `36_72h`, `72h_plus` (open: new values may be added).
    - `books` array of object  
      Per book, highest median first.
      - `book` string · nullable  
        The book as the vendor names it.
      - `vendor` string · nullable  
        Who measured it.
      - `currency` string · nullable  
        The stake currency, null when the vendor doesn't say.
      - `median` number · nullable  
        The median limit.
      - `p25` number · nullable  
        Its 25th percentile.
      - `p75` number · nullable  
        Its 75th percentile.
      - `min` number · nullable  
        The smallest.
      - `max` number · nullable  
        The largest.
      - `snapshots` integer  
        Limit readings behind it.
      - `games` integer  
        Games behind it.
      - `first_seen` string · nullable  
        The first reading's date.
      - `last_seen` string · nullable  
        The last reading's date.
    - `max_stake_per_bet` object · nullable  
      The highest book median: the most one book typically took on one bet.
      - `book` string · nullable  
        The book.
      - `amount` number · nullable  
        The median limit.
      - `currency` string · nullable  
        Its currency.
    - `per_season_at_limit` number · nullable  
      max_stake_per_bet times the rule's bets a season.
    - `bets_per_season` number · nullable  
      The rule's bets a season.
    - `limits_held` integer  
      Limit readings Kelly holds for this market and moment.
    - `reason` string · nullable  
      Why none are shown, when available is false.
  - `stress` object  
    The same bets graded harder.
    - `half_point_worse` object · nullable  
      Every line half a point worse (none for moneylines).
      - `record` string  
        Wins-losses(-pushes).
      - `bets` integer  
        Bets graded or not.
      - `decisions` integer  
        Wins plus losses.
      - `wins` integer  
        Wins.
      - `losses` integer  
        Losses.
      - `pushes` integer  
        Pushes.
      - `units` number · nullable  
        Units won or lost at the staking asked for.
      - `roi` number · nullable  
        Units over units risked.
      - `p_value` number · nullable  
        The record's own p-value against no skill at its prices.
      - `p_adjusted` number · nullable  
        On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
      - `shown_rows` integer  
        On splits and condition-removed rows: the rows p_adjusted counts.
    - `flat_110` object · nullable  
      Every bet at -110 (none for moneylines).
      - `record` string  
        Wins-losses(-pushes).
      - `bets` integer  
        Bets graded or not.
      - `decisions` integer  
        Wins plus losses.
      - `wins` integer  
        Wins.
      - `losses` integer  
        Losses.
      - `pushes` integer  
        Pushes.
      - `units` number · nullable  
        Units won or lost at the staking asked for.
      - `roi` number · nullable  
        Units over units risked.
      - `p_value` number · nullable  
        The record's own p-value against no skill at its prices.
      - `p_adjusted` number · nullable  
        On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
      - `shown_rows` integer  
        On splits and condition-removed rows: the rows p_adjusted counts.
    - `other_side` object  
      The other side of every bet.
      - `record` string  
        Wins-losses(-pushes).
      - `bets` integer  
        Bets graded or not.
      - `decisions` integer  
        Wins plus losses.
      - `wins` integer  
        Wins.
      - `losses` integer  
        Losses.
      - `pushes` integer  
        Pushes.
      - `units` number · nullable  
        Units won or lost at the staking asked for.
      - `roi` number · nullable  
        Units over units risked.
      - `p_value` number · nullable  
        The record's own p-value against no skill at its prices.
      - `p_adjusted` number · nullable  
        On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
      - `shown_rows` integer  
        On splits and condition-removed rows: the rows p_adjusted counts.
    - `break_even` object · nullable  
      F7: how much worse the price or line can get before the profit is gone.
      - `price_multiplier` number · nullable  
        The share of each payout (d - 1) that breaks even (under 1: the room to spare).
      - `american_avg` number · nullable  
        The flat American price that breaks even.
      - `decimal_avg` number · nullable  
        The same, decimal.
      - `line_points` number · nullable  
        The most points worse (in halves, up to 3) the line could be with a profit left; 0 when none; null for moneylines.
    - `grid` array of object · nullable  
      F7: the bets at -105 to -120 with the line 0 to 1 point worse (moneylines: payouts cut 0-6%); left out at detail summary.
      - `vig` integer · nullable  
        Every bet at this American price.
      - `line_shift` number · nullable  
        Points the line moved (negative: worse).
      - `price_multiplier` number · nullable  
        Moneylines: the share of each payout kept.
      - `units` number · nullable  
        Units.
      - `roi` number · nullable  
        ROI.
    - `slippage_mc` object · nullable  
      F7: each bet's line worsened by a draw from the market's own Monday-to-close moves, 1,000 seeded runs; null without such moves.
      - `runs` integer  
        Runs.
      - `roi_p05` number · nullable  
        5th percentile ROI.
      - `roi_p50` number · nullable  
        Median ROI.
      - `profitable_share` number · nullable  
        Share of runs with a profit.
      - `moves_from` integer  
        Line moves the draws come from.
      - `move_median` number · nullable  
        Their median size, points.
    - `price_worse` object · nullable  
      Teasers: every ticket ten cents worse (price_american). Racing: every bet's winnings 5% smaller.
      - `record` string  
        Wins-losses(-pushes).
      - `bets` integer  
        Bets graded or not.
      - `decisions` integer  
        Wins plus losses.
      - `wins` integer  
        Wins.
      - `losses` integer  
        Losses.
      - `pushes` integer  
        Pushes.
      - `units` number · nullable  
        Units won or lost at the staking asked for.
      - `roi` number · nullable  
        Units over units risked.
      - `p_value` number · nullable  
        The record's own p-value against no skill at its prices.
      - `p_adjusted` number · nullable  
        On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
      - `shown_rows` integer  
        On splits and condition-removed rows: the rows p_adjusted counts.
  - `legs` object · nullable  
    Teasers: every teased leg, judged against the per-leg break-even (1/D)^(1/n).
    - `record` string  
      Legs won-lost(-pushed).
    - `decisions` integer  
      Legs won plus lost.
    - `cover_rate` number · nullable  
      Legs won over legs decided.
    - `break_even_per_leg` number  
      The cover rate a leg needs at the ticket's price.
    - `significance` object · nullable  
      The legs' record test against the per-leg break-even.
    - `sample_needed` object · nullable  
      Legs needed to tell this cover rate from the break-even.
  - `teaser` object · nullable  
    Teasers: the options tested. Prices are assumed: Kelly holds no historical teaser prices.
    - `points` number  
      Points each leg moved.
    - `legs` integer  
      Legs a ticket.
    - `price` object  
      The ticket's price (American and decimal).
    - `reduced_prices` object  
      Prices for tickets reduced by a pushed leg, by legs left (American).
    - `push` string  
      reduce, lose or ticket_push.  
      One of: `reduce`, `lose`, `ticket_push` (open: new values may be added).
    - `pairing` string  
      all_pairs or chronological.  
      One of: `all_pairs`, `chronological` (open: new values may be added).
    - `leg_market` string  
      spread, over or under.  
      One of: `spread`, `over`, `under` (open: new values may be added).
    - `break_even_per_leg` number  
      (1/D)^(1/n) at the ticket's price.
    - `price_assumed` boolean  
      Always true: the price is the person's or a common book table.
    - `tickets` integer  
      Tickets formed.
  - `random_baseline` object · nullable  
    F18: the rule against random bets of the same count on the same games, matched by season and price bucket.
    - `sims` integer  
      Random rules drawn.
    - `bets` integer  
      The rule's bets.
    - `pool` integer  
      Bets the market offered.
    - `percentile` number · nullable  
      Share of random rules with a lower ROI.
    - `beats_per_100` integer  
      Random rules out of 100 the rule beats.
    - `p_value` number · nullable  
      (1 + random rules at or above) / (sims + 1).
    - `analytic_p` number · nullable  
      The finite-population normal cross-check.
    - `random_roi_median` number · nullable  
      Median random ROI (about minus the vig).
    - `random_roi_p05` number · nullable  
      5th percentile random ROI.
    - `random_roi_p95` number · nullable  
      95th percentile.
    - `best_of_tests` object  
      Would the best of M random rules (M = rules tried) do this well?
      - `tests` integer  
        M.
      - `p_value` number · nullable  
        1 - F(ROI)^M.
    - `histogram` object · nullable  
      Random ROIs in 30 bins (edges, counts); full detail only.
  - `decay` object · nullable  
    F24: is the rule still making money? Rolling ROI and CLV, one unknown break (sup-F, block permutation p), a CUSUM alarm, a known-date test, the trend and the decay ratio.
    - `bets` integer  
      Graded bets.
    - `window` integer · nullable  
      Rolling window, bets.
    - `rolling` array of object · nullable  
      Up to 200 points; full detail only.
    - `break` object · nullable  
      The most likely date the edge changed.
      - `at` string  
        Date.
      - `bet_index` integer  
        Bets before it.
      - `sup_f` number · nullable  
        sup-F.
      - `p_value` number · nullable  
        Block permutation p-value.
      - `at_edge` boolean  
        Within the first or last 15%: not a confirmed break.
      - `roi_before` number · nullable  
        ROI before.
      - `roi_after` number · nullable  
        ROI after.
      - `bets_after` integer  
        Bets after.
    - `cusum` object · nullable  
      Page's lower CUSUM alarm.
    - `known_break` object · nullable  
      A Chow test at break_date.
    - `trend_per_100_bets` number · nullable  
      Profit per bet's change per 100 bets (1 unit risked).
    - `decay_ratio` number · nullable  
      ROI after the break (or the newest 30%) over ROI before.
    - `clv_break` object · nullable  
      The break test on CLV.
    - `roi_newest_30` number · nullable  
      ROI of the newest 30% of bets.
  - `ablation` object · nullable  
    F27: each top-level AND condition's Shapley share of the units beyond the base's ROI.
    - `base` object  
      Every game with a line: decisions and ROI.
    - `total` number · nullable  
      The rule's units beyond the base's ROI (the Shapley values add up to it).
    - `clauses` array of object  
      One a condition, in the order written.
      - `condition` string  
        The condition.
      - `shapley_units` number · nullable  
        Its share of the extra units.
      - `share` number · nullable  
        Of the total.
      - `label` string  
        dead, harmful, load_bearing or helps.  
        One of: `dead`, `harmful`, `load_bearing`, `helps` (open: new values may be added).
      - `fix` object · nullable  
        Remove it: the rule without it.
    - `pairs` array of object  
      Pairs (up to 6 conditions).
    - `method` string  
      exact or sampled.  
      One of: `exact`, `sampled` (open: new values may be added).
  - `nearby` object · nullable  
    F28: every number in the rule moved two steps each way (steps fixed by the field).
    - `numbers` array of object  
      The rule's numbers.
    - `variants` integer  
      Variants in the grid.
    - `distinct_bet_sets` integer  
      Variants with their own bets.
    - `roi_median` number · nullable  
      Median ROI of the variants.
    - `roi_p05` number · nullable  
      5th percentile.
    - `roi_p95` number · nullable  
      95th percentile.
    - `plateau_share` number · nullable  
      Share of one-step neighbours that made money.
    - `spike_ratio` number · nullable  
      (ROI - median) / IQR of the variants.
    - `reading` string · nullable  
      plateau, slope or spike.
    - `na` string · nullable  
      Why there are no numbers to move.
  - `monte_carlo` object · nullable  
    F31: drawdowns and losing runs the same bets give in other orders.
    - `sims` integer  
      Simulations.
    - `mode` string  
      block, iid or permutation.
    - `max_drawdown_units` object  
      Max drawdown, units.
      - `p05` number · nullable  
        5th percentile.
      - `p50` number · nullable  
        Median.
      - `p95` number · nullable  
        95th percentile.
      - `actual` number · nullable  
        The real order's figure.
    - `longest_losing_run` object  
      Longest losing run, bets.
      - `p05` number · nullable  
        5th percentile.
      - `p50` number · nullable  
        Median.
      - `p95` number · nullable  
        95th percentile.
      - `actual` number · nullable  
        The real order's figure.
    - `final_units` object  
      Final units.
      - `p05` number · nullable  
        5th percentile.
      - `p50` number · nullable  
        Median.
      - `p95` number · nullable  
        95th percentile.
      - `actual` number · nullable  
        The real order's figure.
    - `prob_below_zero` number · nullable  
      Share of runs finishing below zero.
    - `worst_100_bets_units_p05` number · nullable  
      5th percentile of the worst 100-bet stretch.
  - `noise` object · nullable  
    F32: jittered inputs, lines moved half a point either way, and an earlier bet moment.
    - `inputs` object · nullable  
      The rule's compared numbers jittered.
      - `runs` integer  
        Runs.
      - `profitable_runs` integer  
        Runs with a profit.
      - `profitable_share` number · nullable  
        Share.
      - `roi_median` number · nullable  
        Median ROI.
      - `roi_p05` number · nullable  
        5th percentile ROI.
      - `overlap_median` number · nullable  
        Median Jaccard overlap of the bets with the rule's.
    - `lines` object · nullable  
      Lines (moneylines: payouts) moved at random.
    - `delay` object · nullable  
      The rule bet at the earlier moment.
  - `concentration` object · nullable  
    F34: the profit without the best season, team, opponent, month and weekday.
    - `by` array of object  
      Groupings in a fixed order.
      - `group` string  
        season, team, opponent, month or weekday.
      - `best` object · nullable  
        The best group (3+ bets).
      - `without_best` object · nullable  
        The rule without it.
      - `effective_groups` number · nullable  
        1 / Herfindahl of the profitable groups' shares.
      - `p_more_concentrated` number · nullable  
        Permutation p-value (teams and opponents).
    - `trim_top_0_05` object · nullable  
      Without the top 5% of bets (moneylines) or bet-days.
  - `split_dimensions` array of object · nullable  
    F35: the rule by fixed dimensions with shrunk ROI and intervals.
    - `dimension` string  
      The dimension.
    - `heterogeneity_p` number · nullable  
      Chi-square p-value of win rates across its levels.
    - `heterogeneity_q` number · nullable  
      Benjamini-Hochberg q across the dimensions.
    - `real_difference` boolean  
      q < 0.10.
    - `where_profit` string · nullable  
      The level with the most shrunk extra units, when real.
    - `cells` array of object · nullable  
      Levels in a fixed order; full detail only.
  - `robustness` object  
    The suite's run: the verdict v2 checks it feeds and its seed.
    - `checks` array of object  
      half_point_worse, nearby_holds, not_concentrated and still_working.
      - `key` string · required  
        The check.  
        One of: `half_point_worse`, `nearby_holds`, `not_concentrated`, `still_working` (open: new values may be added).
      - `label` string · required  
        The check, in words.
      - `status` string · required  
        pass, fail or na.  
        One of: `pass`, `fail`, `na` (open: new values may be added).
      - `value` string · required  
        The figure behind it, in words.
      - `statistic` number · nullable  
        The figure the status compares.
      - `threshold` number · nullable  
        What it is compared with.
    - `fast_path` boolean  
      The rule's numbers were re-bet from its compiled columns.
    - `seed` integer  
      The seed (a hash of the rule and its options).
    - `evaluations` integer  
      Formula evaluations the suite ran.
    - `off` array of string  
      Blocks switched off.
  - `path` object  
    The units path in date order: drawdown and longest losing run; at detail full its series (F47).
    - `max_drawdown_units` number  
      The deepest fall from a peak, units.
    - `longest_losing_run` integer  
      Most losses in a row (pushes don't break it).
    - `series` object · nullable  
      Bet-indexed lines of the graded bets (detail full): `index` the bet numbers kept (past 600 bets thinned by LTTB, the deepest drawdown always kept), `dates`, `units`, `drawdown`, `base_units` (the market base's ROI at the same stakes, null unless measured), `band_p025` and `band_p975` (the no-skill range: 1,000 seeded runs of the same bets at their fair chances; null under 20 bets or for racing), `rolling_roi_100` with its no-skill range `rolling_p025` and `rolling_p975`, and `markers` (season starts, the holdout).
      - `x` string  
        Always bet_index.  
        One of: `bet_index` (open: new values may be added).
      - `index` array of integer  
        Bet numbers (1 is the first graded bet).
      - `dates` array of string  
        Each kept bet's date (YYYY-MM-DD, UTC).
      - `units` array of number  
        Units to date.
      - `drawdown` array of number  
        Units below the running peak (0 or below).
      - `base_units` array of number · nullable  
        The market base at the same stakes.
      - `band_p025` array of number · nullable  
        No-skill 2.5th percentile.
      - `band_p975` array of number · nullable  
        No-skill 97.5th percentile.
      - `rolling_roi_100` array of number  
        ROI over the last 100 bets (null before).
      - `rolling_p025` array of number  
        Its no-skill 2.5th percentile.
      - `rolling_p975` array of number  
        Its no-skill 97.5th percentile.
      - `markers` array of object  
        Where each season and the holdout start.
        - `type` string  
          season or holdout.  
          One of: `season`, `holdout` (open: new values may be added).
        - `at` integer  
          The bet number it starts at.
        - `label` string · nullable  
          The season, or newest 30%.
    - `downsampled` boolean  
      The series were thinned to 600 points.
    - `expected_max_drawdown_zero_edge` number · nullable  
      The median deepest drawdown of the no-skill runs, units.
  - `holdout` object · nullable  
    The latest 30% of bets against the earlier 70%.
  - `seasons` array of object  
    Seasons in calendar order.
  - `splits` array of object · nullable  
    Home, away, favorite, underdog and line bands, in a fixed order; null at detail summary.
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
  - `without` array of object · nullable  
    One row a top-level AND condition: the rule's record without it; null at detail summary.
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
    - `p_value_vs_rule` number · nullable  
      The rule against the bets the condition removes (F19).
    - `p_value_vs_rule_adjusted` number · nullable  
      p_value_vs_rule, Holm-adjusted over the conditions shown.
  - `bets` array of object  
    Every bet in date order (left out at detail summary).
    - `key` string  
      {game_id}:{team_id} (racing: {race_id}:{runner_id}).
    - `starts_at` string  
      Kickoff (RFC 3339).  
      format date-time
    - `season` string  
      The season.
    - `label` string  
      Date, team and opponent.
    - `price` object · nullable  
      The price at the bet moment, decimal.
    - `line` number · nullable  
      The bet's line as graded (the team's spread, the total).
    - `result` string · nullable  
      win, loss or push (soccer quarter lines: half_win or half_loss); null until played.
    - `close_prob` number · nullable  
      The fair closing probability of the same side, for CLV.
    - `units_to_date` number  
      Units after this bet, in date order.
    - `how_graded` string · nullable  
      How the bet was graded, in words.
    - `units` number · nullable  
      Units the bet won or lost at the run's staking (racing: its exact profit or loss with dead heats, each way, Rule 4 and commission); null until played.
    - `drawdown_to_date` number · nullable  
      Units to date less their running peak (0 or below); null until played.
    - `side` string · nullable  
      home or away (spread, moneyline), over, under or draw.
    - `market` string  
      The market graded (the other total when fading a total).
    - `bet_moment` string  
      When the bet was taken: edition, day_before or close.
    - `clv_prob` number · nullable  
      The fair closing chance less the fair chance at the bet moment, when Kelly holds both.
    - `sample` string · nullable  
      holdout for the latest 30% of graded bets by time, else in_sample; null with no holdout or until played.  
      One of: `in_sample`, `holdout` (open: new values may be added).
    - `why` array of object  
      Why it matched: up to six conditions (F46).
      - `clause` string  
        The condition as written.
      - `value` number | boolean | string · nullable  
        The compared expression's number for a comparison (rest_days - opponent.rest_days for rest_days - opponent.rest_days >= 3), else true or false.
    - `settlement` array of string  
      The settlement rules that decided the bet (IDs in settlement.rules).
  - `leak_test` object  
    The leak test (F3): the rule and each part of it evaluated again on a sample of rows with the data cut at the bet moment. A leak refuses the test (422 rule_not_testable, problem leak_found), so a report always says clean or not_run.
    - `status` string · required  
      clean, leak_found or not_run.  
      One of: `clean`, `leak_found`, `not_run` (open: new values may be added).
    - `rows_checked` integer · required  
      Rows rebuilt at the bet moment.
    - `matched_checked` integer  
      Of them, rows the rule matched.
    - `matches_flipped` integer  
      Rows whose match changed with the data cut.
    - `parts` array of object · required  
      Parts that changed, in the formula's order (empty when clean).
      - `name` string  
        The part, as written (rule is the whole rule).
      - `rows_changed` integer  
        Rows where it changed.
      - `max_change` number · nullable  
        The largest change in a number.
      - `example` string  
        One changed row, {game_id}:{team_id}.
  - `warm_up` object  
    The warm-up check (F4): bets taken before the rule's windows had the earlier games they read (one season at a time; windows never reach into last season).
    - `policy` string  
      The policy graded in the report.  
      One of: `as_written`, `require_full` (open: new values may be added).
    - `games_needed` integer  
      Earlier games every window needs (0: the rule has no window).
    - `windows` array of object  
      Each window in the formula's order.
      - `expr` string  
        The window, as written.
      - `games_needed` integer · nullable  
        Earlier games it reads (null: season to date).
      - `short_rows` integer  
        Rows in scope with fewer earlier games this season.
      - `short_bets` integer  
        Bets the rule took with fewer.
    - `short_bets` integer  
      Bets taken with a window short.
    - `by_policy` array of object · nullable  
      as_written, then require_full; null when the rule has no window.
      - `record` string  
        Wins-losses(-pushes).
      - `bets` integer  
        Bets graded or not.
      - `decisions` integer  
        Wins plus losses.
      - `wins` integer  
        Wins.
      - `losses` integer  
        Losses.
      - `pushes` integer  
        Pushes.
      - `units` number · nullable  
        Units won or lost at the staking asked for.
      - `roi` number · nullable  
        Units over units risked.
      - `p_value` number · nullable  
        The record's own p-value against no skill at its prices.
      - `p_adjusted` number · nullable  
        On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
      - `shown_rows` integer  
        On splits and condition-removed rows: the rows p_adjusted counts.
    - `warning` boolean  
      Short bets are over 10% of the bets, or leaving them out moves ROI by more than half its 95% interval's half-width.
  - `settlement` object  
    How bets were settled (F9): Kelly's own grading rules as data, and each rule's bets.
    - `profile` string  
      The rules profile (kelly_standard).
    - `rules_version` string  
      The rules table's date.
    - `applied` array of object  
      Rules that decided at least one bet, in table order.
      - `rule` string  
        Rule ID.
      - `bets` integer  
        Bets.
    - `rules` array of object  
      The rules for this league and market.
      - `id` string  
        Rule ID.
      - `text` string  
        The rule in words.
      - `effective_from` string  
        The date Kelly's grader took it up.
  - `coverage` object  
    Coverage (F10): from every game in scope to the bets graded, each season's priced share, blank inputs and whether the rows left out for no line differ from the bets kept.
    - `flow` array of object  
      The steps in order; rule_true rows = decisions + every row out after it.
      - `step` string  
        in_scope, rule_true, one_bet_a_game, full_windows, priced, graded or decisions.
      - `games` integer  
        Games (in_scope only).
      - `rows` integer  
        Rows.
      - `out` object  
        Rows that left at this step, by reason.
    - `by_season` array of object  
      Every season asked for, in order.
      - `season` string  
        Season.
      - `games` integer  
        Games in scope.
      - `rows` integer  
        Rows.
      - `rule_true` integer  
        Rows the rule matched.
      - `bets` integer  
        Bets graded.
      - `priced_share` number · nullable  
        Share of rows with a price at the bet moment.
    - `inputs_missing` array of object  
      Inputs read bare on the row, with blanks.
      - `attribute` string  
        The input.
      - `rows_blank` integer  
        Rows with no value.
      - `share` number · nullable  
        Share of rows in scope.
    - `left_out_differs` object  
      Rows left out for no line against the bets kept: standardized mean difference over home, neutral site and rest days; flagged over 0.1 with 10 or more left out.
      - `flag` boolean  
        They differ.
      - `max_smd` number · nullable  
        The largest difference.
      - `covariate` string · nullable  
        Where it is.
      - `left_out` integer  
        Rows.
      - `kept` integer  
        Rows.
      - `by_covariate` array of object  
        Each covariate's difference.
  - `moment` object  
    The bet moment's clock (F5): its target time, the prices' snapshot age at it and where the lines came from.
    - `bet_moment` string  
      edition, day_before or close.
    - `target` string · nullable  
      The moment's time for a game, in words.
    - `max_stale_minutes` integer  
      Oldest price kept, in minutes before the target.
    - `floor_minutes_before_oct_2022` integer  
      The limit's floor for games before October 2022 (the Odds API's 10-minute snapshots).
    - `rows_priced` integer  
      Rows the rule took that had a price.
    - `rows_aged` integer  
      Rows whose price carries its snapshot time and was kept.
    - `median_snapshot_age_minutes` number · nullable  
      Median minutes from snapshot to target, kept rows.
    - `max_snapshot_age_minutes` number · nullable  
      Oldest kept snapshot, in minutes before the target.
    - `stale_price` integer  
      Rows left out: price older than max_stale_minutes.
    - `after_moment` integer  
      Rows left out: price seen after the target.
    - `age_unknown` integer  
      Rows kept whose price has no snapshot time (Kelly's own frozen lines).
    - `line_sources` object  
      Kept rows by line source (sheet_line, odds_api_early, odds_api_close).
  - `left_out` object  
    Games the rule matched but didn't bet.
    - `no_line` integer  
      No Kelly line at the bet moment.
    - `both_sides` integer  
      The rule matched both teams.
    - `stale_price` integer  
      The price was older than max_stale_minutes at the bet moment, or seen after it (F5).
    - `unpaired` integer  
      Teasers: legs left off a ticket (a week with too few, or the leftover in chronological pairing).
    - `no_price` integer  
      Racing: runners with no price to settle at.
    - `non_runners` integer  
      Racing: non-runners (void).
    - `void_races` integer  
      Racing: abandoned or void races.
  - `risk` object  
    Risk of ruin (F36, kmath.backtest.rule_ruin): the chance of losing ruin_share of the bankroll within horizon_bets bets betting like the record, with its win rate taken as exact and allowing for its sample (a Beta posterior draw a path); the Lundberg bound; the bankroll curve.
    - `bankroll_units` number  
      Bankroll in units.
    - `ruin_share` number  
      Share of the bankroll whose loss counts as ruin.
    - `horizon_bets` integer  
      Bets ahead.
    - `ruin_if_rate_exact` number · nullable  
      Ruin chance if the record's win rate were exact.
    - `ruin_allowing_error` number · nullable  
      Ruin chance allowing for how little the record's sample tells.
    - `estimation_premium` number · nullable  
      The second less the first.
    - `lose_all_ever` number · nullable  
      Lundberg bound on ever losing the whole bankroll at the exact rate.
    - `lose_all_ever_allowing_error` number · nullable  
      The same, averaged over the win rate's posterior.
    - `drawdown_p95_units` number · nullable  
      95th percentile of the worst drop over the horizon, units.
    - `down_after_horizon` number · nullable  
      Chance of being down after the horizon.
    - `bankroll_for_ruin_005_units` number · nullable  
      Smallest bankroll whose ruin chance is at most 0.05.
    - `curve` array of object · nullable  
      Ruin chance by bankroll size; null at detail summary.
    - `status` string  
      ok, or too_few (under 30 decisions: closed form only).  
      One of: `ok`, `too_few` (open: new values may be added).
  - `staking_plans` object  
    Staking plans replayed over the real bet order (F37, kmath.backtest.staking_replay). The Kelly criterion's fractions and the kelly plan are stake mode: on askkelly.ai only, for a signed-in, attested person; elsewhere null with withheld (D34).
    - `kelly` object  
      The Kelly criterion at the record's win rate and mean price, the Baker-McHale multiple for its sample size and the fraction bet.
      - `full_fraction` number · nullable  
        Full Kelly criterion (stake mode; null off askkelly.ai).
      - `shrink` number · nullable  
        The shrink for the sample size.
      - `honest_fraction` number · nullable  
        The fraction bet: shrink × full, capped; 0 unless the verdict is promising or holds up (stake mode; null off askkelly.ai).
      - `withheld` string  
        Why the stake-mode figures are null.  
        One of: `stake_first_party_only` (open: new values may be added).
    - `plans` array of object  
      Each plan asked for, in the order asked.
      - `plan` string  
        flat, to_win, percent or kelly.  
        One of: `flat`, `to_win`, `percent`, `kelly` (open: new values may be added).
  - `risk_adjusted` object  
    Risk-adjusted stats per unit risked (F40, kmath.backtest.risk_adjusted), with 95% intervals from a day-block bootstrap; at detail summary only sharpe_per_bet and profit_factor.
    - `sharpe_per_bet` number · nullable  
      Mean return over its standard deviation, a bet.
    - `profit_factor` number · nullable  
      Units won over units lost (null with no losing bet).
  - `caps` object · nullable  
    Exposure caps applied in time order (F39); the record and checks are on the capped ledger.
    - `skipped` integer  
      Bets the caps skipped.
    - `by_reason` object  
      Skipped bets by cap.
    - `uncapped` object  
      The record without the caps.
    - `random_priority_mean_roi` number · nullable  
      Mean ROI over random tie-breaks.
  - `rule` object  
    The rule and the options it was tested with.
    - `rule_hash` string  
      The rule's identity: SHA-256 of its canonical formula (spacing, case and the order of AND and OR conditions don't change it) with the competition, market, side, bet moment, seasons, season type, stake and price. Detail and tests are not part of it.  
      pattern ^sha256:[0-9a-f]{64}$
    - `translation_id` string  
      The rules:translate result this formula came from (F43), when the request named one.  
      pattern ^tx_[0-9a-hjkmnp-tv-z]{20}$
    - `reads` array of object  
      Every name the rule reads, once.
      - `name` string  
        The attribute, with its relation (opponent.rest_days).
      - `known` string  
        Its moment: static, pregame, edition, close or final (a window's input is read before the game).
      - `windowed` boolean  
        A backward window reads it (earlier games only).
    - `formula_version` string  
      The formula language version the rule was read with (F45).
    - `catalogue_version` string · nullable  
      The stat catalogue version its names were bound against.
  - `report` object  
    A shared report's own facts (get_rule_report only, F54).
    - `report_id` string  
      The report.
    - `report_url` string  
      Its page.  
      format uri
    - `visibility` string  
      unlisted or public.  
      One of: `unlisted`, `public` (open: new values may be added).
    - `author_rules_tried` integer  
      The author's rules tried on this market when shared.
    - `shared_at` string  
      When it was shared.  
      format date-time
    - `frozen` boolean  
      Always true.
    - `rerun` object  
      The run's request, to test it again on today's data.
  - `report_url` string · nullable  
    A frozen report of this run anyone with the link can open (F54): only when the request asked (share) and the call has an account; else null. share_rule_run makes or changes one later.  
    format uri
  - `charts` array of object  
    Only when the request asked (charts) at detail full: equity against the no-skill band, the drawdown and the rolling ROI as Kelly Chart Specs (F47).
  - `transfer` object · nullable  
    Other markets and sports (F33): the same rule on its other market and on other leagues, numbers mapped to the same meaning, pooled with DerSimonian-Laird random effects. Evidence beside the verdict, never part of it; these runs don't count toward rules tried. Present only when the request asks for transfer.
    - `status` string  
      measured or na.  
      One of: `measured`, `na` (open: new values may be added).
    - `why` string · nullable  
      Why nothing ran, when nothing did.
    - `options` object  
      The leagues, markets and thresholds asked for.
    - `cells` array of object  
      Each market and league in a fixed order (the other market first, then sibling leagues), never sorted by a result; up to 12.
      - `competition` string  
        The league.
      - `market` string  
        The market.
      - `thresholds` string  
        literal (the rule's own numbers) or quantile (each number moved to the same percentile of its field in this league).  
        One of: `literal`, `quantile` (open: new values may be added).
      - `formula` string  
        The formula this cell ran (quantile cells carry the moved numbers).
      - `seasons` array of string  
        Seasons read, as this league labels them.
      - `mapped` array of object · nullable  
        Quantile cells only.
        - `number` string  
          The number as written.
        - `field` string  
          What it is compared with.
        - `percentile` number · nullable  
          Its percentile in the rule's own league (a fraction).
        - `value` number · nullable  
          The number at the same percentile here.
      - `decisions` integer  
        Wins plus losses.
      - `bets` integer  
        Graded bets.
      - `record` string  
        Wins-losses(-pushes).
      - `units` number · nullable  
        Units won or lost.
      - `roi` number · nullable  
        Units over units risked.
      - `roi_ci95` array of number · nullable  
        ROI's 95% score interval.
      - `se` number · nullable  
        ROI's standard error at 1 unit risked a bet.
      - `p_value` number · nullable  
        The cell's own one-sided p against no skill at its prices.
      - `p_holm` number · nullable  
        Holm's adjusted p across the cells.
      - `pooled` boolean  
        The cell is in the pool (another league, one a league, 10+ decisions).
    - `pooled` object · nullable  
      The pool of the other leagues' cells.
      - `roi` number · nullable  
        Random-effects ROI.
      - `roi_ci95` array of number · nullable  
        Its 95% interval.
      - `se` number · nullable  
        Its standard error.
      - `p_value` number · nullable  
        Two-sided p of the pooled ROI.
      - `i2` number · nullable  
        I²: the share of the spread across leagues beyond chance (a fraction).
      - `tau2` number · nullable  
        τ²: the between-league variance of true ROI.
      - `q` number · nullable  
        Cochran's Q.
      - `cells` integer  
        Cells pooled.
    - `same_direction` object · nullable  
      Pooled cells whose ROI has the rule's own sign.
      - `agree` integer  
        Cells the same way.
      - `cells` integer  
        Cells.
      - `p_value` number · nullable  
        Two-sided sign-test p.
      - `text` string  
        "4 of 5".
    - `not_testable` array of object  
      Leagues and markets left out, with why.
      - `competition` string  
        The league.
      - `market` string · nullable  
        The market.
      - `missing` array of string  
        Fields that league lacks.
      - `why` string  
        Why.
    - `note` string  
      What the panel is and isn't.
  - `run_id` string · nullable  
    This run, kept on the account (`run_…`): the same request on the same data is the same run. GET /v1/rules/runs/{run_id} reads it back. Null without an account.  
    pattern ^run_[0-9a-hjkmnp-tv-z]{20}$
  - `data_version` string  
    The data the run read: Kelly's lake snapshot (or the data's as-of time). A new snapshot is a new run of the same rule.
  - `manifest` object · nullable  
    What this run read and ran, so the same request can be run again and checked against it (ADR-K885). No prices, lines or rows of source data.
    - `version` integer  
      The manifest's own layout version.
    - `code` object  
      The code that graded the run.
      - `engine` integer  
        The tester's revision; it rises with any fix that can move a result on the same data.
      - `release` string · nullable  
        The deployed commit.
      - `formula_version` string · nullable  
        The formula language's version.
      - `catalogue_version` string · nullable  
        The stat catalogue's version.
      - `attributes_sha256` string · nullable  
        A hash of the attribute registry: what each input means and when it is known.
      - `settlement_rules` string · nullable  
        The settlement rules' version.
    - `data` object  
      The data the run read.
      - `version` string  
        The same value as data_version.
      - `snapshots` array of string  
        The lake snapshots read, in order.
      - `one_snapshot` boolean  
        Whether every season was read on one snapshot.
      - `as_of` string · nullable  
        When the read was made (RFC 3339).  
        format date-time
      - `data_through` object  
        How far Kelly's history went, by league.
      - `latest_result` string · nullable  
        The newest game read that had a result.
      - `rows_built_at` string · nullable  
        When the prepared rows were built, where the run read them.  
        format date-time
      - `queries` object  
        Each reviewed lake query the tester reads, with a hash of its text.
    - `request` object  
      The request.
      - `request_hash` string  
        The request's hash.
      - `rule_hash` string  
        The rule's hash.
      - `seed` integer  
        The seed every simulation in the run used.
    - `sources` object  
      Where the run's inputs came from.
      - `prices` object  
        Bets priced, by the source of the line.
      - `inputs` array of object  
        Each input the rule read, with the moment it is known.
        - `name` string  
          The input.
        - `known` string · nullable  
          The moment it is known.
    - `seasons` array of object  
      Each season read.
      - `season` string  
        The season.
      - `rows` integer  
        Team-games in scope.
      - `priced_share` number · nullable  
        The share Kelly holds a price for at the bet moment.
    - `left_out` object  
      Matched games that were not bet, by reason.
    - `sha256` string  
      The hash of this block. Two runs with the same hash read the same data with the same code.
  - `since_run` object · nullable  
    Only on a run read back: what has changed in Kelly's tester since the run was kept.
    - `status` string  
      current: nothing that can move its numbers changed. superseded: something did. no_manifest: the run was kept before manifests.  
      One of: `current`, `superseded`, `no_manifest` (open: new values may be added).
    - `engine_changed` boolean · nullable  
      Whether the tester's revision has risen since.
    - `changed` array of object  
      The parts that differ, each with its value then (from) and now (to).
      - `part` string  
        engine, release, formula_language, catalogue, attributes, settlement_rules or queries.
  - `tested_at` string  
    When the run was kept (RFC 3339); only on a run read back.  
    format date-time
  - `rule_version` object · nullable  
    The saved rule this test was kept under (save, or rule_id): its rule_id, name, version and versions_tried. Null when the test wasn't saved.
    - `rule_id` string · required  
      The saved rule (rl_…).  
      pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$
    - `name` string  
      Its name.
    - `version` integer · required  
      This rule's version under it: the same rule again keeps its version.  
      min 1
    - `new_version` boolean  
      This test made a new version.
    - `versions_tried` integer · required  
      Versions saved under it, this one included.  
      min 1
  - `since_saved` object · nullable  
    The saved version's record since it was saved (backtester T6, F50), when the test names its rule_id and repeats that version: verdict v2's since_saved check reads it. Null for a new version (its clock starts now) or an unsaved test.
    - `saved_at` string · nullable  
      When the clock started: the version's save, or the registration (RFC 3339).  
      format date-time
    - `record` string · required  
      Wins-losses(-pushes) since then.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `decisions` integer · required  
      Wins plus losses.
    - `bets` integer  
      Graded bets.
    - `units` number · required  
      Units won or lost.
    - `roi` number · nullable  
      Units over units risked, a fraction.
    - `clv_mean` number · nullable  
      Mean closing-line value of the bets (null at the close: none by definition).
    - `clv_bets` integer  
      Bets with a closing-line value.
    - `e_value` number · nullable  
      Anytime-valid e-value of the forward bets against no edge at the prices taken (safe to read every day).
    - `max_e_value` number · nullable  
      Its running maximum.
    - `e_threshold` number  
      The e-value that counts as evidence at alpha 0.05 (20).
    - `vs_backtest` object · nullable  
      Is live consistent with the backtest?
      - `win_rate_backtest` number  
        The backtest's win rate.
      - `win_rate_forward` number · nullable  
        The win rate since the save.
      - `p_value_difference` number · nullable  
        Two-sided p-value that the two win rates differ.
      - `method` string · nullable  
        fisher_exact (under 30 forward decisions) or two_proportion_z.
      - `e_value_worse` number  
        E-value that live wins less often than the backtest; 20 or more fails the check.
    - `pending` integer  
      Bets recorded at their bet moment, not yet final.
    - `no_line` integer  
      Matches Kelly held no line for at the bet moment (kept, never skipped).
    - `void` integer  
      Postponed games past the window.
    - `status` string · required  
      The since_saved check: na until min_decisions, then pass or fail.  
      One of: `na`, `pass`, `fail` (open: new values may be added).
    - `min_decisions` integer  
      Forward decisions before the check is judged (30).
    - `last_bet_at` string · nullable  
      The latest bet moment recorded.  
      format date-time
  - `tests_on_account` object · nullable  
    Rules this account has tried on this competition and market, this one included (the rules-tried ledger: every distinct rule tested on the site, the API or Kelly MCP, kept for good). The not-luck check adjusts for the larger of this count and the request's own tests. Null when the call has no account.
    - `competition` string · required  
      The competition.
    - `market` string · required  
      The market.
    - `count` integer · required  
      Distinct rules tried.  
      min 1
    - `shown_counted` integer  
      Variants an earlier report showed (its condition-removed forms, nearby numbers and home or away splits) that joined the count because this rule is one of them (audit F6).
  - `staking` string  
    How each bet was staked.
  - `matched` integer  
    Bets taken.
  - `ungraded` integer  
    Bets not yet played.
  - `notice` string  
    This tests a rule on past games; it isn't a pick.
  - `calibration` object · nullable  
    output: probability only. The formula's chances against the market's no-vig close of the same side (moneyline: the team wins; spread: it covers the bet's line), on the newest 30% of the scored team-games (whole days), and the bets it makes at the edge threshold.
    - `formula` string  
      The probability formula as sent.
    - `bet_formula` string  
      The rule it bets: the chance at the bet's own price worth more than the edge threshold (the rule tested, counted and kept).
    - `edge_threshold` number  
      Expected return a bet needs, p × decimal price − 1 (0.02 by default).
    - `basis` string  
      newest_30: scored on the holdout only.  
      One of: `newest_30` (open: new values may be added).
    - `games` integer  
      Games scored.
    - `rows` integer  
      Team-games scored (both teams of a game).
    - `in_sample_rows` integer  
      Team-games before the holdout, not scored.
    - `holdout_from` string · nullable  
      The holdout's first day.
    - `left_out` object  
      Team-games not scored.
      - `pushes` integer  
        Pushes and half results.
      - `outside_0_1` integer  
        Values below 0 or above 1.
      - `no_value` integer  
        Rows the formula gave no number for.
    - `clipped` integer  
      Values of 0 or 1 clipped to 1e-6 from the edge.
    - `brier` number · nullable  
      Brier score of the formula.
    - `brier_market` number · nullable  
      Brier score of the close.
    - `brier_skill` number · nullable  
      1 − formula / close (above 0: the formula scores better).
    - `log_loss` number · nullable  
      Log loss of the formula.
    - `log_loss_market` number · nullable  
      Log loss of the close.
    - `log_loss_skill` number · nullable  
      1 − formula / close.
    - `dm_p_value` number · nullable  
      Diebold–Mariano p on the per-game log-loss difference (two-sided).
    - `dm_statistic` number · nullable  
      The HLN-corrected statistic (positive: the formula's loss is higher).
    - `mcb` number · nullable  
      CORP miscalibration (Brier).
    - `dsc` number · nullable  
      CORP discrimination.
    - `unc` number · nullable  
      Uncertainty; brier = mcb − dsc + unc.
    - `mcb_p_value` number · nullable  
      The MCB test: the chance a calibrated formula looks this miscalibrated (999 resamples).
    - `reliability` array of object · nullable  
      The CORP reliability curve at up to 20 forecast values.
      - `p` number · nullable  
        The formula's probability.
      - `observed` number · nullable  
        How often it happened (PAV fit).
      - `lo` number · nullable  
        90% consistency band, low.
      - `hi` number · nullable  
        90% consistency band, high.
    - `ece` number · nullable  
      Expected calibration error over ten equal-width bins (bin-dependent; for familiarity).
    - `distinct_forecasts` integer  
      Distinct values the formula gave.
    - `slope` number · nullable  
      Calibration slope b in y ~ a + b·logit p (1 is ideal; under 1 overconfident).
    - `slope_se` number · nullable  
      Its game-clustered standard error.
    - `intercept` number · nullable  
      Calibration intercept a (0 is ideal).
    - `encompassing` object · nullable  
      y ~ a + b_q·logit q + b_p·logit p, game-clustered: does the formula know something the close doesn't?
      - `b_model` number · nullable  
        b_p.
      - `b_market` number · nullable  
        b_q.
      - `se_model` number · nullable  
        b_p's standard error.
      - `p_value` number · nullable  
        Two-sided p of b_p.
    - `edge_bins` array of object · nullable  
      Realized results against the formula's edge.
      - `edge` number · nullable  
        Mean of p − q in the bin.
      - `realized_minus_market` number · nullable  
        Mean of y − q in the bin.
      - `rows` integer  
        Team-games in the bin.
    - `status` string  
      The calibrated check: pass, fail or na (under 200 games, or one value).  
      One of: `pass`, `fail`, `na` (open: new values may be added).
    - `value` string  
      The check's line.
    - `statistic` number · nullable  
      The encompassing p.
    - `threshold` number · nullable  
      0.05.
- `tests` integer · required  
  Rules tried behind the picked setting's adjusted p (every setting included).
- `tests_on_account` object · nullable  
  The account's rules tried on this league and market.
  - `competition` string  
    League.
  - `market` string  
    Market.
  - `count` integer  
    Rules tried, every setting of this sweep included.
- `data_version` string · nullable  
  The lake snapshot the picked setting's test read.
- `run_id` string · nullable  
  The picked setting's kept run (get_rule_run), with an account.
- `notice` string  
  What this is and isn't.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`rule_not_testable`](/problems/rule_not_testable) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout)

### Example
```http
POST https://api.askkelly.ai/v1/rules:sweep
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "formula": "=home",
  "competition": "nba",
  "seasons": [
    "2025-26"
  ]
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/rule_not_testable",
  "title": "Rule can't be tested",
  "status": 422,
  "code": "rule_not_testable",
  "detail": "The formula has no slot to sweep.",
  "param": "formula",
  "doc_url": "https://docs.askkelly.ai/problems/rule_not_testable",
  "request_id": "req_c691351597e5cf2c7f567da2",
  "retryable": false,
  "display_message": "That rule can't be tested on past games as written.",
  "problems": [
    {
      "code": "no_sweep",
      "path": null,
      "message": "The formula has no slot to sweep.",
      "fixes": [
        "Put a range where a number goes, e.g. rest_days >= {1..6}."
      ]
    }
  ]
}
```

```http
POST https://api.askkelly.ai/v1/rules:sweep
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "formula": "=AND(home, spread_close <= {-6..6 step 3})",
  "competition": "nba",
  "seasons": [
    "2025-26"
  ]
}
```

```json
{
  "object": "rule_sweep",
  "rule": {
    "formula": "=AND(home, spread_close <= {-6..6 step 3})",
    "competition": "nba",
    "market": "spread",
    "side": "rule",
    "bet_moment": "close",
    "seasons": [
      "2025-26"
    ],
    "season_type": "regular",
    "stake": "risk",
    "price": "consensus"
  },
  "headline_roi": 0.9099999999999999,
  "sweep": {
    "slots": [
      {
        "name": "a",
        "written": "{-6..6 step 3}",
        "values": [
          -6,
          -3,
          0,
          3,
          6
        ]
      }
    ],
    "variants": 5,
    "grid": [
      {
        "setting": {
          "a": -6
        },
        "formula": "=AND(home, spread_close <= -6)",
        "decisions": 0,
        "record": "0-0",
        "units": 0,
        "roi": null,
        "p_value": null
      },
      {
        "setting": {
          "a": -3
        },
        "formula": "=AND(home, spread_close <= -3)",
        "decisions": 1,
        "record": "1-0",
        "units": 0.9099999999999999,
        "roi": 0.9099999999999999,
        "p_value": 0.17005720935900537
      },
      {
        "setting": {
          "a": 0
        },
        "formula": "=AND(home, spread_close <= 0)",
        "decisions": 1,
        "record": "1-0",
        "units": 0.9099999999999999,
        "roi": 0.9099999999999999,
        "p_value": 0.17005720935900537
      },
      {
        "setting": {
          "a": 3
        },
        "formula": "=AND(home, spread_close <= 3)",
        "decisions": 1,
        "record": "1-0",
        "units": 0.9099999999999999,
        "roi": 0.9099999999999999,
        "p_value": 0.17005720935900537
      },
      {
        "setting": {
          "a": 6
        },
        "formula": "=AND(home, spread_close <= 6)",
        "decisions": 1,
        "record": "1-0",
        "units": 0.9099999999999999,
        "roi": 0.9099999999999999,
        "p_value": 0.17005720935900537
      }
    ],
    "spp_median_roi": 0.9099999999999999,
    "roi_p05": 0.9099999999999999,
    "roi_p95": 0.9099999999999999,
    "share_profitable": 1,
    "pick_rule": "plateau",
    "min_decisions_to_pick": 30,
    "fast_path": true,
    "best": null,
    "picked": null,
    "pbo": null,
    "blocks": null,
    "splits": null,
    "degradation_slope": null,
    "prob_oos_loss": null,
    "logit_median": null,
    "spa_p_value": null,
    "reality_check_p": null,
    "p_adjusted_picked": null,
    "k_effective": null,
    "deflated_roi": null,
    "expected_max_roi": null,
    "selection": {
      "from": "2025-10-21",
      "to": "2025-10-21",
      "bets": 1
    },
    "forward": null,
    "na": "no setting has (30) decisions before the sealed window",
    "tests_added": 5
  },
  "walk_forward": null,
  "cross_validation": null,
  "picked_test": null,
  "tests_on_account": {
    "competition": "nba",
    "market": "spread",
    "count": 10
  },
  "tests": 10,
  "data_version": null,
  "run_id": null,
  "as_of": "2026-10-04T17:30:00Z",
  "assumptions": [
    "Every setting is bet at the same prices on the same games; the newest 30% of the bets (by day) are sealed and shown once, for the picked setting only.",
    "The headline is the median ROI across all (5) settings; settings with under (30) decisions before the sealed window count but can't be picked.",
    "Every setting counts as a rule tried (5); a setting tried before isn't counted again.",
    "Walk-forward and cross-validation choose the setting again inside each training window, on every season.",
    "Settings are graded as written (warm-up and exposure caps apply to the picked setting's full test)."
  ],
  "notice": "This tests settings of your rule on past games. It isn't a pick and doesn't rank selections; the headline is the typical setting's result, not the best one's.",
  "summary": "(5) settings against the spread, 2025-26: no setting has (30) decisions before the sealed window; the typical setting made +91.0% ROI.",
  "has_more": false,
  "next_cursor": null,
  "source": "kelly",
  "attribution": null,
  "request_id": "req_0a9085dd03633c71481499f8",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`GET /v1/rules/runs/{run_id}/export`

## Export a rule test's bets
public, no key needed · 0 credits, not charged during the beta · MCP tool `export_rule_run` · status live

One of your kept rule tests' bets as CSV or JSON Lines text: the game, side, start, season, result, units and units to date. Lines and prices are never in a file (the data licences). The same run gives the same bytes.

### Parameters
- `run_id` string · path · required  
  The run_id a test_rule result gave (run_…).  
  pattern ^run_[0-9a-hjkmnp-tv-z]{20}$

- `format` string · query  
  csv (default) or jsonl.  
  One of: `csv`, `jsonl` (open: new values may be added).

### Response
`200` The rule export facts.

- `object` string · required  
  rule_export.  
  One of: `rule_export` (open: new values may be added).
- `run_id` string · required  
  The run.  
  pattern ^run_[0-9a-hjkmnp-tv-z]{20}$
- `format` string · required  
  csv (RFC 4180, a header row, CRLF) or jsonl (one bet a line).  
  One of: `csv`, `jsonl` (open: new values may be added).
- `rows` integer · required  
  Bets in the file.
- `columns` array of string · required  
  The file's columns, in order.
- `omitted` array of string · required  
  Columns never written to a file (licensed: lines and prices).
- `rule_hash` string · nullable  
  The rule's identity.
- `data_version` string  
  The data the run read.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `tested_at` string  
  When the run was kept (RFC 3339).  
  format date-time
- `filename` string  
  A file name for it.
- `sha256` string  
  The content's SHA-256.  
  pattern ^sha256:[0-9a-f]{64}$
- `content` string · required  
  The file's text (UTF-8). A text cell a spreadsheet would read as a formula starts with an apostrophe.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found)

### Example
```http
GET https://api.askkelly.ai/v1/rules/runs/run_mkytv75qe5a297z7y3af/export?format=csv
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "rule_export",
  "run_id": "run_mkytv75qe5a297z7y3af",
  "format": "csv",
  "rows": 1,
  "columns": [
    "game_key",
    "game_id",
    "team_id",
    "starts_at",
    "season",
    "market",
    "bet_moment",
    "result",
    "units",
    "units_to_date"
  ],
  "omitted": [
    "line",
    "price",
    "close_line",
    "close_price",
    "close_prob",
    "book"
  ],
  "rule_hash": "sha256:c9a3bcfd2d08b46b86935391523bd2671a885a30b3b1f15bf69e12c5e399441b",
  "data_version": "snap_52",
  "as_of": "2026-11-06T00:00:00Z",
  "tested_at": "2026-10-04T17:30:00Z",
  "filename": "kelly-run_mkytv75qe5a297z7y3af.csv",
  "sha256": "sha256:f11c63caf507c6bd6f20f128aabc88b5c7f09d39c31d2978a5219e3481007cf3",
  "content": "game_key,game_id,team_id,starts_at,season,market,bet_moment,result,units,units_to_date\r\ngm_1hnx5nrmk4xjpz6fzyfz:tm_b4w5y9xy5f9sgg1cmkvy,gm_1hnx5nrmk4xjpz6fzyfz,tm_b4w5y9xy5f9sgg1cmkvy,2025-10-21T23:30:00Z,2025-26,spread,close,win,0.91,0.91\r\n",
  "summary": "(1) bets from run run_mkytv75qe5a297z7y3af as CSV: the game, side, result and units; lines and prices are left out (the data licences).",
  "assumptions": [
    "Lines and prices are never in an export file."
  ],
  "has_more": false,
  "next_cursor": null,
  "source": "kelly",
  "attribution": null,
  "request_id": "req_aefedea15a9544fda2c60fc7",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

```http
GET https://api.askkelly.ai/v1/rules/runs/run_zzzzzzzzzzzzzzzzzzzz/export
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/not_found",
  "title": "Not found",
  "status": 404,
  "code": "not_found",
  "detail": "No run run_zzzzzzzzzzzzzzzzzzzz on this account.",
  "param": "run_id",
  "doc_url": "https://docs.askkelly.ai/problems/not_found",
  "request_id": "req_8af022b41b7d69af3cec4ec5",
  "retryable": false,
  "display_message": "That could not be found."
}
```

`POST /v1/rules:compare`

## Compare rule tests
public, no key needed · 0 credits, not charged during the beta · MCP tool `compare_rules` · status live

Two to six of your kept rule tests on common ground: the bets they share, opposite sides on the same game, the paired ROI difference with its 95% range (a bootstrap over game days) and Holm-adjusted p against the reference, how their days move together, and what betting them all would have done. Runs on different settings say so and aren't tested against each other.

### Parameters
Body, `application/json` (required):

- `runs` array of string  
  Two to six run_ids (run_…), in the order to show them.  
  min items 2 · max items 6
- `reference` integer  
  The index in runs the others are tested against (default 0).  
  min 0 · max 5

### Response
`200` The rule compare facts.

- `object` string · required  
  rule_compare.  
  One of: `rule_compare` (open: new values may be added).
- `aligned` boolean · required  
  Same competition, market, bet moment, seasons, season type, price and stake.
- `differs_on` array of string  
  The settings that differ (empty when aligned).
- `settings` object · nullable  
  The shared settings.
- `reference` integer  
  The run the others are tested against.
- `runs` array of object · required  
  The runs, as asked.
  - `run_id` string  
    The run.
  - `formula` string · nullable  
    Its rule.
  - `side` string · nullable  
    rule or fade.
  - `bets` integer  
    Bets it took.
  - `record` string · nullable  
    W-L-P.
  - `units` number · nullable  
    Units.
  - `roi` number · nullable  
    ROI, a fraction.
  - `honest_roi` number · nullable  
    Its honest forward ROI (F22).
  - `verdict_level` string · nullable  
    Its verdict's level.
  - `data_version` string  
    The data it read.
  - `tested_at` string  
    When it was kept.  
    format date-time
- `pairs` array of object · required  
  Each other run against the reference.
  - `a` integer  
    The reference's index in runs.
  - `b` integer  
    The other run's index.
  - `shared_bets` integer  
    Bets both took (same game and side).
  - `jaccard` number · nullable  
    Shared bets over the bets either took.
  - `conflicts` integer  
    Games where they bet opposite sides.
  - `roi_diff` number · nullable  
    The reference's ROI less the other's (units per graded bet); null when not aligned.
  - `roi_diff_ci95` array of number · nullable  
    Its 95% range: a paired bootstrap over game days (2,000 draws).
  - `p_value` number · nullable  
    Two-sided bootstrap p for no difference.
  - `p_holm` number · nullable  
    Holm-adjusted across the pairs.
  - `better` string · nullable  
    a or b when its range excludes 0 and p_holm < 0.05; else null.  
    One of: `a`, `b` (open: new values may be added).
  - `daily_pnl_corr` number · nullable  
    Pearson correlation of their units per game day (null under 3 days).
- `combined` object · required  
  Betting every run's bets together: a shared bet once, opposite sides netted to none.
  - `bets` integer  
    Bets.
  - `decisions` integer  
    Decided bets.
  - `record` string  
    W-L-P.
  - `units` number  
    Units.
  - `roi` number · nullable  
    ROI.
  - `max_drawdown_units` number · nullable  
    Deepest drawdown (null for runs kept before T5).
  - `conflicts_netted` integer  
    Games netted to no bet.
- `same_data` boolean  
  Every run read the same data.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`not_found`](/problems/not_found)

### Example
```http
POST https://api.askkelly.ai/v1/rules:compare
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "runs": [
    "run_mkytv75qe5a297z7y3af",
    "run_ewabjhkycqv5zk6mvbkn"
  ]
}
```

```json
{
  "object": "rule_compare",
  "aligned": true,
  "differs_on": [],
  "settings": {
    "competition": "nba",
    "market": "spread",
    "bet_moment": "close",
    "seasons": [
      "2025-26"
    ],
    "season_type": "regular",
    "price": "consensus",
    "stake": "risk"
  },
  "reference": 0,
  "runs": [
    {
      "run_id": "run_mkytv75qe5a297z7y3af",
      "formula": "=home",
      "side": "rule",
      "bets": 1,
      "record": "1-0",
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "honest_roi": -0.04514385341429974,
      "verdict_level": "too_few",
      "data_version": "snap_52",
      "tested_at": "2026-10-04T17:30:00Z"
    },
    {
      "run_id": "run_ewabjhkycqv5zk6mvbkn",
      "formula": "=AND(home, rest_days >= 1)",
      "side": "rule",
      "bets": 0,
      "record": "0-0",
      "units": 0,
      "roi": null,
      "honest_roi": null,
      "verdict_level": "too_few",
      "data_version": "snap_52",
      "tested_at": "2026-10-04T17:30:00Z"
    }
  ],
  "pairs": [
    {
      "a": 0,
      "b": 1,
      "shared_bets": 0,
      "jaccard": 0,
      "conflicts": 0,
      "roi_diff": null,
      "roi_diff_ci95": null,
      "p_value": null,
      "daily_pnl_corr": null,
      "p_holm": null,
      "better": null
    }
  ],
  "combined": {
    "bets": 1,
    "decisions": 1,
    "record": "1-0",
    "units": 0.91,
    "roi": 0.91,
    "max_drawdown_units": 0,
    "conflicts_netted": 0
  },
  "same_data": true,
  "summary": "(2) runs compared: run 2 shares (0) bets with run 1. No run's ROI is clearly different from the reference's.",
  "assumptions": [
    "The range on each ROI difference resamples whole game days (2,000 draws); ROI here is units per graded bet at one unit risked."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_00b063f1e4edf67cd34d2576",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

```http
POST https://api.askkelly.ai/v1/rules:compare
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "runs": [
    "run_mkytv75qe5a297z7y3af",
    "run_zzzzzzzzzzzzzzzzzzzz"
  ]
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/not_found",
  "title": "Not found",
  "status": 404,
  "code": "not_found",
  "detail": "No run run_zzzzzzzzzzzzzzzzzzzz on this account.",
  "param": "run_id",
  "doc_url": "https://docs.askkelly.ai/problems/not_found",
  "request_id": "req_023c15582310f2b78f834165",
  "retryable": false,
  "display_message": "That could not be found."
}
```

`POST /v1/rules:share`

## Share a rule test
public, no key needed · 0 credits, not charged during the beta · MCP tool `share_rule_run` · status live

A report link for one of your kept rule tests: the run frozen as it was tested, with your rules tried on its market, for anyone with the link (unlisted), anyone (public), or no one (private: the link reads as not found). Sharing again changes only the visibility.

### Parameters
Body, `application/json` (required):

- `run_id` string  
  The run_id a test_rule result gave (run_…).  
  pattern ^run_[0-9a-hjkmnp-tv-z]{20}$
- `visibility` string  
  unlisted (default), public or private.  
  One of: `unlisted`, `public`, `private` (open: new values may be added).

### Response
`200` The rule report link facts.

- `object` string · required  
  rule_report_link.  
  One of: `rule_report_link` (open: new values may be added).
- `report_id` string · required  
  The report (rpt_…).  
  pattern ^rpt_[0-9a-hjkmnp-tv-z]{20}$
- `report_url` string · required  
  Its page on askkelly.ai.  
  format uri
- `run_id` string · required  
  The run it shows.
- `visibility` string · required  
  unlisted (anyone with the link), public, or private (the link reads as not found).  
  One of: `unlisted`, `public`, `private` (open: new values may be added).
- `author_rules_tried` integer  
  Your rules tried on this competition and market when first shared.
- `shared_at` string  
  When it was first shared.  
  format date-time
- `tested_at` string  
  When the run was kept.  
  format date-time
- `data_version` string  
  The data the run read.
- `frozen` boolean  
  Always true: the report never changes with new data.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`not_found`](/problems/not_found)

### Example
```http
POST https://api.askkelly.ai/v1/rules:share
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "run_id": "run_mkytv75qe5a297z7y3af",
  "visibility": "unlisted"
}
```

```json
{
  "object": "rule_report_link",
  "report_id": "rpt_8kqqvwd602ere4fy0nv6",
  "report_url": "https://askkelly.ai/rule-tester/r/rpt_8kqqvwd602ere4fy0nv6",
  "run_id": "run_mkytv75qe5a297z7y3af",
  "visibility": "unlisted",
  "author_rules_tried": 2,
  "shared_at": "2026-10-04T17:30:00Z",
  "tested_at": "2026-10-04T17:30:00Z",
  "data_version": "snap_52",
  "frozen": true,
  "summary": "Report link for run run_mkytv75qe5a297z7y3af: anyone with the link can open it. It shows the run as it was tested, with your (2) rules tried on this market.",
  "assumptions": [],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_dbba199df7186c2aa793e858",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`GET /v1/rules/reports/{report_id}`

## Get a shared rule test
public, no key needed · 0 credits, not charged during the beta · MCP tool `get_rule_report` · status live

A rule test someone shared: the run exactly as it was tested (its data and as-of time), the author's rules tried on that market, the bets by game and side (never a price) and its charts, with the request to test it again on today's data. A private or unknown report is not_found.

### Parameters
- `report_id` string · path · required  
  The report's ID (rpt_…).  
  pattern ^rpt_[0-9a-hjkmnp-tv-z]{20}$

### Response
`200` The rule test facts.

- `object` const · required  
  Always rule_test.  
  Always `"rule_test"`.
- `verdict` object · required  
  Verdict v2: the leak gate, nine checks in three groups and the headline.
  - `version` integer  
    2.
  - `headline` string · required  
    The verdict in words.
  - `gate` object  
    The leak gate: a rule reading anything not known at the bet moment is refused first; leak_test is the cut-data rerun's status (clean or not_run).
  - `held_back_by` array of string  
    Why a rule with no failed check isn't holds_up (honest forward ROI at or under 0, PBO over 0.5 across 10 or more variants).
  - `level` string · required  
    too_few, no_profit, no_evidence, luck, promising or holds_up.  
    One of: `too_few`, `no_profit`, `no_evidence`, `luck`, `promising`, `holds_up` (open: new values may be added).
  - `passed` integer · required  
    Checks passed.
  - `applicable` integer · required  
    Checks that apply.
  - `checks` array of object · required  
    The checks, in a fixed order.
    - `key` string · required  
      The check; a teaser keeps v1's six (newest_30, seasons_won, price_worse among them).  
      One of: `enough_bets`, `not_luck`, `beats_base`, `half_point_worse`, `nearby_holds`, `not_concentrated`, `beats_close`, `still_working`, `since_saved`, `calibrated`, `newest_30`, `seasons_won`, `price_worse` (open: new values may be added).
    - `group` string  
      real (is it real?), pressure or still_working; not on a teaser's checks.  
      One of: `real`, `pressure`, `still_working` (open: new values may be added).
    - `label` string · required  
      The check, in words.
    - `status` string · required  
      pass, fail or na (it can't apply).  
      One of: `pass`, `fail`, `na` (open: new values may be added).
    - `zone` string  
      green, yellow (within one standard error of the threshold), red, or na.  
      One of: `green`, `yellow`, `red`, `na` (open: new values may be added).
    - `value` string · required  
      The figure behind it, in words.
    - `statistic` number | integer · nullable  
      The number the check compares.
    - `threshold` number | integer · nullable  
      What it is compared with.
    - `basis` string  
      seasons_won or newest_30 while the full check is still being built; points when Beats the close is judged on points beaten (audit F3).
- `overall` object · required  
  Every graded bet.
  - `record` string  
    Wins-losses(-pushes).
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `bets` integer  
    Graded bets.
  - `decisions` integer  
    Wins plus losses.
  - `units` number · nullable  
    Units won or lost.
  - `roi` number · nullable  
    Units over units risked.
  - `roi_interval` array of number · nullable  
    ROI's 95% interval at 1 unit risked a bet.
  - `win_rate` number · nullable  
    Wins over decisions.
  - `break_even` number · nullable  
    The win rate that breaks even at these prices.
  - `significance` object · nullable  
    The record test (kmath.records.record_test) and verdict v2's statistics (kmath.significance): the p-value, adjusted for the rules tried, and the anytime-valid test.
    - `p_value` number · nullable  
      The larger of the exact and the clustered one-sided p against no skill at these prices (F12, F23).
    - `method` string · nullable  
      exact_binomial, exact_simulation, saddlepoint or z_score.
    - `z` number · nullable  
      The score z: units over the square root of Σ(d − 1).
    - `t_stat` number · nullable  
      The t statistic with the sample variance.
    - `p_value_exact` number · nullable  
      The exact (or z) tail alone.
    - `p_value_clustered` number · nullable  
      The tail with bets clustered by slate and team-season (F23).
    - `p_value_vs_vig` number · nullable  
      Against a random bet at the no-vig close (needs closes).
    - `p_adjusted` number · nullable  
      The p-value adjusted for the rules tried (Romano-Wolf on the ledger's rules, Bonferroni on the count otherwise; F14).
    - `adjust_method` string · nullable  
      romano_wolf, holm or none.
    - `tests` integer · nullable  
      Rules tried in this family, this one included.
    - `tests_effective` number · nullable  
      Effective tests (Li-Ji): near-duplicate rules count as fewer.
    - `reality_check_p` number · nullable  
      White's Reality Check p (when the ledger holds the rules' units).
    - `spa_p` number · nullable  
      Hansen's SPA p (when the ledger holds the rules' units).
    - `clears_t3` boolean · nullable  
      z at or above 3 (Harvey-Liu-Zhu's bar).
    - `haircut` number · nullable  
      Harvey-Liu haircut: the share of the ROI the rules tried take away.
    - `haircut_roi` number · nullable  
      ROI after the haircut, per decision.
    - `anytime_valid` object · nullable  
      The record as a bet against no skill (F17): e-value, anytime p, ROI range.
      - `e_value` number · nullable  
        The e-value now.
      - `p_value` number · nullable  
        1 over the largest e-value so far.
      - `max_e` number · nullable  
        The largest e-value along the path.
      - `roi_cs95` array of number · nullable  
        An ROI range valid at every bet.
  - `roi_ci95` array of number · nullable  
    ROI's 95% score interval, clustered (F13, F23).
  - `units_ci95` array of number · nullable  
    Units' 95% interval: decisions times the ROI interval.
  - `roi_ci` object · nullable  
    ROI intervals at ci_level: score (the one shown), BCa, block bootstrap over slates and anytime-valid (F13).
  - `deflated` object · nullable  
    Per-bet Sharpe, PSR and DSR at the effective tests, and the bets needed: deflated (sample_needed), single test and 80% power, each times the design effect (F15).
    - `sample_needed` integer · nullable  
      Decisions needed, deflated for the rules tried; null with no edge to prove.
    - `sample_needed_single` integer · nullable  
      Decisions needed for one rule tried.
    - `sample_needed_power80` integer · nullable  
      Decisions for 80% power at this ROI.
    - `sample_needed_plan` integer · nullable  
      Decisions for 80% power at plan_roi.
    - `dsr` number · nullable  
      Deflated Sharpe ratio.
    - `psr` number · nullable  
      Probabilistic Sharpe ratio.
  - `sample_needed` object · nullable  
    Bets needed to tell this win rate from break-even (one-sided, with 80% power, ...).
  - `small_sample` boolean  
    Under 30 decisions.
  - `few_decisions` boolean  
    Under 5 decisions.
- `honest` object · nullable  
  The honest forward ROI (F22, the headline ROI): empirical Bayes toward a prior mean (the rule's own closing-line value when at least half its bets have a close, else the usual two-way margin), less the winner's curse for the rules tried and the out-of-sample decay.
  - `roi` number · nullable  
    Honest forward ROI.
  - `ci80` array of number · nullable  
    80% range.
  - `raw_roi` number · nullable  
    The past ROI per decision, beside it.
  - `prior_mean` number · nullable  
    The prior mean the ROI is shrunk toward (prior.source says which).
  - `prior_sd` number · nullable  
    The spread of true ROIs (0.02 until fitted on the ledger).
  - `shrink` number · nullable  
    Weight on the prior, se²/(se² + τ²).
  - `selection_adj` number · nullable  
    Winner's-curse correction for the rules tried.
  - `decay_factor` number · nullable  
    Out-of-sample decay on the excess (0.74).
  - `stabilizes_at_bets` integer · nullable  
    Decisions at which the record and the prior weigh the same.
  - `uses_clv` boolean  
    The prior mean is the rule's own closing-line value.
  - `prior_basis` string  
    fitted (prior_sd from the ledger's fit) or seed.
  - `prior` object  
    Where the prior mean comes from.
    - `source` string  
      clv (the rule's mean closing-line value), margin (the two-way margin, -4.55%) or fitted.
    - `mean` number · nullable  
      The prior mean used.
    - `closes` integer  
      Decided bets with a no-vig close.
    - `capped` boolean  
      A closing-line value above 0 was held at 0: under 50 bets have a close.
    - `words` string  
      The prior, said plainly.
- `dependence` object · nullable  
  Bets clustered by slate (the date; the week in the NFL and college football) and team-season (F23).
  - `clusters` integer  
    Slates.
  - `design_effect` number  
    Clustered over iid variance.
  - `effective_bets` integer  
    Decisions over the design effect (at least 1).
  - `method` string  
    cr1_twoway, cr1_slate, cr1_larger_oneway, wild_bootstrap or wild_bootstrap_webb.
- `base` object · nullable  
  The rule against the rest of its own base (F19): the who-or-when conditions alone, or base_formula.
  - `formula` string · nullable  
    The base, or null for the whole market.
  - `source` string  
    auto, user or market.  
    One of: `auto`, `user`, `market` (open: new values may be added).
  - `status` string  
    measured or na.  
    One of: `measured`, `na` (open: new values may be added).
  - `roi` number · nullable  
    The base's ROI per decision.
  - `lift` number · nullable  
    Rule ROI less base ROI.
  - `p_value_vs_base` number · nullable  
    Season-stratified permutation p of the rule within its base.
  - `units_from_base` number · nullable  
    Units the base alone would have made on the rule's stakes.
  - `units_from_filter` number · nullable  
    The rule's units less units_from_base.
- `clv` object · required  
  Closing-line value as evidence (F21): each bet's no-vig CLV, q_close x price - 1, on bets Kelly holds a close for. Empty when betting at the close.
  - `bets_with_close` integer  
    Bets with a close.
  - `bets_without_close` integer  
    Bets without one.
  - `reference` string  
    The close used: consensus (the no-vig average across books).
  - `devig` string  
    How the vig was removed: multiplicative.
  - `lines_converted` integer  
    Bets whose close was carried from the closing line to the bet's line (NFL spreads and totals).
  - `coverage` number · nullable  
    Share of bets with a close probability (null with no bets).
  - `closes_stale` integer  
    Closes left out as older than 60 minutes at the start, or seen after it (audit F9): those bets keep their result but have no CLV.
  - `points_coverage` number · nullable  
    Share of bets with points beaten (spreads and totals).
  - `points_test` object · nullable  
    The clustered test on points beaten (audit F3).
    - `bets` integer  
      Bets with points beaten.
    - `mean` number · nullable  
      Mean points the bet's line beat the close by.
    - `std_error_clustered` number · nullable  
      Standard error clustered by slate and team-season.
    - `df_clustered` integer  
      Degrees of freedom: the fewer clusters less one.
    - `ci95_clustered` array of number · nullable  
      Clustered 95% interval.  
      min items 2 · max items 2
    - `p_value_clustered` number · nullable  
      One-sided p of mean points beaten > 0.
    - `cluster_method` string  
      How the standard error was clustered.
  - `basis` string  
    What Beats the close is judged on: probability, or points when under 80% of bets have a close probability and more have points beaten (audit F3).  
    One of: `probability`, `points` (open: new values may be added).
  - `mean` number · nullable  
    Mean CLV (fraction): the bets' expected ROI if the close is right.
  - `ci95` array of number · nullable  
    Clustered 95% interval on the mean.  
    min items 2 · max items 2
  - `p_value` number · nullable  
    One-sided clustered p of mean CLV > 0.
  - `beat_close_share` number · nullable  
    Share of bets with CLV above 0, ties counted.
  - `beat_rate` number · nullable  
    Share of bets that beat the close, ties left out.
  - `beat_rate_ci95` array of number · nullable  
    Wilson 95% interval on beat_rate.  
    min items 2 · max items 2
  - `sign_test_p` number · nullable  
    Exact one-sided sign test against half.
  - `mean_prob` number · nullable  
    Mean of the close's no-vig probability less the bet moment's.
  - `mean_points` number · nullable  
    Mean points the bet's line beat the closing line by (spreads and totals).
  - `points_bets` integer  
    Bets mean_points is over.
  - `profit_slope` number · nullable  
    Per-bet units regressed on CLV: near 1 when CLV turned into profit.
  - `profit_slope_se` number · nullable  
    Its slate-clustered standard error.
  - `sample_needed` integer · nullable  
    Bets CLV needs for a 95% interval to clear 0 at this mean and spread (null unless the mean is above 0).
  - `sample_needed_roi` integer · nullable  
    Bets profit would need at the same edge.
  - `significance` object · nullable  
    The CLV mean's tests (null under two bets).
    - `t` number · nullable  
      Mean over its iid standard error.
    - `ci95` array of number · nullable  
      Student 95% interval (iid).  
      min items 2 · max items 2
    - `std_error` number · nullable  
      iid standard error.
    - `bets_needed` number · nullable  
      Bets a t of 2 needs at this mean and spread.
    - `std_error_clustered` number · nullable  
      Standard error clustered by slate and team-season (F23).
    - `df_clustered` integer  
      Degrees of freedom: the fewer clusters less one.
    - `ci95_clustered` array of number · nullable  
      Clustered 95% interval.  
      min items 2 · max items 2
    - `p_value_clustered` number · nullable  
      One-sided p of mean CLV > 0 (wild cluster bootstrap under 42 slates, else Student t); beats_close reads it.
    - `cluster_method` string  
      How the standard error was clustered.
    - `design_effect` number · nullable  
      Clustered variance over iid variance.
  - `note` string  
    Why the block is empty, when it is.
- `luck` object  
  The luck-adjusted result (F20): the units the market's fair probabilities expected the decided bets to make against what they made. Pushes count zero both ways.
  - `reading` string  
    luck (bets before the close: the gap is outcome noise) or versus_the_market (bets at the close: the gap is the rule's edge on the closing market).  
    One of: `luck`, `versus_the_market` (open: new values may be added).
  - `close_source` string  
    consensus.
  - `devig` string  
    multiplicative.
  - `bets` integer  
    Decided bets with a fair probability.
  - `bets_without_prob` integer  
    Decided bets without one.
  - `left_out` object  
    Bets left out.
    - `push` integer  
      Pushes.
    - `half` integer  
      Half results (quarter lines).
  - `lines_converted` integer  
    Bets whose close was carried to the bet's line.
  - `expected_units` number · nullable  
    Sum of stake x (q x (price - 1) - (1 - q)).
  - `actual_units` number · nullable  
    Units the bets made.
  - `luck_units` number · nullable  
    actual_units less expected_units.
  - `luck_se_units` number · nullable  
    luck's standard error given the probabilities.
  - `expected_wins` number · nullable  
    Sum of q.
  - `actual_wins` integer · nullable  
    Wins.
  - `luck_percentile` number · nullable  
    Where the wins sit among the market's (Poisson-binomial, mid-p): 0.95 is luckier than (95) of (100) identical paths.
  - `expected_roi` number · nullable  
    expected_units over units risked.
  - `actual_roi` number · nullable  
    actual_units over units risked.
  - `theta` number · nullable  
    Per-bet units regressed on expected units (30 bets or more): near 1 when the close is calibrated on these bets.
  - `by_season` array of object  
    Each season, in calendar order; luck_units add up to the total.
    - `season` string  
      Season.
    - `bets` integer  
      Decided bets with a probability.
    - `expected_units` number  
      Units the market expected.
    - `actual_units` number  
      Units made.
    - `luck_units` number  
      actual_units less expected_units.
- `capacity` object · nullable  
  F8: the limits Kelly measured at the bet moment (ADR-K783); evidence beside the verdict, never in it. No book publishes its limits, so only measured ones are shown.
  - `available` boolean  
    Whether measured limits are shown for this market and moment.
  - `market` string · nullable  
    The market as line history names it (spreads, totals, h2h).
  - `before_start` string · nullable  
    The time before the start the bet moment falls in.  
    One of: `0_1h`, `1_12h`, `12_36h`, `36_72h`, `72h_plus` (open: new values may be added).
  - `books` array of object  
    Per book, highest median first.
    - `book` string · nullable  
      The book as the vendor names it.
    - `vendor` string · nullable  
      Who measured it.
    - `currency` string · nullable  
      The stake currency, null when the vendor doesn't say.
    - `median` number · nullable  
      The median limit.
    - `p25` number · nullable  
      Its 25th percentile.
    - `p75` number · nullable  
      Its 75th percentile.
    - `min` number · nullable  
      The smallest.
    - `max` number · nullable  
      The largest.
    - `snapshots` integer  
      Limit readings behind it.
    - `games` integer  
      Games behind it.
    - `first_seen` string · nullable  
      The first reading's date.
    - `last_seen` string · nullable  
      The last reading's date.
  - `max_stake_per_bet` object · nullable  
    The highest book median: the most one book typically took on one bet.
    - `book` string · nullable  
      The book.
    - `amount` number · nullable  
      The median limit.
    - `currency` string · nullable  
      Its currency.
  - `per_season_at_limit` number · nullable  
    max_stake_per_bet times the rule's bets a season.
  - `bets_per_season` number · nullable  
    The rule's bets a season.
  - `limits_held` integer  
    Limit readings Kelly holds for this market and moment.
  - `reason` string · nullable  
    Why none are shown, when available is false.
- `stress` object · required  
  The same bets graded harder.
  - `half_point_worse` object · nullable  
    Every line half a point worse (none for moneylines).
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
  - `flat_110` object · nullable  
    Every bet at -110 (none for moneylines).
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
  - `other_side` object  
    The other side of every bet.
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
  - `break_even` object · nullable  
    F7: how much worse the price or line can get before the profit is gone.
    - `price_multiplier` number · nullable  
      The share of each payout (d - 1) that breaks even (under 1: the room to spare).
    - `american_avg` number · nullable  
      The flat American price that breaks even.
    - `decimal_avg` number · nullable  
      The same, decimal.
    - `line_points` number · nullable  
      The most points worse (in halves, up to 3) the line could be with a profit left; 0 when none; null for moneylines.
  - `grid` array of object · nullable  
    F7: the bets at -105 to -120 with the line 0 to 1 point worse (moneylines: payouts cut 0-6%); left out at detail summary.
    - `vig` integer · nullable  
      Every bet at this American price.
    - `line_shift` number · nullable  
      Points the line moved (negative: worse).
    - `price_multiplier` number · nullable  
      Moneylines: the share of each payout kept.
    - `units` number · nullable  
      Units.
    - `roi` number · nullable  
      ROI.
  - `slippage_mc` object · nullable  
    F7: each bet's line worsened by a draw from the market's own Monday-to-close moves, 1,000 seeded runs; null without such moves.
    - `runs` integer  
      Runs.
    - `roi_p05` number · nullable  
      5th percentile ROI.
    - `roi_p50` number · nullable  
      Median ROI.
    - `profitable_share` number · nullable  
      Share of runs with a profit.
    - `moves_from` integer  
      Line moves the draws come from.
    - `move_median` number · nullable  
      Their median size, points.
  - `price_worse` object · nullable  
    Teasers: every ticket ten cents worse (price_american). Racing: every bet's winnings 5% smaller.
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
- `legs` object · nullable  
  Teasers: every teased leg, judged against the per-leg break-even (1/D)^(1/n).
  - `record` string  
    Legs won-lost(-pushed).
  - `decisions` integer  
    Legs won plus lost.
  - `cover_rate` number · nullable  
    Legs won over legs decided.
  - `break_even_per_leg` number  
    The cover rate a leg needs at the ticket's price.
  - `significance` object · nullable  
    The legs' record test against the per-leg break-even.
  - `sample_needed` object · nullable  
    Legs needed to tell this cover rate from the break-even.
- `teaser` object · nullable  
  Teasers: the options tested. Prices are assumed: Kelly holds no historical teaser prices.
  - `points` number  
    Points each leg moved.
  - `legs` integer  
    Legs a ticket.
  - `price` object  
    The ticket's price (American and decimal).
  - `reduced_prices` object  
    Prices for tickets reduced by a pushed leg, by legs left (American).
  - `push` string  
    reduce, lose or ticket_push.  
    One of: `reduce`, `lose`, `ticket_push` (open: new values may be added).
  - `pairing` string  
    all_pairs or chronological.  
    One of: `all_pairs`, `chronological` (open: new values may be added).
  - `leg_market` string  
    spread, over or under.  
    One of: `spread`, `over`, `under` (open: new values may be added).
  - `break_even_per_leg` number  
    (1/D)^(1/n) at the ticket's price.
  - `price_assumed` boolean  
    Always true: the price is the person's or a common book table.
  - `tickets` integer  
    Tickets formed.
- `random_baseline` object · nullable  
  F18: the rule against random bets of the same count on the same games, matched by season and price bucket.
  - `sims` integer  
    Random rules drawn.
  - `bets` integer  
    The rule's bets.
  - `pool` integer  
    Bets the market offered.
  - `percentile` number · nullable  
    Share of random rules with a lower ROI.
  - `beats_per_100` integer  
    Random rules out of 100 the rule beats.
  - `p_value` number · nullable  
    (1 + random rules at or above) / (sims + 1).
  - `analytic_p` number · nullable  
    The finite-population normal cross-check.
  - `random_roi_median` number · nullable  
    Median random ROI (about minus the vig).
  - `random_roi_p05` number · nullable  
    5th percentile random ROI.
  - `random_roi_p95` number · nullable  
    95th percentile.
  - `best_of_tests` object  
    Would the best of M random rules (M = rules tried) do this well?
    - `tests` integer  
      M.
    - `p_value` number · nullable  
      1 - F(ROI)^M.
  - `histogram` object · nullable  
    Random ROIs in 30 bins (edges, counts); full detail only.
- `decay` object · nullable  
  F24: is the rule still making money? Rolling ROI and CLV, one unknown break (sup-F, block permutation p), a CUSUM alarm, a known-date test, the trend and the decay ratio.
  - `bets` integer  
    Graded bets.
  - `window` integer · nullable  
    Rolling window, bets.
  - `rolling` array of object · nullable  
    Up to 200 points; full detail only.
  - `break` object · nullable  
    The most likely date the edge changed.
    - `at` string  
      Date.
    - `bet_index` integer  
      Bets before it.
    - `sup_f` number · nullable  
      sup-F.
    - `p_value` number · nullable  
      Block permutation p-value.
    - `at_edge` boolean  
      Within the first or last 15%: not a confirmed break.
    - `roi_before` number · nullable  
      ROI before.
    - `roi_after` number · nullable  
      ROI after.
    - `bets_after` integer  
      Bets after.
  - `cusum` object · nullable  
    Page's lower CUSUM alarm.
  - `known_break` object · nullable  
    A Chow test at break_date.
  - `trend_per_100_bets` number · nullable  
    Profit per bet's change per 100 bets (1 unit risked).
  - `decay_ratio` number · nullable  
    ROI after the break (or the newest 30%) over ROI before.
  - `clv_break` object · nullable  
    The break test on CLV.
  - `roi_newest_30` number · nullable  
    ROI of the newest 30% of bets.
- `ablation` object · nullable  
  F27: each top-level AND condition's Shapley share of the units beyond the base's ROI.
  - `base` object  
    Every game with a line: decisions and ROI.
  - `total` number · nullable  
    The rule's units beyond the base's ROI (the Shapley values add up to it).
  - `clauses` array of object  
    One a condition, in the order written.
    - `condition` string  
      The condition.
    - `shapley_units` number · nullable  
      Its share of the extra units.
    - `share` number · nullable  
      Of the total.
    - `label` string  
      dead, harmful, load_bearing or helps.  
      One of: `dead`, `harmful`, `load_bearing`, `helps` (open: new values may be added).
    - `fix` object · nullable  
      Remove it: the rule without it.
  - `pairs` array of object  
    Pairs (up to 6 conditions).
  - `method` string  
    exact or sampled.  
    One of: `exact`, `sampled` (open: new values may be added).
- `nearby` object · nullable  
  F28: every number in the rule moved two steps each way (steps fixed by the field).
  - `numbers` array of object  
    The rule's numbers.
  - `variants` integer  
    Variants in the grid.
  - `distinct_bet_sets` integer  
    Variants with their own bets.
  - `roi_median` number · nullable  
    Median ROI of the variants.
  - `roi_p05` number · nullable  
    5th percentile.
  - `roi_p95` number · nullable  
    95th percentile.
  - `plateau_share` number · nullable  
    Share of one-step neighbours that made money.
  - `spike_ratio` number · nullable  
    (ROI - median) / IQR of the variants.
  - `reading` string · nullable  
    plateau, slope or spike.
  - `na` string · nullable  
    Why there are no numbers to move.
- `monte_carlo` object · nullable  
  F31: drawdowns and losing runs the same bets give in other orders.
  - `sims` integer  
    Simulations.
  - `mode` string  
    block, iid or permutation.
  - `max_drawdown_units` object  
    Max drawdown, units.
    - `p05` number · nullable  
      5th percentile.
    - `p50` number · nullable  
      Median.
    - `p95` number · nullable  
      95th percentile.
    - `actual` number · nullable  
      The real order's figure.
  - `longest_losing_run` object  
    Longest losing run, bets.
    - `p05` number · nullable  
      5th percentile.
    - `p50` number · nullable  
      Median.
    - `p95` number · nullable  
      95th percentile.
    - `actual` number · nullable  
      The real order's figure.
  - `final_units` object  
    Final units.
    - `p05` number · nullable  
      5th percentile.
    - `p50` number · nullable  
      Median.
    - `p95` number · nullable  
      95th percentile.
    - `actual` number · nullable  
      The real order's figure.
  - `prob_below_zero` number · nullable  
    Share of runs finishing below zero.
  - `worst_100_bets_units_p05` number · nullable  
    5th percentile of the worst 100-bet stretch.
- `noise` object · nullable  
  F32: jittered inputs, lines moved half a point either way, and an earlier bet moment.
  - `inputs` object · nullable  
    The rule's compared numbers jittered.
    - `runs` integer  
      Runs.
    - `profitable_runs` integer  
      Runs with a profit.
    - `profitable_share` number · nullable  
      Share.
    - `roi_median` number · nullable  
      Median ROI.
    - `roi_p05` number · nullable  
      5th percentile ROI.
    - `overlap_median` number · nullable  
      Median Jaccard overlap of the bets with the rule's.
  - `lines` object · nullable  
    Lines (moneylines: payouts) moved at random.
  - `delay` object · nullable  
    The rule bet at the earlier moment.
- `concentration` object · nullable  
  F34: the profit without the best season, team, opponent, month and weekday.
  - `by` array of object  
    Groupings in a fixed order.
    - `group` string  
      season, team, opponent, month or weekday.
    - `best` object · nullable  
      The best group (3+ bets).
    - `without_best` object · nullable  
      The rule without it.
    - `effective_groups` number · nullable  
      1 / Herfindahl of the profitable groups' shares.
    - `p_more_concentrated` number · nullable  
      Permutation p-value (teams and opponents).
  - `trim_top_0_05` object · nullable  
    Without the top 5% of bets (moneylines) or bet-days.
- `split_dimensions` array of object · nullable  
  F35: the rule by fixed dimensions with shrunk ROI and intervals.
  - `dimension` string  
    The dimension.
  - `heterogeneity_p` number · nullable  
    Chi-square p-value of win rates across its levels.
  - `heterogeneity_q` number · nullable  
    Benjamini-Hochberg q across the dimensions.
  - `real_difference` boolean  
    q < 0.10.
  - `where_profit` string · nullable  
    The level with the most shrunk extra units, when real.
  - `cells` array of object · nullable  
    Levels in a fixed order; full detail only.
- `robustness` object  
  The suite's run: the verdict v2 checks it feeds and its seed.
  - `checks` array of object  
    half_point_worse, nearby_holds, not_concentrated and still_working.
    - `key` string · required  
      The check.  
      One of: `half_point_worse`, `nearby_holds`, `not_concentrated`, `still_working` (open: new values may be added).
    - `label` string · required  
      The check, in words.
    - `status` string · required  
      pass, fail or na.  
      One of: `pass`, `fail`, `na` (open: new values may be added).
    - `value` string · required  
      The figure behind it, in words.
    - `statistic` number · nullable  
      The figure the status compares.
    - `threshold` number · nullable  
      What it is compared with.
  - `fast_path` boolean  
    The rule's numbers were re-bet from its compiled columns.
  - `seed` integer  
    The seed (a hash of the rule and its options).
  - `evaluations` integer  
    Formula evaluations the suite ran.
  - `off` array of string  
    Blocks switched off.
- `path` object  
  The units path in date order: drawdown and longest losing run; at detail full its series (F47).
  - `max_drawdown_units` number  
    The deepest fall from a peak, units.
  - `longest_losing_run` integer  
    Most losses in a row (pushes don't break it).
  - `series` object · nullable  
    Bet-indexed lines of the graded bets (detail full): `index` the bet numbers kept (past 600 bets thinned by LTTB, the deepest drawdown always kept), `dates`, `units`, `drawdown`, `base_units` (the market base's ROI at the same stakes, null unless measured), `band_p025` and `band_p975` (the no-skill range: 1,000 seeded runs of the same bets at their fair chances; null under 20 bets or for racing), `rolling_roi_100` with its no-skill range `rolling_p025` and `rolling_p975`, and `markers` (season starts, the holdout).
    - `x` string  
      Always bet_index.  
      One of: `bet_index` (open: new values may be added).
    - `index` array of integer  
      Bet numbers (1 is the first graded bet).
    - `dates` array of string  
      Each kept bet's date (YYYY-MM-DD, UTC).
    - `units` array of number  
      Units to date.
    - `drawdown` array of number  
      Units below the running peak (0 or below).
    - `base_units` array of number · nullable  
      The market base at the same stakes.
    - `band_p025` array of number · nullable  
      No-skill 2.5th percentile.
    - `band_p975` array of number · nullable  
      No-skill 97.5th percentile.
    - `rolling_roi_100` array of number  
      ROI over the last 100 bets (null before).
    - `rolling_p025` array of number  
      Its no-skill 2.5th percentile.
    - `rolling_p975` array of number  
      Its no-skill 97.5th percentile.
    - `markers` array of object  
      Where each season and the holdout start.
      - `type` string  
        season or holdout.  
        One of: `season`, `holdout` (open: new values may be added).
      - `at` integer  
        The bet number it starts at.
      - `label` string · nullable  
        The season, or newest 30%.
  - `downsampled` boolean  
    The series were thinned to 600 points.
  - `expected_max_drawdown_zero_edge` number · nullable  
    The median deepest drawdown of the no-skill runs, units.
- `holdout` object · nullable  
  The latest 30% of bets against the earlier 70%.
- `seasons` array of object  
  Seasons in calendar order.
- `splits` array of object · nullable  
  Home, away, favorite, underdog and line bands, in a fixed order; null at detail summary.
  - `record` string  
    Wins-losses(-pushes).
  - `bets` integer  
    Bets graded or not.
  - `decisions` integer  
    Wins plus losses.
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `units` number · nullable  
    Units won or lost at the staking asked for.
  - `roi` number · nullable  
    Units over units risked.
  - `p_value` number · nullable  
    The record's own p-value against no skill at its prices.
  - `p_adjusted` number · nullable  
    On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
  - `shown_rows` integer  
    On splits and condition-removed rows: the rows p_adjusted counts.
- `without` array of object · nullable  
  One row a top-level AND condition: the rule's record without it; null at detail summary.
  - `record` string  
    Wins-losses(-pushes).
  - `bets` integer  
    Bets graded or not.
  - `decisions` integer  
    Wins plus losses.
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `units` number · nullable  
    Units won or lost at the staking asked for.
  - `roi` number · nullable  
    Units over units risked.
  - `p_value` number · nullable  
    The record's own p-value against no skill at its prices.
  - `p_adjusted` number · nullable  
    On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
  - `shown_rows` integer  
    On splits and condition-removed rows: the rows p_adjusted counts.
  - `p_value_vs_rule` number · nullable  
    The rule against the bets the condition removes (F19).
  - `p_value_vs_rule_adjusted` number · nullable  
    p_value_vs_rule, Holm-adjusted over the conditions shown.
- `bets` array of object  
  Every bet in date order (left out at detail summary).
  - `key` string  
    {game_id}:{team_id} (racing: {race_id}:{runner_id}).
  - `starts_at` string  
    Kickoff (RFC 3339).  
    format date-time
  - `season` string  
    The season.
  - `label` string  
    Date, team and opponent.
  - `price` object · nullable  
    The price at the bet moment, decimal.
  - `line` number · nullable  
    The bet's line as graded (the team's spread, the total).
  - `result` string · nullable  
    win, loss or push (soccer quarter lines: half_win or half_loss); null until played.
  - `close_prob` number · nullable  
    The fair closing probability of the same side, for CLV.
  - `units_to_date` number  
    Units after this bet, in date order.
  - `how_graded` string · nullable  
    How the bet was graded, in words.
  - `units` number · nullable  
    Units the bet won or lost at the run's staking (racing: its exact profit or loss with dead heats, each way, Rule 4 and commission); null until played.
  - `drawdown_to_date` number · nullable  
    Units to date less their running peak (0 or below); null until played.
  - `side` string · nullable  
    home or away (spread, moneyline), over, under or draw.
  - `market` string  
    The market graded (the other total when fading a total).
  - `bet_moment` string  
    When the bet was taken: edition, day_before or close.
  - `clv_prob` number · nullable  
    The fair closing chance less the fair chance at the bet moment, when Kelly holds both.
  - `sample` string · nullable  
    holdout for the latest 30% of graded bets by time, else in_sample; null with no holdout or until played.  
    One of: `in_sample`, `holdout` (open: new values may be added).
  - `why` array of object  
    Why it matched: up to six conditions (F46).
    - `clause` string  
      The condition as written.
    - `value` number | boolean | string · nullable  
      The compared expression's number for a comparison (rest_days - opponent.rest_days for rest_days - opponent.rest_days >= 3), else true or false.
  - `settlement` array of string  
    The settlement rules that decided the bet (IDs in settlement.rules).
- `leak_test` object  
  The leak test (F3): the rule and each part of it evaluated again on a sample of rows with the data cut at the bet moment. A leak refuses the test (422 rule_not_testable, problem leak_found), so a report always says clean or not_run.
  - `status` string · required  
    clean, leak_found or not_run.  
    One of: `clean`, `leak_found`, `not_run` (open: new values may be added).
  - `rows_checked` integer · required  
    Rows rebuilt at the bet moment.
  - `matched_checked` integer  
    Of them, rows the rule matched.
  - `matches_flipped` integer  
    Rows whose match changed with the data cut.
  - `parts` array of object · required  
    Parts that changed, in the formula's order (empty when clean).
    - `name` string  
      The part, as written (rule is the whole rule).
    - `rows_changed` integer  
      Rows where it changed.
    - `max_change` number · nullable  
      The largest change in a number.
    - `example` string  
      One changed row, {game_id}:{team_id}.
- `warm_up` object  
  The warm-up check (F4): bets taken before the rule's windows had the earlier games they read (one season at a time; windows never reach into last season).
  - `policy` string  
    The policy graded in the report.  
    One of: `as_written`, `require_full` (open: new values may be added).
  - `games_needed` integer  
    Earlier games every window needs (0: the rule has no window).
  - `windows` array of object  
    Each window in the formula's order.
    - `expr` string  
      The window, as written.
    - `games_needed` integer · nullable  
      Earlier games it reads (null: season to date).
    - `short_rows` integer  
      Rows in scope with fewer earlier games this season.
    - `short_bets` integer  
      Bets the rule took with fewer.
  - `short_bets` integer  
    Bets taken with a window short.
  - `by_policy` array of object · nullable  
    as_written, then require_full; null when the rule has no window.
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
  - `warning` boolean  
    Short bets are over 10% of the bets, or leaving them out moves ROI by more than half its 95% interval's half-width.
- `settlement` object  
  How bets were settled (F9): Kelly's own grading rules as data, and each rule's bets.
  - `profile` string  
    The rules profile (kelly_standard).
  - `rules_version` string  
    The rules table's date.
  - `applied` array of object  
    Rules that decided at least one bet, in table order.
    - `rule` string  
      Rule ID.
    - `bets` integer  
      Bets.
  - `rules` array of object  
    The rules for this league and market.
    - `id` string  
      Rule ID.
    - `text` string  
      The rule in words.
    - `effective_from` string  
      The date Kelly's grader took it up.
- `coverage` object  
  Coverage (F10): from every game in scope to the bets graded, each season's priced share, blank inputs and whether the rows left out for no line differ from the bets kept.
  - `flow` array of object  
    The steps in order; rule_true rows = decisions + every row out after it.
    - `step` string  
      in_scope, rule_true, one_bet_a_game, full_windows, priced, graded or decisions.
    - `games` integer  
      Games (in_scope only).
    - `rows` integer  
      Rows.
    - `out` object  
      Rows that left at this step, by reason.
  - `by_season` array of object  
    Every season asked for, in order.
    - `season` string  
      Season.
    - `games` integer  
      Games in scope.
    - `rows` integer  
      Rows.
    - `rule_true` integer  
      Rows the rule matched.
    - `bets` integer  
      Bets graded.
    - `priced_share` number · nullable  
      Share of rows with a price at the bet moment.
  - `inputs_missing` array of object  
    Inputs read bare on the row, with blanks.
    - `attribute` string  
      The input.
    - `rows_blank` integer  
      Rows with no value.
    - `share` number · nullable  
      Share of rows in scope.
  - `left_out_differs` object  
    Rows left out for no line against the bets kept: standardized mean difference over home, neutral site and rest days; flagged over 0.1 with 10 or more left out.
    - `flag` boolean  
      They differ.
    - `max_smd` number · nullable  
      The largest difference.
    - `covariate` string · nullable  
      Where it is.
    - `left_out` integer  
      Rows.
    - `kept` integer  
      Rows.
    - `by_covariate` array of object  
      Each covariate's difference.
- `moment` object  
  The bet moment's clock (F5): its target time, the prices' snapshot age at it and where the lines came from.
  - `bet_moment` string  
    edition, day_before or close.
  - `target` string · nullable  
    The moment's time for a game, in words.
  - `max_stale_minutes` integer  
    Oldest price kept, in minutes before the target.
  - `floor_minutes_before_oct_2022` integer  
    The limit's floor for games before October 2022 (the Odds API's 10-minute snapshots).
  - `rows_priced` integer  
    Rows the rule took that had a price.
  - `rows_aged` integer  
    Rows whose price carries its snapshot time and was kept.
  - `median_snapshot_age_minutes` number · nullable  
    Median minutes from snapshot to target, kept rows.
  - `max_snapshot_age_minutes` number · nullable  
    Oldest kept snapshot, in minutes before the target.
  - `stale_price` integer  
    Rows left out: price older than max_stale_minutes.
  - `after_moment` integer  
    Rows left out: price seen after the target.
  - `age_unknown` integer  
    Rows kept whose price has no snapshot time (Kelly's own frozen lines).
  - `line_sources` object  
    Kept rows by line source (sheet_line, odds_api_early, odds_api_close).
- `left_out` object · required  
  Games the rule matched but didn't bet.
  - `no_line` integer  
    No Kelly line at the bet moment.
  - `both_sides` integer  
    The rule matched both teams.
  - `stale_price` integer  
    The price was older than max_stale_minutes at the bet moment, or seen after it (F5).
  - `unpaired` integer  
    Teasers: legs left off a ticket (a week with too few, or the leftover in chronological pairing).
  - `no_price` integer  
    Racing: runners with no price to settle at.
  - `non_runners` integer  
    Racing: non-runners (void).
  - `void_races` integer  
    Racing: abandoned or void races.
- `risk` object  
  Risk of ruin (F36, kmath.backtest.rule_ruin): the chance of losing ruin_share of the bankroll within horizon_bets bets betting like the record, with its win rate taken as exact and allowing for its sample (a Beta posterior draw a path); the Lundberg bound; the bankroll curve.
  - `bankroll_units` number  
    Bankroll in units.
  - `ruin_share` number  
    Share of the bankroll whose loss counts as ruin.
  - `horizon_bets` integer  
    Bets ahead.
  - `ruin_if_rate_exact` number · nullable  
    Ruin chance if the record's win rate were exact.
  - `ruin_allowing_error` number · nullable  
    Ruin chance allowing for how little the record's sample tells.
  - `estimation_premium` number · nullable  
    The second less the first.
  - `lose_all_ever` number · nullable  
    Lundberg bound on ever losing the whole bankroll at the exact rate.
  - `lose_all_ever_allowing_error` number · nullable  
    The same, averaged over the win rate's posterior.
  - `drawdown_p95_units` number · nullable  
    95th percentile of the worst drop over the horizon, units.
  - `down_after_horizon` number · nullable  
    Chance of being down after the horizon.
  - `bankroll_for_ruin_005_units` number · nullable  
    Smallest bankroll whose ruin chance is at most 0.05.
  - `curve` array of object · nullable  
    Ruin chance by bankroll size; null at detail summary.
  - `status` string  
    ok, or too_few (under 30 decisions: closed form only).  
    One of: `ok`, `too_few` (open: new values may be added).
- `staking_plans` object  
  Staking plans replayed over the real bet order (F37, kmath.backtest.staking_replay). The Kelly criterion's fractions and the kelly plan are stake mode: on askkelly.ai only, for a signed-in, attested person; elsewhere null with withheld (D34).
  - `kelly` object  
    The Kelly criterion at the record's win rate and mean price, the Baker-McHale multiple for its sample size and the fraction bet.
    - `full_fraction` number · nullable  
      Full Kelly criterion (stake mode; null off askkelly.ai).
    - `shrink` number · nullable  
      The shrink for the sample size.
    - `honest_fraction` number · nullable  
      The fraction bet: shrink × full, capped; 0 unless the verdict is promising or holds up (stake mode; null off askkelly.ai).
    - `withheld` string  
      Why the stake-mode figures are null.  
      One of: `stake_first_party_only` (open: new values may be added).
  - `plans` array of object  
    Each plan asked for, in the order asked.
    - `plan` string  
      flat, to_win, percent or kelly.  
      One of: `flat`, `to_win`, `percent`, `kelly` (open: new values may be added).
- `risk_adjusted` object  
  Risk-adjusted stats per unit risked (F40, kmath.backtest.risk_adjusted), with 95% intervals from a day-block bootstrap; at detail summary only sharpe_per_bet and profit_factor.
  - `sharpe_per_bet` number · nullable  
    Mean return over its standard deviation, a bet.
  - `profit_factor` number · nullable  
    Units won over units lost (null with no losing bet).
- `caps` object · nullable  
  Exposure caps applied in time order (F39); the record and checks are on the capped ledger.
  - `skipped` integer  
    Bets the caps skipped.
  - `by_reason` object  
    Skipped bets by cap.
  - `uncapped` object  
    The record without the caps.
  - `random_priority_mean_roi` number · nullable  
    Mean ROI over random tie-breaks.
- `rule` object · required  
  The rule and the options it was tested with.
  - `rule_hash` string  
    The rule's identity: SHA-256 of its canonical formula (spacing, case and the order of AND and OR conditions don't change it) with the competition, market, side, bet moment, seasons, season type, stake and price. Detail and tests are not part of it.  
    pattern ^sha256:[0-9a-f]{64}$
  - `translation_id` string  
    The rules:translate result this formula came from (F43), when the request named one.  
    pattern ^tx_[0-9a-hjkmnp-tv-z]{20}$
  - `reads` array of object  
    Every name the rule reads, once.
    - `name` string  
      The attribute, with its relation (opponent.rest_days).
    - `known` string  
      Its moment: static, pregame, edition, close or final (a window's input is read before the game).
    - `windowed` boolean  
      A backward window reads it (earlier games only).
  - `formula_version` string  
    The formula language version the rule was read with (F45).
  - `catalogue_version` string · nullable  
    The stat catalogue version its names were bound against.
- `report` object  
  A shared report's own facts (get_rule_report only, F54).
  - `report_id` string  
    The report.
  - `report_url` string  
    Its page.  
    format uri
  - `visibility` string  
    unlisted or public.  
    One of: `unlisted`, `public` (open: new values may be added).
  - `author_rules_tried` integer  
    The author's rules tried on this market when shared.
  - `shared_at` string  
    When it was shared.  
    format date-time
  - `frozen` boolean  
    Always true.
  - `rerun` object  
    The run's request, to test it again on today's data.
- `report_url` string · nullable  
  A frozen report of this run anyone with the link can open (F54): only when the request asked (share) and the call has an account; else null. share_rule_run makes or changes one later.  
  format uri
- `charts` array of object  
  Only when the request asked (charts) at detail full: equity against the no-skill band, the drawdown and the rolling ROI as Kelly Chart Specs (F47).
- `transfer` object · nullable  
  Other markets and sports (F33): the same rule on its other market and on other leagues, numbers mapped to the same meaning, pooled with DerSimonian-Laird random effects. Evidence beside the verdict, never part of it; these runs don't count toward rules tried. Present only when the request asks for transfer.
  - `status` string  
    measured or na.  
    One of: `measured`, `na` (open: new values may be added).
  - `why` string · nullable  
    Why nothing ran, when nothing did.
  - `options` object  
    The leagues, markets and thresholds asked for.
  - `cells` array of object  
    Each market and league in a fixed order (the other market first, then sibling leagues), never sorted by a result; up to 12.
    - `competition` string  
      The league.
    - `market` string  
      The market.
    - `thresholds` string  
      literal (the rule's own numbers) or quantile (each number moved to the same percentile of its field in this league).  
      One of: `literal`, `quantile` (open: new values may be added).
    - `formula` string  
      The formula this cell ran (quantile cells carry the moved numbers).
    - `seasons` array of string  
      Seasons read, as this league labels them.
    - `mapped` array of object · nullable  
      Quantile cells only.
      - `number` string  
        The number as written.
      - `field` string  
        What it is compared with.
      - `percentile` number · nullable  
        Its percentile in the rule's own league (a fraction).
      - `value` number · nullable  
        The number at the same percentile here.
    - `decisions` integer  
      Wins plus losses.
    - `bets` integer  
      Graded bets.
    - `record` string  
      Wins-losses(-pushes).
    - `units` number · nullable  
      Units won or lost.
    - `roi` number · nullable  
      Units over units risked.
    - `roi_ci95` array of number · nullable  
      ROI's 95% score interval.
    - `se` number · nullable  
      ROI's standard error at 1 unit risked a bet.
    - `p_value` number · nullable  
      The cell's own one-sided p against no skill at its prices.
    - `p_holm` number · nullable  
      Holm's adjusted p across the cells.
    - `pooled` boolean  
      The cell is in the pool (another league, one a league, 10+ decisions).
  - `pooled` object · nullable  
    The pool of the other leagues' cells.
    - `roi` number · nullable  
      Random-effects ROI.
    - `roi_ci95` array of number · nullable  
      Its 95% interval.
    - `se` number · nullable  
      Its standard error.
    - `p_value` number · nullable  
      Two-sided p of the pooled ROI.
    - `i2` number · nullable  
      I²: the share of the spread across leagues beyond chance (a fraction).
    - `tau2` number · nullable  
      τ²: the between-league variance of true ROI.
    - `q` number · nullable  
      Cochran's Q.
    - `cells` integer  
      Cells pooled.
  - `same_direction` object · nullable  
    Pooled cells whose ROI has the rule's own sign.
    - `agree` integer  
      Cells the same way.
    - `cells` integer  
      Cells.
    - `p_value` number · nullable  
      Two-sided sign-test p.
    - `text` string  
      "4 of 5".
  - `not_testable` array of object  
    Leagues and markets left out, with why.
    - `competition` string  
      The league.
    - `market` string · nullable  
      The market.
    - `missing` array of string  
      Fields that league lacks.
    - `why` string  
      Why.
  - `note` string  
    What the panel is and isn't.
- `run_id` string · nullable  
  This run, kept on the account (`run_…`): the same request on the same data is the same run. GET /v1/rules/runs/{run_id} reads it back. Null without an account.  
  pattern ^run_[0-9a-hjkmnp-tv-z]{20}$
- `data_version` string  
  The data the run read: Kelly's lake snapshot (or the data's as-of time). A new snapshot is a new run of the same rule.
- `manifest` object · nullable  
  What this run read and ran, so the same request can be run again and checked against it (ADR-K885). No prices, lines or rows of source data.
  - `version` integer  
    The manifest's own layout version.
  - `code` object  
    The code that graded the run.
    - `engine` integer  
      The tester's revision; it rises with any fix that can move a result on the same data.
    - `release` string · nullable  
      The deployed commit.
    - `formula_version` string · nullable  
      The formula language's version.
    - `catalogue_version` string · nullable  
      The stat catalogue's version.
    - `attributes_sha256` string · nullable  
      A hash of the attribute registry: what each input means and when it is known.
    - `settlement_rules` string · nullable  
      The settlement rules' version.
  - `data` object  
    The data the run read.
    - `version` string  
      The same value as data_version.
    - `snapshots` array of string  
      The lake snapshots read, in order.
    - `one_snapshot` boolean  
      Whether every season was read on one snapshot.
    - `as_of` string · nullable  
      When the read was made (RFC 3339).  
      format date-time
    - `data_through` object  
      How far Kelly's history went, by league.
    - `latest_result` string · nullable  
      The newest game read that had a result.
    - `rows_built_at` string · nullable  
      When the prepared rows were built, where the run read them.  
      format date-time
    - `queries` object  
      Each reviewed lake query the tester reads, with a hash of its text.
  - `request` object  
    The request.
    - `request_hash` string  
      The request's hash.
    - `rule_hash` string  
      The rule's hash.
    - `seed` integer  
      The seed every simulation in the run used.
  - `sources` object  
    Where the run's inputs came from.
    - `prices` object  
      Bets priced, by the source of the line.
    - `inputs` array of object  
      Each input the rule read, with the moment it is known.
      - `name` string  
        The input.
      - `known` string · nullable  
        The moment it is known.
  - `seasons` array of object  
    Each season read.
    - `season` string  
      The season.
    - `rows` integer  
      Team-games in scope.
    - `priced_share` number · nullable  
      The share Kelly holds a price for at the bet moment.
  - `left_out` object  
    Matched games that were not bet, by reason.
  - `sha256` string  
    The hash of this block. Two runs with the same hash read the same data with the same code.
- `since_run` object · nullable  
  Only on a run read back: what has changed in Kelly's tester since the run was kept.
  - `status` string  
    current: nothing that can move its numbers changed. superseded: something did. no_manifest: the run was kept before manifests.  
    One of: `current`, `superseded`, `no_manifest` (open: new values may be added).
  - `engine_changed` boolean · nullable  
    Whether the tester's revision has risen since.
  - `changed` array of object  
    The parts that differ, each with its value then (from) and now (to).
    - `part` string  
      engine, release, formula_language, catalogue, attributes, settlement_rules or queries.
- `tested_at` string  
  When the run was kept (RFC 3339); only on a run read back.  
  format date-time
- `rule_version` object · nullable  
  The saved rule this test was kept under (save, or rule_id): its rule_id, name, version and versions_tried. Null when the test wasn't saved.
  - `rule_id` string · required  
    The saved rule (rl_…).  
    pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$
  - `name` string  
    Its name.
  - `version` integer · required  
    This rule's version under it: the same rule again keeps its version.  
    min 1
  - `new_version` boolean  
    This test made a new version.
  - `versions_tried` integer · required  
    Versions saved under it, this one included.  
    min 1
- `since_saved` object · nullable  
  The saved version's record since it was saved (backtester T6, F50), when the test names its rule_id and repeats that version: verdict v2's since_saved check reads it. Null for a new version (its clock starts now) or an unsaved test.
  - `saved_at` string · nullable  
    When the clock started: the version's save, or the registration (RFC 3339).  
    format date-time
  - `record` string · required  
    Wins-losses(-pushes) since then.
  - `wins` integer  
    Wins.
  - `losses` integer  
    Losses.
  - `pushes` integer  
    Pushes.
  - `decisions` integer · required  
    Wins plus losses.
  - `bets` integer  
    Graded bets.
  - `units` number · required  
    Units won or lost.
  - `roi` number · nullable  
    Units over units risked, a fraction.
  - `clv_mean` number · nullable  
    Mean closing-line value of the bets (null at the close: none by definition).
  - `clv_bets` integer  
    Bets with a closing-line value.
  - `e_value` number · nullable  
    Anytime-valid e-value of the forward bets against no edge at the prices taken (safe to read every day).
  - `max_e_value` number · nullable  
    Its running maximum.
  - `e_threshold` number  
    The e-value that counts as evidence at alpha 0.05 (20).
  - `vs_backtest` object · nullable  
    Is live consistent with the backtest?
    - `win_rate_backtest` number  
      The backtest's win rate.
    - `win_rate_forward` number · nullable  
      The win rate since the save.
    - `p_value_difference` number · nullable  
      Two-sided p-value that the two win rates differ.
    - `method` string · nullable  
      fisher_exact (under 30 forward decisions) or two_proportion_z.
    - `e_value_worse` number  
      E-value that live wins less often than the backtest; 20 or more fails the check.
  - `pending` integer  
    Bets recorded at their bet moment, not yet final.
  - `no_line` integer  
    Matches Kelly held no line for at the bet moment (kept, never skipped).
  - `void` integer  
    Postponed games past the window.
  - `status` string · required  
    The since_saved check: na until min_decisions, then pass or fail.  
    One of: `na`, `pass`, `fail` (open: new values may be added).
  - `min_decisions` integer  
    Forward decisions before the check is judged (30).
  - `last_bet_at` string · nullable  
    The latest bet moment recorded.  
    format date-time
- `tests_on_account` object · nullable  
  Rules this account has tried on this competition and market, this one included (the rules-tried ledger: every distinct rule tested on the site, the API or Kelly MCP, kept for good). The not-luck check adjusts for the larger of this count and the request's own tests. Null when the call has no account.
  - `competition` string · required  
    The competition.
  - `market` string · required  
    The market.
  - `count` integer · required  
    Distinct rules tried.  
    min 1
  - `shown_counted` integer  
    Variants an earlier report showed (its condition-removed forms, nearby numbers and home or away splits) that joined the count because this rule is one of them (audit F6).
- `staking` string  
  How each bet was staked.
- `matched` integer  
  Bets taken.
- `ungraded` integer  
  Bets not yet played.
- `notice` string · required  
  This tests a rule on past games; it isn't a pick.
- `calibration` object · nullable  
  output: probability only. The formula's chances against the market's no-vig close of the same side (moneyline: the team wins; spread: it covers the bet's line), on the newest 30% of the scored team-games (whole days), and the bets it makes at the edge threshold.
  - `formula` string  
    The probability formula as sent.
  - `bet_formula` string  
    The rule it bets: the chance at the bet's own price worth more than the edge threshold (the rule tested, counted and kept).
  - `edge_threshold` number  
    Expected return a bet needs, p × decimal price − 1 (0.02 by default).
  - `basis` string  
    newest_30: scored on the holdout only.  
    One of: `newest_30` (open: new values may be added).
  - `games` integer  
    Games scored.
  - `rows` integer  
    Team-games scored (both teams of a game).
  - `in_sample_rows` integer  
    Team-games before the holdout, not scored.
  - `holdout_from` string · nullable  
    The holdout's first day.
  - `left_out` object  
    Team-games not scored.
    - `pushes` integer  
      Pushes and half results.
    - `outside_0_1` integer  
      Values below 0 or above 1.
    - `no_value` integer  
      Rows the formula gave no number for.
  - `clipped` integer  
    Values of 0 or 1 clipped to 1e-6 from the edge.
  - `brier` number · nullable  
    Brier score of the formula.
  - `brier_market` number · nullable  
    Brier score of the close.
  - `brier_skill` number · nullable  
    1 − formula / close (above 0: the formula scores better).
  - `log_loss` number · nullable  
    Log loss of the formula.
  - `log_loss_market` number · nullable  
    Log loss of the close.
  - `log_loss_skill` number · nullable  
    1 − formula / close.
  - `dm_p_value` number · nullable  
    Diebold–Mariano p on the per-game log-loss difference (two-sided).
  - `dm_statistic` number · nullable  
    The HLN-corrected statistic (positive: the formula's loss is higher).
  - `mcb` number · nullable  
    CORP miscalibration (Brier).
  - `dsc` number · nullable  
    CORP discrimination.
  - `unc` number · nullable  
    Uncertainty; brier = mcb − dsc + unc.
  - `mcb_p_value` number · nullable  
    The MCB test: the chance a calibrated formula looks this miscalibrated (999 resamples).
  - `reliability` array of object · nullable  
    The CORP reliability curve at up to 20 forecast values.
    - `p` number · nullable  
      The formula's probability.
    - `observed` number · nullable  
      How often it happened (PAV fit).
    - `lo` number · nullable  
      90% consistency band, low.
    - `hi` number · nullable  
      90% consistency band, high.
  - `ece` number · nullable  
    Expected calibration error over ten equal-width bins (bin-dependent; for familiarity).
  - `distinct_forecasts` integer  
    Distinct values the formula gave.
  - `slope` number · nullable  
    Calibration slope b in y ~ a + b·logit p (1 is ideal; under 1 overconfident).
  - `slope_se` number · nullable  
    Its game-clustered standard error.
  - `intercept` number · nullable  
    Calibration intercept a (0 is ideal).
  - `encompassing` object · nullable  
    y ~ a + b_q·logit q + b_p·logit p, game-clustered: does the formula know something the close doesn't?
    - `b_model` number · nullable  
      b_p.
    - `b_market` number · nullable  
      b_q.
    - `se_model` number · nullable  
      b_p's standard error.
    - `p_value` number · nullable  
      Two-sided p of b_p.
  - `edge_bins` array of object · nullable  
    Realized results against the formula's edge.
    - `edge` number · nullable  
      Mean of p − q in the bin.
    - `realized_minus_market` number · nullable  
      Mean of y − q in the bin.
    - `rows` integer  
      Team-games in the bin.
  - `status` string  
    The calibrated check: pass, fail or na (under 200 games, or one value).  
    One of: `pass`, `fail`, `na` (open: new values may be added).
  - `value` string  
    The check's line.
  - `statistic` number · nullable  
    The encompassing p.
  - `threshold` number · nullable  
    0.05.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`not_found`](/problems/not_found)

### Example
```http
GET https://api.askkelly.ai/v1/rules/reports/rpt_8kqqvwd602ere4fy0nv6
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "rule_test",
  "clv": {
    "ci95": null,
    "mean": null,
    "note": "Bets at the close have no closing-line value by definition.",
    "basis": "probability",
    "devig": "multiplicative",
    "p_value": null,
    "coverage": 0,
    "beat_rate": null,
    "mean_prob": null,
    "reference": "consensus",
    "mean_points": null,
    "points_bets": 0,
    "points_test": null,
    "sign_test_p": null,
    "closes_stale": 0,
    "profit_slope": null,
    "significance": null,
    "sample_needed": null,
    "beat_rate_ci95": null,
    "bets_with_close": 0,
    "lines_converted": 0,
    "points_coverage": 0,
    "profit_slope_se": null,
    "beat_close_share": null,
    "sample_needed_roi": null,
    "bets_without_close": 1
  },
  "base": {
    "why": "the rule has no who-or-when condition to filter, so its base is the whole market",
    "source": "market",
    "status": "na",
    "formula": null
  },
  "caps": null,
  "luck": {
    "bets": 0,
    "devig": "multiplicative",
    "theta": null,
    "reading": "versus_the_market",
    "left_out": {
      "half": 0,
      "push": 0
    },
    "by_season": [],
    "actual_roi": null,
    "luck_units": null,
    "actual_wins": null,
    "actual_units": null,
    "close_source": "consensus",
    "expected_roi": null,
    "expected_wins": null,
    "luck_se_units": null,
    "expected_units": null,
    "lines_converted": 0,
    "luck_percentile": null,
    "bets_without_prob": 1
  },
  "path": {
    "series": {
      "x": "bet_index",
      "dates": [
        "2025-10-21"
      ],
      "index": [
        1
      ],
      "units": [
        0.91
      ],
      "markers": [
        {
          "at": 1,
          "type": "season",
          "label": "2025-26"
        }
      ],
      "drawdown": [
        0
      ],
      "band_p025": null,
      "band_p975": null,
      "base_units": null,
      "rolling_p025": [
        null
      ],
      "rolling_p975": [
        null
      ],
      "rolling_roi_100": [
        null
      ]
    },
    "downsampled": false,
    "longest_losing_run": 0,
    "max_drawdown_units": 0,
    "expected_max_drawdown_zero_edge": null
  },
  "risk": {
    "seed": 6899137762779026,
    "curve": [],
    "paths": 5000,
    "method": "lundberg+posterior_monte_carlo",
    "status": "too_few",
    "percent": {
      "status": "too_few",
      "drawdown_p95": null,
      "stake_fraction": 0.02,
      "ruin_if_rate_exact": null,
      "ruin_allowing_error": null
    },
    "staking": "flat",
    "warnings": [
      "too_few_decisions"
    ],
    "ruin_share": 0.5,
    "drawdown_p95": null,
    "horizon_bets": 500,
    "lose_all_ever": 0,
    "bankroll_units": 100,
    "stake_fraction": null,
    "down_after_horizon": null,
    "drawdown_p95_units": null,
    "estimation_premium": null,
    "ruin_if_rate_exact": null,
    "ruin_allowing_error": null,
    "ruin_ever_if_rate_exact": 0,
    "bankroll_for_ruin_005_units": null,
    "lose_all_ever_allowing_error": 0.277131008418
  },
  "rule": {
    "side": "rule",
    "price": "consensus",
    "reads": [
      {
        "name": "home",
        "known": "pregame",
        "windowed": false
      }
    ],
    "stake": "risk",
    "market": "spread",
    "formula": "=home",
    "seasons": [
      "2025-26"
    ],
    "rule_hash": "sha256:c9a3bcfd2d08b46b86935391523bd2671a885a30b3b1f15bf69e12c5e399441b",
    "bet_moment": "close",
    "competition": "nba",
    "season_type": "regular",
    "base_formula": null,
    "formula_version": "1.0.0",
    "catalogue_version": "1:0"
  },
  "as_of": "2026-11-06T00:00:00Z",
  "decay": {
    "bets": 1,
    "break": null,
    "cusum": null,
    "window": 50,
    "rolling": [],
    "clv_break": null,
    "decay_ratio": null,
    "known_break": null,
    "roi_newest_30": null,
    "status_reason": "fewer than (100) graded bets",
    "trend_per_100_bets": null
  },
  "noise": {
    "seed": 3397954809,
    "delay": {
      "na": "day-before lines for this league are still loading",
      "bet_moment": "day_before"
    },
    "lines": {
      "runs": 200,
      "roi_p05": 0.9099999999999999,
      "line_prob": 0.5,
      "roi_median": 0.9099999999999999,
      "profitable_runs": 200,
      "profitable_share": 1
    },
    "inputs": null,
    "inputs_na": "the rule compares no numbers",
    "low_power": true
  },
  "stale": false,
  "honest": {
    "roi": -0.04514385341429974,
    "ci80": [
      -0.07077022186419332,
      -0.019517484964406154
    ],
    "prior": {
      "mean": -0.04545450206611379,
      "words": "shrunk toward the market's usual margin of -4.5%",
      "capped": false,
      "closes": 0,
      "source": "margin"
    },
    "tries": 1,
    "shrink": 0.999560632688928,
    "raw_roi": 0.9099999999999999,
    "prior_sd": 0.02,
    "uses_clv": false,
    "prior_mean": -0.04545450206611379,
    "basis_rules": 0,
    "prior_basis": "seed",
    "decay_factor": 0.74,
    "posterior_sd": 0.019995605844174143,
    "selection_adj": 0,
    "stabilizes_at_bets": 2275
  },
  "moment": {
    "target": "the start",
    "rows_aged": 0,
    "bet_moment": "close",
    "age_unknown": 1,
    "rows_priced": 1,
    "stale_price": 0,
    "after_moment": 0,
    "line_sources": {
      "sheet_line": 1
    },
    "max_stale_minutes": 60,
    "max_snapshot_age_minutes": null,
    "median_snapshot_age_minutes": null,
    "floor_minutes_before_oct_2022": 10
  },
  "nearby": {
    "na": "the rule compares no numbers",
    "grid": null,
    "numbers": [],
    "reading": null,
    "roi_p05": null,
    "roi_p95": null,
    "variants": 0,
    "roi_median": null,
    "spike_ratio": null,
    "plateau_share": null,
    "distinct_bet_sets": 0
  },
  "notice": "This tests your rule on past games. It isn't a pick and doesn't rank selections.",
  "run_id": "run_mkytv75qe5a297z7y3af",
  "splits": [
    {
      "roi": 0.9099999999999999,
      "bets": 1,
      "label": "Home",
      "units": 0.9099999999999999,
      "record": "1-0",
      "p_value": 0.5235602094240838,
      "decisions": 1,
      "p_adjusted": 1,
      "shown_rows": 2
    },
    {
      "roi": 0.9099999999999999,
      "bets": 1,
      "label": "Favorite",
      "units": 0.9099999999999999,
      "record": "1-0",
      "p_value": 0.5235602094240838,
      "decisions": 1,
      "p_adjusted": 1,
      "shown_rows": 2
    }
  ],
  "stress": {
    "grid": [
      {
        "roi": 0.9523809523809523,
        "vig": -105,
        "units": 0.9523809523809523,
        "line_shift": 0
      },
      {
        "roi": 0.9523809523809523,
        "vig": -105,
        "units": 0.9523809523809523,
        "line_shift": -0.5
      },
      {
        "roi": 0.9523809523809523,
        "vig": -105,
        "units": 0.9523809523809523,
        "line_shift": -1
      },
      {
        "roi": 0.9090909090909092,
        "vig": -110,
        "units": 0.9090909090909092,
        "line_shift": 0
      },
      {
        "roi": 0.9090909090909092,
        "vig": -110,
        "units": 0.9090909090909092,
        "line_shift": -0.5
      },
      {
        "roi": 0.9090909090909092,
        "vig": -110,
        "units": 0.9090909090909092,
        "line_shift": -1
      },
      {
        "roi": 0.8695652173913042,
        "vig": -115,
        "units": 0.8695652173913042,
        "line_shift": 0
      },
      {
        "roi": 0.8695652173913042,
        "vig": -115,
        "units": 0.8695652173913042,
        "line_shift": -0.5
      },
      {
        "roi": 0.8695652173913042,
        "vig": -115,
        "units": 0.8695652173913042,
        "line_shift": -1
      },
      {
        "roi": 0.8333333333333335,
        "vig": -120,
        "units": 0.8333333333333335,
        "line_shift": 0
      },
      {
        "roi": 0.8333333333333335,
        "vig": -120,
        "units": 0.8333333333333335,
        "line_shift": -0.5
      },
      {
        "roi": 0.8333333333333335,
        "vig": -120,
        "units": 0.8333333333333335,
        "line_shift": -1
      }
    ],
    "flat_110": {
      "roi": 0.9090909090909092,
      "bets": 1,
      "units": 0.9090909090909092,
      "record": "1-0",
      "p_value": 0.5238095238095238,
      "decisions": 1
    },
    "break_even": {
      "decimal_avg": null,
      "line_points": 3,
      "american_avg": null,
      "price_multiplier": 0
    },
    "other_side": {
      "roi": -1,
      "bets": 1,
      "units": -1,
      "record": "0-1",
      "p_value": 1,
      "decisions": 1
    },
    "slippage_mc": null,
    "half_point_worse": {
      "roi": 0.9099999999999999,
      "bets": 1,
      "units": 0.9099999999999999,
      "record": "1-0",
      "p_value": 0.5235602094240838,
      "decisions": 1
    }
  },
  "holdout": null,
  "matched": 1,
  "overall": {
    "roi": 0.9099999999999999,
    "bets": 1,
    "wins": 1,
    "units": 0.9099999999999999,
    "losses": 0,
    "pushes": 0,
    "record": "1-0",
    "roi_ci": {
      "bca": null,
      "level": 0.95,
      "score": [
        -0.6054908095394765,
        0.9099999999999999
      ],
      "method": "score",
      "iid_score": [
        -0.6054908095394765,
        0.9099999999999999
      ],
      "anytime_valid": [
        -0.999045,
        0.9090450000000001
      ],
      "block_bootstrap": null
    },
    "deflated": {
      "dsr": null,
      "psr": null,
      "skew": null,
      "roi_bar": null,
      "kurtosis": null,
      "sample_needed": null,
      "sharpe_per_bet": null,
      "trials_effective": 1,
      "sample_needed_plan": null,
      "sharpe_expected_max": null,
      "sample_needed_single": null,
      "sample_needed_power80": null
    },
    "formulas": [
      "F3.2@1",
      "F12.1@1",
      "F12.3@1",
      "F12.4@1",
      "F36.2@1"
    ],
    "roi_ci95": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "warnings": [
      "fixed_n_p_value",
      "small_sample"
    ],
    "win_rate": 1,
    "decisions": 1,
    "break_even": 0.5235602094240838,
    "units_ci95": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "roi_interval": [
      -0.6054908095394765,
      0.9099999999999999
    ],
    "significance": {
      "z": 0.9539392014169455,
      "null": "break_even",
      "seed": null,
      "sims": null,
      "alpha": 0.05,
      "spa_p": null,
      "tests": 1,
      "method": "exact_binomial",
      "t_stat": null,
      "haircut": null,
      "p_value": 0.5235602094240838,
      "clears_t3": false,
      "p_adjusted": 0.5235602094240838,
      "haircut_roi": null,
      "significant": false,
      "adjust_method": "none",
      "anytime_valid": {
        "max_e": 1.0580125,
        "method": "kelly_betting_mixture",
        "crossed": false,
        "e_value": 1.0580125,
        "p_value": 0.9451684171973394,
        "roi_cs95": [
          -0.999045,
          0.9090450000000001
        ],
        "kelly_fraction": 0.5
      },
      "p_value_exact": 0.5235602094240838,
      "p_value_vs_vig": null,
      "reality_check_p": null,
      "tests_effective": 1,
      "p_value_clustered": 0.17005720935900537,
      "coin_match_per_100": 50,
      "multiple_comparisons": null,
      "no_skill_match_per_100": 52.35602094240838
    },
    "small_sample": true,
    "few_decisions": true,
    "sample_needed": null,
    "over_break_even": 0.47643979057591623
  },
  "seasons": [
    {
      "roi": 0.9099999999999999,
      "bets": 1,
      "wins": 1,
      "units": 0.9099999999999999,
      "losses": 0,
      "pushes": 0,
      "record": "1-0",
      "season": "2025-26",
      "clv_mean": null,
      "win_rate": 1,
      "decisions": 1,
      "break_even": 0.5235602094240838,
      "roi_interval": [
        0.9099999999999999,
        0.9099999999999999
      ],
      "significance": {
        "z": 0.9539392014169455,
        "alpha": 0.05,
        "p_value": 0.5235602094240838,
        "significant": false,
        "anytime_valid": {
          "crossed": false,
          "e_value": 1.0500500000000001,
          "p_value": 0.9523356030665205
        },
        "coin_match_per_100": 50,
        "multiple_comparisons": null,
        "no_skill_match_per_100": 52.35602094240838
      },
      "small_sample": true,
      "few_decisions": true,
      "sample_needed": null,
      "over_break_even": 0.47643979057591623
    }
  ],
  "staking": "flat, 1 unit risked a bet",
  "verdict": {
    "gate": {
      "key": "no_look_ahead",
      "value": "every value the rule reads is known at the bet moment",
      "status": "pass",
      "leak_test": "clean"
    },
    "level": "too_few",
    "checks": [
      {
        "key": "enough_bets",
        "zone": "red",
        "group": "real",
        "label": "Enough bets",
        "value": "(1) decisions are too few to size the sample",
        "status": "fail",
        "statistic": 1,
        "threshold": null
      },
      {
        "key": "not_luck",
        "zone": "red",
        "group": "real",
        "label": "Not just luck",
        "value": "p 0.524",
        "status": "fail",
        "statistic": 0.5235602094240838,
        "threshold": 0.05
      },
      {
        "key": "beats_base",
        "zone": "na",
        "group": "real",
        "label": "Beats its own base",
        "value": "the rule has no who-or-when condition to filter, so its base is the whole market",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "half_point_worse",
        "zone": "na",
        "group": "pressure",
        "label": "Holds ½ point worse",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "nearby_holds",
        "zone": "na",
        "group": "pressure",
        "label": "Nearby thresholds hold",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "not_concentrated",
        "zone": "na",
        "group": "pressure",
        "label": "Not one lucky stretch",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "beats_close",
        "zone": "na",
        "group": "still_working",
        "label": "Beats the close",
        "value": "bets at the close can't beat it",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "still_working",
        "zone": "na",
        "group": "still_working",
        "label": "Still working",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "since_saved",
        "zone": "na",
        "group": "still_working",
        "label": "Since saved",
        "value": "(0) of (30) bets since it was saved",
        "status": "na",
        "statistic": null,
        "threshold": null
      }
    ],
    "passed": 0,
    "version": 2,
    "headline": "Too few bets to judge",
    "applicable": 2,
    "held_back_by": []
  },
  "warm_up": {
    "policy": "as_written",
    "warning": false,
    "windows": [],
    "by_policy": null,
    "short_bets": 0,
    "games_needed": 0
  },
  "without": [],
  "ablation": null,
  "capacity": {
    "books": [],
    "market": "spreads",
    "reason": "Kelly holds no measured spreads limits for nba at this moment yet.",
    "available": false,
    "limits_held": 0,
    "before_start": "0_1h",
    "bets_per_season": null,
    "max_stake_per_bet": null,
    "per_season_at_limit": null
  },
  "coverage": {
    "flow": [
      {
        "rows": 6,
        "step": "in_scope",
        "games": 3
      },
      {
        "rows": 3,
        "step": "rule_true"
      },
      {
        "out": {
          "both_sides": 0,
          "same_game_total": 0
        },
        "rows": 3,
        "step": "one_bet_a_game"
      },
      {
        "out": {
          "no_line": 2
        },
        "rows": 1,
        "step": "priced"
      },
      {
        "out": {
          "void": 0,
          "not_played_yet": 0
        },
        "rows": 1,
        "step": "graded"
      },
      {
        "out": {
          "push": 0
        },
        "rows": 1,
        "step": "decisions"
      }
    ],
    "by_season": [
      {
        "bets": 1,
        "rows": 6,
        "games": 3,
        "season": "2025-26",
        "rule_true": 3,
        "priced_share": 0.3333
      }
    ],
    "inputs_missing": [
      {
        "rows": 6,
        "share": 0,
        "attribute": "home",
        "rows_blank": 0,
        "seasons_blank": []
      }
    ],
    "left_out_differs": {
      "flag": false,
      "kept": 1,
      "max_smd": null,
      "left_out": 2,
      "covariate": null,
      "by_covariate": []
    }
  },
  "left_out": {
    "no_line": 2,
    "both_sides": 0,
    "stale_price": 0
  },
  "manifest": {
    "code": {
      "engine": 8,
      "release": null,
      "formula_version": "1.0.0",
      "settlement_rules": "2026-11-08",
      "attributes_sha256": "0000000000000000",
      "catalogue_version": "1:0"
    },
    "data": {
      "as_of": "2026-11-06T00:00:00Z",
      "queries": {
        "rule_test_games": "0000000000000000"
      },
      "version": "snap_52",
      "snapshots": [
        "snap_52"
      ],
      "data_through": {},
      "one_snapshot": true,
      "latest_result": "2025-10-25T23:00:00Z",
      "rows_built_at": "2026-11-06T00:00:00Z"
    },
    "sha256": "sha256:d78d99c7954d4b2367b7baa69328756b5aa4464bb52ddcb24cdf05a0484557ad",
    "request": {
      "seed": 18147943352127158000,
      "rule_hash": "sha256:c9a3bcfd2d08b46b86935391523bd2671a885a30b3b1f15bf69e12c5e399441b",
      "request_hash": "sha256:13e69ec9c84eb683918ee67e91ae21ac69cc813cfbc4758f625524596be5d3da"
    },
    "seasons": [
      {
        "rows": 6,
        "season": "2025-26",
        "priced_share": 0.3333
      }
    ],
    "sources": {
      "inputs": [
        {
          "name": "home",
          "known": "pregame"
        }
      ],
      "prices": {
        "sheet_line": 1
      }
    },
    "version": 1,
    "left_out": {
      "no_line": 2,
      "both_sides": 0,
      "stale_price": 0
    }
  },
  "ungraded": 0,
  "leak_test": {
    "parts": [],
    "status": "clean",
    "rows_checked": 6,
    "matched_checked": 3,
    "matches_flipped": 0
  },
  "dependence": {
    "se": null,
    "slate": "date",
    "method": "none",
    "se_iid": null,
    "clusters": 1,
    "cluster_by": [
      "slate",
      "team_season"
    ],
    "design_effect": 1,
    "effective_bets": 1
  },
  "robustness": {
    "off": [],
    "seed": 769905824,
    "checks": [
      {
        "key": "half_point_worse",
        "label": "Holds ½ point worse",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "nearby_holds",
        "label": "Holds with nearby numbers",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "not_concentrated",
        "label": "Not one team or season",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      },
      {
        "key": "still_working",
        "label": "Still working",
        "value": "fewer than (30) decided bets",
        "status": "na",
        "statistic": null,
        "threshold": null
      }
    ],
    "fast_path": true,
    "evaluations": 1
  },
  "settlement": {
    "rules": [
      {
        "id": "final_score",
        "text": "Every market grades on the final score as Kelly's score source records it, overtime and extra innings included.",
        "effective_from": "2026-11-06"
      },
      {
        "id": "spread_push",
        "text": "A spread bet whose margin lands exactly on the line pushes: the stake comes back.",
        "effective_from": "2026-11-06"
      },
      {
        "id": "postponed_void",
        "text": "A game with no final score 48 hours after its scheduled start is void: the bet is left out.",
        "effective_from": "2026-11-07"
      },
      {
        "id": "not_played_yet",
        "text": "A game still to be played is listed with no result and left out of every figure.",
        "effective_from": "2026-11-06"
      }
    ],
    "applied": [
      {
        "bets": 1,
        "rule": "final_score"
      }
    ],
    "profile": "kelly_standard",
    "rules_version": "2026-11-08"
  },
  "assumptions": [
    "Each bet is taken at Kelly's consensus close price; games Kelly holds no close line for are left out (2).",
    "Games where the rule matched both teams are left out (0).",
    "One flat unit risked a bet."
  ],
  "monte_carlo": null,
  "since_saved": null,
  "data_through": {},
  "data_version": "snap_52",
  "concentration": {
    "by": [
      {
        "best": null,
        "group": "season",
        "groups": 1,
        "without_best": null,
        "effective_groups": 1,
        "jackknife_roi_se": null,
        "without_best_two": null,
        "p_more_concentrated": null
      },
      {
        "best": null,
        "group": "team",
        "groups": 1,
        "without_best": null,
        "effective_groups": 1,
        "jackknife_roi_se": null,
        "without_best_two": null,
        "p_more_concentrated": null
      },
      {
        "best": null,
        "group": "opponent",
        "groups": 1,
        "without_best": null,
        "effective_groups": 1,
        "jackknife_roi_se": null,
        "without_best_two": null,
        "p_more_concentrated": null
      },
      {
        "best": null,
        "group": "month",
        "groups": 1,
        "without_best": null,
        "effective_groups": 1,
        "jackknife_roi_se": null,
        "without_best_two": null,
        "p_more_concentrated": null
      },
      {
        "best": null,
        "group": "weekday",
        "groups": 1,
        "without_best": null,
        "effective_groups": 1,
        "jackknife_roi_se": null,
        "without_best_two": null,
        "p_more_concentrated": null
      }
    ],
    "bets": 1,
    "units": 0.9099999999999999,
    "trim_top_0_05": null
  },
  "latest_result": "2025-10-25T23:00:00Z",
  "risk_adjusted": {
    "sqn": null,
    "bets": 1,
    "warnings": [
      "no_losing_bets",
      "no_spread_in_returns",
      "small_sample"
    ],
    "ulcer_index": 0,
    "martin_ratio": null,
    "sharpe_daily": null,
    "avg_win_units": 0.9099999999999999,
    "profit_factor": null,
    "avg_loss_units": null,
    "sharpe_per_bet": null,
    "recovery_factor": null,
    "sortino_per_bet": null,
    "sharpe_per_season": null,
    "max_drawdown_units": 0,
    "profit_factor_ci95": null,
    "return_on_drawdown": null,
    "sharpe_per_bet_ci95": null,
    "probabilistic_sharpe": null,
    "sortino_per_bet_ci95": null,
    "current_drawdown_units": 0,
    "expected_units_per_bet": 0.9099999999999999,
    "longest_underwater_bets": 0,
    "longest_underwater_days": 0
  },
  "rows_built_at": "2026-11-06T00:00:00Z",
  "staking_plans": {
    "kelly": {
      "basis": "record",
      "capped": null,
      "shrink": 1,
      "win_rate": 1,
      "withheld": "stake_first_party_only",
      "push_rate": 0,
      "multiplier": null,
      "simultaneous": false,
      "zero_because": "too_few",
      "full_fraction": null,
      "honest_fraction": null,
      "multiplier_rule": "honest"
    },
    "plans": [
      {
        "roi": 0.9099999999999966,
        "bets": 1,
        "plan": "flat",
        "units": 0.9099999999999966,
        "status": "ok",
        "max_drawdown": 0,
        "growth_per_bet": 0.009058844488345926,
        "stopped_at_bet": null,
        "end_bankroll_units": 100.91
      },
      {
        "roi": 0.9099999999999999,
        "bets": 1,
        "plan": "to_win",
        "units": 1,
        "status": "ok",
        "max_drawdown": 0,
        "growth_per_bet": 0.009950330853168092,
        "stopped_at_bet": null,
        "end_bankroll_units": 101
      },
      {
        "roi": 0.9099999999999966,
        "bets": 1,
        "plan": "percent",
        "units": 1.8199999999999932,
        "status": "ok",
        "max_drawdown": 0,
        "growth_per_bet": 0.018036362486098575,
        "stake_fraction": 0.02,
        "stopped_at_bet": null,
        "end_bankroll_units": 101.82
      },
      {
        "plan": "kelly",
        "status": "withheld",
        "withheld": "stake_first_party_only"
      }
    ],
    "percent": 0.02,
    "warnings": [
      "small_sample"
    ],
    "kelly_cap": 0.05,
    "bankroll_units": 100
  },
  "random_baseline": null,
  "split_dimensions": [],
  "matched_both_sides": 0,
  "matched_without_line": 2,
  "tested_at": "2026-10-04T17:30:00Z",
  "report": {
    "report_id": "rpt_8kqqvwd602ere4fy0nv6",
    "report_url": "https://askkelly.ai/rule-tester/r/rpt_8kqqvwd602ere4fy0nv6",
    "visibility": "unlisted",
    "author_rules_tried": 2,
    "shared_at": "2026-10-04T17:30:00Z",
    "frozen": true,
    "rerun": {
      "side": "rule",
      "alpha": 0.05,
      "price": "consensus",
      "stake": "risk",
      "detail": "full",
      "market": "spread",
      "robust": {
        "off": [],
        "line_prob": 0.5,
        "skip_prob": 0,
        "break_date": null,
        "noise_runs": 200,
        "input_scale": 0.1,
        "trim_winners": 0,
        "monte_carlo_mode": "block",
        "monte_carlo_sims": null,
        "random_baseline_sims": 2000
      },
      "sizing": {
        "caps": {
          "priority": "earliest",
          "max_open_stake": null,
          "max_bets_per_day": null,
          "max_bets_per_game": null,
          "daily_stop_loss_units": null,
          "max_bets_per_team_week": null
        },
        "paths": 5000,
        "percent": 0.02,
        "kelly_cap": 0.05,
        "ruin_share": 0.5,
        "horizon_bets": 500,
        "staking_plans": [
          "flat",
          "to_win",
          "percent",
          "kelly"
        ],
        "bankroll_units": 100,
        "kelly_fraction": null
      },
      "teaser": null,
      "formula": "=home",
      "seasons": [
        "2025-26"
      ],
      "warm_up": "as_written",
      "ci_level": 0.95,
      "plan_roi": null,
      "stake_ok": false,
      "bet_moment": "close",
      "competition": "nba",
      "season_type": "regular",
      "base_formula": null
    }
  },
  "bets": [
    {
      "game_key": "gm_1hnx5nrmk4xjpz6fzyfz:tm_b4w5y9xy5f9sgg1cmkvy",
      "game_id": "gm_1hnx5nrmk4xjpz6fzyfz",
      "team_id": "tm_b4w5y9xy5f9sgg1cmkvy",
      "starts_at": "2025-10-21T23:30:00Z",
      "season": "2025-26",
      "market": "spread",
      "bet_moment": "close",
      "result": "win",
      "units": 0.91,
      "units_to_date": 0.91
    }
  ],
  "charts": [
    {
      "kcs": 1,
      "kind": "equity",
      "title": "Units, bet by bet",
      "data": {
        "key": "bet",
        "columns": [
          {
            "id": "bet",
            "type": "int",
            "label": "Bet"
          },
          {
            "id": "date",
            "type": "date",
            "label": "Date"
          },
          {
            "id": "units",
            "type": "float",
            "label": "Units",
            "unit": "units",
            "format": "+.2f"
          }
        ],
        "rows": [
          {
            "bet": 1,
            "date": "2025-10-21",
            "units": 0.91
          }
        ]
      },
      "x": {
        "field": "bet",
        "type": "quantitative",
        "title": "Bet number",
        "units": []
      },
      "y": {
        "field": "units",
        "type": "quantitative",
        "title": "Units",
        "units": []
      },
      "series": [
        {
          "field": "units",
          "role": "market",
          "label": "Your rule",
          "dash": false
        }
      ],
      "bands": [],
      "intervals": [],
      "rules": [
        {
          "y": 0,
          "role": "zero"
        }
      ],
      "tooltip": [
        "bet",
        "date",
        "units"
      ],
      "summary": "Units over (1) bets end at +0.9.",
      "provenance": {
        "tool": "test_rule",
        "engine": "ruletest 8",
        "as_of": "2026-11-06T00:00:00Z",
        "sources": [
          "kelly"
        ]
      },
      "rights": {
        "export_rows": true,
        "export_columns_blocked": []
      }
    },
    {
      "kcs": 1,
      "kind": "underwater",
      "title": "Drawdown from the peak",
      "data": {
        "key": "bet",
        "columns": [
          {
            "id": "bet",
            "type": "int",
            "label": "Bet"
          },
          {
            "id": "date",
            "type": "date",
            "label": "Date"
          },
          {
            "id": "drawdown",
            "type": "float",
            "label": "Below the peak",
            "unit": "units",
            "format": "+.2f"
          }
        ],
        "rows": [
          {
            "bet": 1,
            "date": "2025-10-21",
            "drawdown": 0
          }
        ]
      },
      "x": {
        "field": "bet",
        "type": "quantitative",
        "title": "Bet number",
        "units": []
      },
      "y": {
        "field": "drawdown",
        "type": "quantitative",
        "title": "Units below the peak",
        "units": []
      },
      "series": [
        {
          "field": "drawdown",
          "role": "market",
          "label": "Below the peak",
          "dash": false
        }
      ],
      "bands": [],
      "intervals": [],
      "rules": [
        {
          "y": 0,
          "role": "zero"
        }
      ],
      "tooltip": [
        "bet",
        "date",
        "drawdown"
      ],
      "summary": "The deepest drawdown was 0.0 units; the longest losing run (0) bets.",
      "provenance": {
        "tool": "test_rule",
        "engine": "ruletest 8",
        "as_of": "2026-11-06T00:00:00Z",
        "sources": [
          "kelly"
        ]
      },
      "rights": {
        "export_rows": true,
        "export_columns_blocked": []
      }
    }
  ],
  "summary": "Too few bets to judge: honest forward ROI -4.5%, 1-0 against the spread, 2025-26, +0.9 units, +91.0% ROI past (0 of 2 checks passed).",
  "has_more": false,
  "next_cursor": null,
  "source": "kelly",
  "attribution": null,
  "request_id": "req_45e792ee6c71434c2737d1dc",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

```http
GET https://api.askkelly.ai/v1/rules/reports/rpt_zzzzzzzzzzzzzzzzzzzz
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/not_found",
  "title": "Not found",
  "status": 404,
  "code": "not_found",
  "detail": "No shared report with that ID.",
  "param": "report_id",
  "doc_url": "https://docs.askkelly.ai/problems/not_found",
  "request_id": "req_e7bac8c330c92e060e233cba",
  "retryable": false,
  "display_message": "That could not be found."
}
```

`GET /v1/rules/runs`

## List the rule tests you ran
public, no key needed · 0 credits, not charged during the beta · MCP tool `list_rule_runs` · status live

Your kept rule tests, newest first, a page at a time: each rule, its options, record, units, ROI, p-value, honest forward ROI and verdict. Every run is listed, so the rules you tried are honest; nothing is sorted by a result.

### Parameters
- `competition` string · query  
  Only this competition's runs.  
  min length 2 · max length 32
- `limit` integer · query  
  Runs a page (default 50).  
  min 1 · max 200
- `cursor` string · query  
  next_cursor from the previous page.  
  max length 120

### Response
`200` The rule runs facts.

- `object` string · required  
  rule_runs.  
  One of: `rule_runs` (open: new values may be added).
- `runs` array of object · required  
  Runs, newest first.
  - `run_id` string  
    The run.
  - `tested_at` string  
    When.  
    format date-time
  - `data_version` string  
    The data it read.
  - `rule_id` string · nullable  
    The saved rule it was kept under.
  - `version` integer · nullable  
    Its version there.
  - `formula` string · nullable  
    The rule.
  - `competition` string · nullable  
    Competition.
  - `market` string · nullable  
    Market.
  - `side` string · nullable  
    rule or fade.
  - `bet_moment` string · nullable  
    Bet moment.
  - `seasons` array of string · nullable  
    Seasons.
  - `bets` integer · nullable  
    Bets.
  - `record` string · nullable  
    W-L-P.
  - `units` number · nullable  
    Units.
  - `roi` number · nullable  
    ROI.
  - `p_value` number · nullable  
    The record's p-value.
  - `honest_roi` number · nullable  
    Honest forward ROI.
  - `verdict_level` string · nullable  
    Verdict level.
  - `headline` string · nullable  
    Verdict headline.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found)

### Example
```http
GET https://api.askkelly.ai/v1/rules/runs?limit=5
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "rule_runs",
  "runs": [
    {
      "run_id": "run_rc69h189x95wy5rhfet2",
      "tested_at": "2026-10-04T17:30:00Z",
      "data_version": "snap_52",
      "rule_id": null,
      "version": null,
      "formula": "=home",
      "competition": "nba",
      "market": "spread",
      "side": "rule",
      "bet_moment": "close",
      "seasons": [
        "2025-26"
      ],
      "bets": 1,
      "record": "1-0",
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "p_value": 0.5235602094240838,
      "honest_roi": -0.04514385341429974,
      "verdict_level": "too_few",
      "headline": "Too few bets to judge"
    },
    {
      "run_id": "run_mkytv75qe5a297z7y3af",
      "tested_at": "2026-10-04T17:30:00Z",
      "data_version": "snap_52",
      "rule_id": null,
      "version": null,
      "formula": "=home",
      "competition": "nba",
      "market": "spread",
      "side": "rule",
      "bet_moment": "close",
      "seasons": [
        "2025-26"
      ],
      "bets": 1,
      "record": "1-0",
      "units": 0.9099999999999999,
      "roi": 0.9099999999999999,
      "p_value": 0.5235602094240838,
      "honest_roi": -0.04514385341429974,
      "verdict_level": "too_few",
      "headline": "Too few bets to judge"
    },
    {
      "run_id": "run_ewabjhkycqv5zk6mvbkn",
      "tested_at": "2026-10-04T17:30:00Z",
      "data_version": "snap_52",
      "rule_id": null,
      "version": null,
      "formula": "=AND(home, rest_days >= 1)",
      "competition": "nba",
      "market": "spread",
      "side": "rule",
      "bet_moment": "close",
      "seasons": [
        "2025-26"
      ],
      "bets": 0,
      "record": "0-0",
      "units": 0,
      "roi": null,
      "p_value": null,
      "honest_roi": null,
      "verdict_level": "too_few",
      "headline": "No bets"
    }
  ],
  "summary": "(3) of your kept rule tests, newest first.",
  "assumptions": [],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-10-04T17:30:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_8f944202e84f29465c532c17",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`GET /v1/trends`

## List trends that survived screening
public, no key needed · 0 credits, not charged during the beta · MCP tool `list_trends` · status live

Kelly's nightly trend screen for one league and market (backtester T8, F42): every condition and pair of conditions from a fixed list, bet at the consensus close on the seasons but the newest two, charged with Benjamini-Yekutieli at q 0.10 over every rule ever screened there, then replicated on the newest two seasons. Each trend's record, raw and shrunk ROI, p and q, its replication, its status and its record since it was first found; the counts of rules screened, discovered and replicated beside it. Listed by formula, never ranked; never a pick.

### Parameters
- `competition` string · query · required  
  The league: nfl, ncaaf, nba, ncaab, wnba, nhl, mlb.  
  One of: `nfl`, `ncaaf`, `nba`, `ncaab`, `wnba`, `nhl`, `mlb` (open: new values may be added).
- `market` string · query  
  spread (default), moneyline, over or under.  
  One of: `spread`, `moneyline`, `over`, `under` (open: new values may be added).
- `status` string · query  
  Only trends with this status: replicated, waiting_for_bets or not_replicated.  
  One of: `replicated`, `waiting_for_bets`, `not_replicated` (open: new values may be added).

### Response
`200` The trends facts.

- `object` const · required  
  Always trends.  
  Always `"trends"`.
- `competition` string  
  The league.
- `market` string  
  The market.
- `bet_moment` string  
  close: every bet at Kelly's consensus close.  
  One of: `close` (open: new values may be added).
- `run_id` string · nullable  
  The screen's run (tr_…); null before the first run.  
  pattern ^tr_[0-9a-z_]{1,80}$
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `candidates_screened` integer  
  Rules ever screened in this league and market: the m the false discovery rate is charged on. It only grows.
- `screened_this_run` integer  
  Rules this run screened.
- `fdr_q` number · nullable  
  The Benjamini-Yekutieli level (0.10).
- `discovered` integer  
  Rules that passed the false discovery bar.
- `replicated` integer  
  Of those listed, how many held up on the newest two seasons.
- `expected_false` number  
  About how many discoveries are false: q × discovered.
- `train_seasons` array of string  
  Seasons screened.
- `replicate_seasons` array of string  
  Seasons held back for replication.
- `market_roi` number · nullable  
  The market's own ROI at these prices on the training seasons (every side bet).
- `trends` array of object  
  The trends, by formula (near-duplicates collapsed to the more general).
  - `formula` string  
    The rule, a formula test_rule runs as written.
  - `decisions` integer  
    Decisions on the training seasons.
  - `record` string  
    Its record on the training seasons.
  - `units` number  
    Units on the training seasons.
  - `roi_observed` number · nullable  
    Its raw ROI on the training seasons.
  - `roi_shrunk` number · nullable  
    The ROI shown: shrunk toward the market's own ROI at these prices (empirical Bayes); always between the two.
  - `p_value` number · nullable  
    One-sided p on the training seasons, before the search is charged.
  - `q_value` number · nullable  
    Benjamini-Yekutieli q over every rule ever screened in this league and market.
  - `replication` object  
    Its record on the newest two seasons, which screening never saw.
    - `record` string  
      Wins-losses(-pushes).
    - `decisions` integer  
      Wins plus losses.
    - `units` number  
      Units won or lost, one unit risked a bet.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      One-sided p against no skill at these prices.
  - `status` string  
    replicated (p 0.05 or under, ROI at least 0, same sign), waiting_for_bets (under 40 decisions so far) or not_replicated.  
    One of: `replicated`, `waiting_for_bets`, `not_replicated` (open: new values may be added).
  - `found_on` string  
    The day the screen first found it.  
    format date
  - `since_found` object · nullable  
    Its record on games after it was first found.
    - `record` string  
      Wins-losses(-pushes).
    - `decisions` integer  
      Wins plus losses.
    - `units` number  
      Units won or lost, one unit risked a bet.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      One-sided p against no skill at these prices.
- `notice` string  
  A trend is a test of the past, never a pick.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled)

### Example
```http
GET https://api.askkelly.ai/v1/trends?competition=nfl&market=parlay
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "code": "invalid_request",
  "detail": "market: 'parlay' is not one of ['spread', 'moneyline', 'over', 'under']",
  "param": "market",
  "doc_url": "https://docs.askkelly.ai/problems/invalid_request",
  "request_id": "req_b59411a65d0e307e81a90272",
  "retryable": false,
  "display_message": "Something in that request was not understood."
}
```

```http
GET https://api.askkelly.ai/v1/trends?competition=nfl&market=spread
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "trends",
  "competition": "nfl",
  "market": "spread",
  "bet_moment": "close",
  "run_id": null,
  "as_of": "2026-10-04T17:30:00Z",
  "candidates_screened": 0,
  "screened_this_run": 0,
  "fdr_q": null,
  "discovered": 0,
  "replicated": 0,
  "expected_false": 0,
  "train_seasons": [],
  "replicate_seasons": [],
  "market_roi": null,
  "trends": [],
  "notice": "Rules found by screening past games, charged for every rule screened. A trend is a test of the past, never a pick.",
  "summary": "No trend run yet for NFL spread: the nightly screen hasn't covered it.",
  "assumptions": [
    "Each trend bets every match at Kelly's consensus close, one unit a bet.",
    "The ROI shown is shrunk toward the market's own ROI at these prices; the raw ROI is beside it.",
    "Listed by formula, never ranked."
  ],
  "has_more": false,
  "next_cursor": null,
  "source": "kelly",
  "attribution": null,
  "request_id": "req_3e850b991a33fb89b458b782",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-10-04T17:30:00Z

`POST /v1/trends:audit`

## Audit a published trend
public, no key needed · 1 credit, not charged during the beta · MCP tool `audit_trend` · status live

A trend someone published, re-tested (backtester T8, F42 audit): its words written as a rule formula (as POST /v1/rules:translate writes them; one question back when they read two ways, and nothing runs), the formula tested as POST /v1/rules:test tests it, the claimed record and ROI (or the record at -110) beside Kelly's with the difference, and the record on games after the publication date. A claim with a publication date is tested as one pre-registered rule and isn't counted toward your rules tried; without one it counts like any test. Kelly holds closes from June 2020. Never a pick.

### Parameters
Body, `application/json` (required):

- `text` string  
  The trend as it was published, in its own words (or a formula starting with =), up to 1,000 characters.  
  min length 1 · max length 1000
- `competition` string  
  The competition's slug: nfl, nba, mlb, nhl, ncaaf, ncaab, wnba, epl...  
  pattern ^[a-z0-9_]{2,24}$
- `claimed_record` string  
  The record the trend claims, such as 60-40 or 60-40-2 (wins, losses, pushes).  
  pattern ^\s*\d{1,6}\s*-\s*\d{1,6}(\s*-\s*\d{1,6})?\s*$
- `claimed_roi` number  
  The ROI the trend claims, as a fraction (0.08 is 8%); left out, the claimed record at -110.  
  min -1 · max 100
- `published_on` string  
  When the trend was published, YYYY-MM-DD: the record since counts games after it.  
  format date
- `market` string  
  spread, moneyline, over, under or draw; left out, the market the words name (spread when they name none).  
  One of: `spread`, `moneyline`, `over`, `under`, `draw` (open: new values may be added).
- `side` string  
  rule or fade; left out, what the words say.  
  One of: `rule`, `fade` (open: new values may be added).
- `seasons` array of string  
  Seasons to test (default: every season Kelly holds).  
  min items 1 · max items 25
- `from_season` string  
  First season, e.g. 1999 or 1999-00.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `to_season` string  
  Last season.  
  pattern ^[0-9]{4}(-[0-9]{2})?$
- `season_type` string  
  regular (default), postseason or both.  
  One of: `regular`, `postseason`, `both` (open: new values may be added).

### Response
`200` The trend audit facts.

- `object` const · required  
  Always trend_audit.  
  Always `"trend_audit"`.
- `status` string  
  tested; needs_answer (the words read two ways: answer the translation's question); not_testable (the words can't be a rule: see the translation's problems).  
  One of: `tested`, `needs_answer`, `not_testable` (open: new values may be added).
- `claim` object  
  The claim as sent.
  - `text` string  
    The trend's words.
  - `claimed_record` string · nullable  
    The claimed record, normalised (60-40 or 60-40-2).
  - `claimed_roi` number · nullable  
    The claimed ROI as sent.
  - `published_on` string · nullable  
    The publication date.  
    format date
- `translation` object  
  The words as a formula (translate_rule's facts; the formula, readback and translation_id once tested).
  - `formula` string · nullable  
    The formula.
  - `readback` string · nullable  
    The formula in plain English, written by template.
  - `translation_id` string · nullable  
    The translation's id, kept with the test.
  - `question` string · nullable  
    One question when the words read two ways (needs_answer).
  - `problems` array of object  
    Why the words can't be a rule (not_testable).
- `formula` string · nullable  
  The formula tested.
- `claim_check` object · nullable  
  The claim beside Kelly's record; null without a claimed record or ROI.
  - `claimed_record` string · nullable  
    The claimed record.
  - `claimed_roi` number · nullable  
    The claim's ROI: as claimed, or the claimed record at -110.
  - `claimed_roi_basis` string  
    as claimed, or the claimed record at -110.  
    One of: `as claimed`, `the claimed record at -110` (open: new values may be added).
  - `kelly_record` string · nullable  
    Kelly's record on the formula.
  - `kelly_roi` number · nullable  
    Kelly's ROI at its consensus prices.
  - `claim_inflation_roi` number · nullable  
    The claim's ROI minus Kelly's.
- `since_published` object · nullable  
  The record on games after the publication date: the part nobody could have mined; null without published_on.
  - `from` string  
    The first day counted.  
    format date
  - `first_game` string · nullable  
    The first game counted.
  - `record` string  
    Wins-losses(-pushes).
  - `decisions` integer  
    Wins plus losses.
  - `units` number  
    Units won or lost, one unit risked a bet.
  - `roi` number · nullable  
    Units over units risked.
- `coverage` object  
  What Kelly could check.
  - `seasons_tested` array of string  
    Seasons tested.
  - `held_from` string  
    The first close Kelly holds.  
    format date
  - `note` string  
    Seasons before then can't be checked.
- `test` object · nullable  
  The formula's full rule test, as test_rule returns it, without the bets list; null when nothing ran.
  - `verdict` object  
    Verdict v2: the leak gate, nine checks in three groups and the headline.
    - `version` integer  
      2.
    - `headline` string · required  
      The verdict in words.
    - `gate` object  
      The leak gate: a rule reading anything not known at the bet moment is refused first; leak_test is the cut-data rerun's status (clean or not_run).
    - `held_back_by` array of string  
      Why a rule with no failed check isn't holds_up (honest forward ROI at or under 0, PBO over 0.5 across 10 or more variants).
    - `level` string · required  
      too_few, no_profit, no_evidence, luck, promising or holds_up.  
      One of: `too_few`, `no_profit`, `no_evidence`, `luck`, `promising`, `holds_up` (open: new values may be added).
    - `passed` integer · required  
      Checks passed.
    - `applicable` integer · required  
      Checks that apply.
    - `checks` array of object · required  
      The checks, in a fixed order.
      - `key` string · required  
        The check; a teaser keeps v1's six (newest_30, seasons_won, price_worse among them).  
        One of: `enough_bets`, `not_luck`, `beats_base`, `half_point_worse`, `nearby_holds`, `not_concentrated`, `beats_close`, `still_working`, `since_saved`, `calibrated`, `newest_30`, `seasons_won`, `price_worse` (open: new values may be added).
      - `group` string  
        real (is it real?), pressure or still_working; not on a teaser's checks.  
        One of: `real`, `pressure`, `still_working` (open: new values may be added).
      - `label` string · required  
        The check, in words.
      - `status` string · required  
        pass, fail or na (it can't apply).  
        One of: `pass`, `fail`, `na` (open: new values may be added).
      - `zone` string  
        green, yellow (within one standard error of the threshold), red, or na.  
        One of: `green`, `yellow`, `red`, `na` (open: new values may be added).
      - `value` string · required  
        The figure behind it, in words.
      - `statistic` number | integer · nullable  
        The number the check compares.
      - `threshold` number | integer · nullable  
        What it is compared with.
      - `basis` string  
        seasons_won or newest_30 while the full check is still being built; points when Beats the close is judged on points beaten (audit F3).
  - `overall` object  
    Every graded bet.
    - `record` string  
      Wins-losses(-pushes).
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `bets` integer  
      Graded bets.
    - `decisions` integer  
      Wins plus losses.
    - `units` number · nullable  
      Units won or lost.
    - `roi` number · nullable  
      Units over units risked.
    - `roi_interval` array of number · nullable  
      ROI's 95% interval at 1 unit risked a bet.
    - `win_rate` number · nullable  
      Wins over decisions.
    - `break_even` number · nullable  
      The win rate that breaks even at these prices.
    - `significance` object · nullable  
      The record test (kmath.records.record_test) and verdict v2's statistics (kmath.significance): the p-value, adjusted for the rules tried, and the anytime-valid test.
      - `p_value` number · nullable  
        The larger of the exact and the clustered one-sided p against no skill at these prices (F12, F23).
      - `method` string · nullable  
        exact_binomial, exact_simulation, saddlepoint or z_score.
      - `z` number · nullable  
        The score z: units over the square root of Σ(d − 1).
      - `t_stat` number · nullable  
        The t statistic with the sample variance.
      - `p_value_exact` number · nullable  
        The exact (or z) tail alone.
      - `p_value_clustered` number · nullable  
        The tail with bets clustered by slate and team-season (F23).
      - `p_value_vs_vig` number · nullable  
        Against a random bet at the no-vig close (needs closes).
      - `p_adjusted` number · nullable  
        The p-value adjusted for the rules tried (Romano-Wolf on the ledger's rules, Bonferroni on the count otherwise; F14).
      - `adjust_method` string · nullable  
        romano_wolf, holm or none.
      - `tests` integer · nullable  
        Rules tried in this family, this one included.
      - `tests_effective` number · nullable  
        Effective tests (Li-Ji): near-duplicate rules count as fewer.
      - `reality_check_p` number · nullable  
        White's Reality Check p (when the ledger holds the rules' units).
      - `spa_p` number · nullable  
        Hansen's SPA p (when the ledger holds the rules' units).
      - `clears_t3` boolean · nullable  
        z at or above 3 (Harvey-Liu-Zhu's bar).
      - `haircut` number · nullable  
        Harvey-Liu haircut: the share of the ROI the rules tried take away.
      - `haircut_roi` number · nullable  
        ROI after the haircut, per decision.
      - `anytime_valid` object · nullable  
        The record as a bet against no skill (F17): e-value, anytime p, ROI range.
        - `e_value` number · nullable  
          The e-value now.
        - `p_value` number · nullable  
          1 over the largest e-value so far.
        - `max_e` number · nullable  
          The largest e-value along the path.
        - `roi_cs95` array of number · nullable  
          An ROI range valid at every bet.
    - `roi_ci95` array of number · nullable  
      ROI's 95% score interval, clustered (F13, F23).
    - `units_ci95` array of number · nullable  
      Units' 95% interval: decisions times the ROI interval.
    - `roi_ci` object · nullable  
      ROI intervals at ci_level: score (the one shown), BCa, block bootstrap over slates and anytime-valid (F13).
    - `deflated` object · nullable  
      Per-bet Sharpe, PSR and DSR at the effective tests, and the bets needed: deflated (sample_needed), single test and 80% power, each times the design effect (F15).
      - `sample_needed` integer · nullable  
        Decisions needed, deflated for the rules tried; null with no edge to prove.
      - `sample_needed_single` integer · nullable  
        Decisions needed for one rule tried.
      - `sample_needed_power80` integer · nullable  
        Decisions for 80% power at this ROI.
      - `sample_needed_plan` integer · nullable  
        Decisions for 80% power at plan_roi.
      - `dsr` number · nullable  
        Deflated Sharpe ratio.
      - `psr` number · nullable  
        Probabilistic Sharpe ratio.
    - `sample_needed` object · nullable  
      Bets needed to tell this win rate from break-even (one-sided, with 80% power, ...).
    - `small_sample` boolean  
      Under 30 decisions.
    - `few_decisions` boolean  
      Under 5 decisions.
  - `honest` object · nullable  
    The honest forward ROI (F22, the headline ROI): empirical Bayes toward a prior mean (the rule's own closing-line value when at least half its bets have a close, else the usual two-way margin), less the winner's curse for the rules tried and the out-of-sample decay.
    - `roi` number · nullable  
      Honest forward ROI.
    - `ci80` array of number · nullable  
      80% range.
    - `raw_roi` number · nullable  
      The past ROI per decision, beside it.
    - `prior_mean` number · nullable  
      The prior mean the ROI is shrunk toward (prior.source says which).
    - `prior_sd` number · nullable  
      The spread of true ROIs (0.02 until fitted on the ledger).
    - `shrink` number · nullable  
      Weight on the prior, se²/(se² + τ²).
    - `selection_adj` number · nullable  
      Winner's-curse correction for the rules tried.
    - `decay_factor` number · nullable  
      Out-of-sample decay on the excess (0.74).
    - `stabilizes_at_bets` integer · nullable  
      Decisions at which the record and the prior weigh the same.
    - `uses_clv` boolean  
      The prior mean is the rule's own closing-line value.
    - `prior_basis` string  
      fitted (prior_sd from the ledger's fit) or seed.
    - `prior` object  
      Where the prior mean comes from.
      - `source` string  
        clv (the rule's mean closing-line value), margin (the two-way margin, -4.55%) or fitted.
      - `mean` number · nullable  
        The prior mean used.
      - `closes` integer  
        Decided bets with a no-vig close.
      - `capped` boolean  
        A closing-line value above 0 was held at 0: under 50 bets have a close.
      - `words` string  
        The prior, said plainly.
  - `dependence` object · nullable  
    Bets clustered by slate (the date; the week in the NFL and college football) and team-season (F23).
    - `clusters` integer  
      Slates.
    - `design_effect` number  
      Clustered over iid variance.
    - `effective_bets` integer  
      Decisions over the design effect (at least 1).
    - `method` string  
      cr1_twoway, cr1_slate, cr1_larger_oneway, wild_bootstrap or wild_bootstrap_webb.
  - `base` object · nullable  
    The rule against the rest of its own base (F19): the who-or-when conditions alone, or base_formula.
    - `formula` string · nullable  
      The base, or null for the whole market.
    - `source` string  
      auto, user or market.  
      One of: `auto`, `user`, `market` (open: new values may be added).
    - `status` string  
      measured or na.  
      One of: `measured`, `na` (open: new values may be added).
    - `roi` number · nullable  
      The base's ROI per decision.
    - `lift` number · nullable  
      Rule ROI less base ROI.
    - `p_value_vs_base` number · nullable  
      Season-stratified permutation p of the rule within its base.
    - `units_from_base` number · nullable  
      Units the base alone would have made on the rule's stakes.
    - `units_from_filter` number · nullable  
      The rule's units less units_from_base.
  - `clv` object  
    Closing-line value as evidence (F21): each bet's no-vig CLV, q_close x price - 1, on bets Kelly holds a close for. Empty when betting at the close.
    - `bets_with_close` integer  
      Bets with a close.
    - `bets_without_close` integer  
      Bets without one.
    - `reference` string  
      The close used: consensus (the no-vig average across books).
    - `devig` string  
      How the vig was removed: multiplicative.
    - `lines_converted` integer  
      Bets whose close was carried from the closing line to the bet's line (NFL spreads and totals).
    - `coverage` number · nullable  
      Share of bets with a close probability (null with no bets).
    - `closes_stale` integer  
      Closes left out as older than 60 minutes at the start, or seen after it (audit F9): those bets keep their result but have no CLV.
    - `points_coverage` number · nullable  
      Share of bets with points beaten (spreads and totals).
    - `points_test` object · nullable  
      The clustered test on points beaten (audit F3).
      - `bets` integer  
        Bets with points beaten.
      - `mean` number · nullable  
        Mean points the bet's line beat the close by.
      - `std_error_clustered` number · nullable  
        Standard error clustered by slate and team-season.
      - `df_clustered` integer  
        Degrees of freedom: the fewer clusters less one.
      - `ci95_clustered` array of number · nullable  
        Clustered 95% interval.  
        min items 2 · max items 2
      - `p_value_clustered` number · nullable  
        One-sided p of mean points beaten > 0.
      - `cluster_method` string  
        How the standard error was clustered.
    - `basis` string  
      What Beats the close is judged on: probability, or points when under 80% of bets have a close probability and more have points beaten (audit F3).  
      One of: `probability`, `points` (open: new values may be added).
    - `mean` number · nullable  
      Mean CLV (fraction): the bets' expected ROI if the close is right.
    - `ci95` array of number · nullable  
      Clustered 95% interval on the mean.  
      min items 2 · max items 2
    - `p_value` number · nullable  
      One-sided clustered p of mean CLV > 0.
    - `beat_close_share` number · nullable  
      Share of bets with CLV above 0, ties counted.
    - `beat_rate` number · nullable  
      Share of bets that beat the close, ties left out.
    - `beat_rate_ci95` array of number · nullable  
      Wilson 95% interval on beat_rate.  
      min items 2 · max items 2
    - `sign_test_p` number · nullable  
      Exact one-sided sign test against half.
    - `mean_prob` number · nullable  
      Mean of the close's no-vig probability less the bet moment's.
    - `mean_points` number · nullable  
      Mean points the bet's line beat the closing line by (spreads and totals).
    - `points_bets` integer  
      Bets mean_points is over.
    - `profit_slope` number · nullable  
      Per-bet units regressed on CLV: near 1 when CLV turned into profit.
    - `profit_slope_se` number · nullable  
      Its slate-clustered standard error.
    - `sample_needed` integer · nullable  
      Bets CLV needs for a 95% interval to clear 0 at this mean and spread (null unless the mean is above 0).
    - `sample_needed_roi` integer · nullable  
      Bets profit would need at the same edge.
    - `significance` object · nullable  
      The CLV mean's tests (null under two bets).
      - `t` number · nullable  
        Mean over its iid standard error.
      - `ci95` array of number · nullable  
        Student 95% interval (iid).  
        min items 2 · max items 2
      - `std_error` number · nullable  
        iid standard error.
      - `bets_needed` number · nullable  
        Bets a t of 2 needs at this mean and spread.
      - `std_error_clustered` number · nullable  
        Standard error clustered by slate and team-season (F23).
      - `df_clustered` integer  
        Degrees of freedom: the fewer clusters less one.
      - `ci95_clustered` array of number · nullable  
        Clustered 95% interval.  
        min items 2 · max items 2
      - `p_value_clustered` number · nullable  
        One-sided p of mean CLV > 0 (wild cluster bootstrap under 42 slates, else Student t); beats_close reads it.
      - `cluster_method` string  
        How the standard error was clustered.
      - `design_effect` number · nullable  
        Clustered variance over iid variance.
    - `note` string  
      Why the block is empty, when it is.
  - `luck` object  
    The luck-adjusted result (F20): the units the market's fair probabilities expected the decided bets to make against what they made. Pushes count zero both ways.
    - `reading` string  
      luck (bets before the close: the gap is outcome noise) or versus_the_market (bets at the close: the gap is the rule's edge on the closing market).  
      One of: `luck`, `versus_the_market` (open: new values may be added).
    - `close_source` string  
      consensus.
    - `devig` string  
      multiplicative.
    - `bets` integer  
      Decided bets with a fair probability.
    - `bets_without_prob` integer  
      Decided bets without one.
    - `left_out` object  
      Bets left out.
      - `push` integer  
        Pushes.
      - `half` integer  
        Half results (quarter lines).
    - `lines_converted` integer  
      Bets whose close was carried to the bet's line.
    - `expected_units` number · nullable  
      Sum of stake x (q x (price - 1) - (1 - q)).
    - `actual_units` number · nullable  
      Units the bets made.
    - `luck_units` number · nullable  
      actual_units less expected_units.
    - `luck_se_units` number · nullable  
      luck's standard error given the probabilities.
    - `expected_wins` number · nullable  
      Sum of q.
    - `actual_wins` integer · nullable  
      Wins.
    - `luck_percentile` number · nullable  
      Where the wins sit among the market's (Poisson-binomial, mid-p): 0.95 is luckier than (95) of (100) identical paths.
    - `expected_roi` number · nullable  
      expected_units over units risked.
    - `actual_roi` number · nullable  
      actual_units over units risked.
    - `theta` number · nullable  
      Per-bet units regressed on expected units (30 bets or more): near 1 when the close is calibrated on these bets.
    - `by_season` array of object  
      Each season, in calendar order; luck_units add up to the total.
      - `season` string  
        Season.
      - `bets` integer  
        Decided bets with a probability.
      - `expected_units` number  
        Units the market expected.
      - `actual_units` number  
        Units made.
      - `luck_units` number  
        actual_units less expected_units.
  - `capacity` object · nullable  
    F8: the limits Kelly measured at the bet moment (ADR-K783); evidence beside the verdict, never in it. No book publishes its limits, so only measured ones are shown.
    - `available` boolean  
      Whether measured limits are shown for this market and moment.
    - `market` string · nullable  
      The market as line history names it (spreads, totals, h2h).
    - `before_start` string · nullable  
      The time before the start the bet moment falls in.  
      One of: `0_1h`, `1_12h`, `12_36h`, `36_72h`, `72h_plus` (open: new values may be added).
    - `books` array of object  
      Per book, highest median first.
      - `book` string · nullable  
        The book as the vendor names it.
      - `vendor` string · nullable  
        Who measured it.
      - `currency` string · nullable  
        The stake currency, null when the vendor doesn't say.
      - `median` number · nullable  
        The median limit.
      - `p25` number · nullable  
        Its 25th percentile.
      - `p75` number · nullable  
        Its 75th percentile.
      - `min` number · nullable  
        The smallest.
      - `max` number · nullable  
        The largest.
      - `snapshots` integer  
        Limit readings behind it.
      - `games` integer  
        Games behind it.
      - `first_seen` string · nullable  
        The first reading's date.
      - `last_seen` string · nullable  
        The last reading's date.
    - `max_stake_per_bet` object · nullable  
      The highest book median: the most one book typically took on one bet.
      - `book` string · nullable  
        The book.
      - `amount` number · nullable  
        The median limit.
      - `currency` string · nullable  
        Its currency.
    - `per_season_at_limit` number · nullable  
      max_stake_per_bet times the rule's bets a season.
    - `bets_per_season` number · nullable  
      The rule's bets a season.
    - `limits_held` integer  
      Limit readings Kelly holds for this market and moment.
    - `reason` string · nullable  
      Why none are shown, when available is false.
  - `stress` object  
    The same bets graded harder.
    - `half_point_worse` object · nullable  
      Every line half a point worse (none for moneylines).
      - `record` string  
        Wins-losses(-pushes).
      - `bets` integer  
        Bets graded or not.
      - `decisions` integer  
        Wins plus losses.
      - `wins` integer  
        Wins.
      - `losses` integer  
        Losses.
      - `pushes` integer  
        Pushes.
      - `units` number · nullable  
        Units won or lost at the staking asked for.
      - `roi` number · nullable  
        Units over units risked.
      - `p_value` number · nullable  
        The record's own p-value against no skill at its prices.
      - `p_adjusted` number · nullable  
        On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
      - `shown_rows` integer  
        On splits and condition-removed rows: the rows p_adjusted counts.
    - `flat_110` object · nullable  
      Every bet at -110 (none for moneylines).
      - `record` string  
        Wins-losses(-pushes).
      - `bets` integer  
        Bets graded or not.
      - `decisions` integer  
        Wins plus losses.
      - `wins` integer  
        Wins.
      - `losses` integer  
        Losses.
      - `pushes` integer  
        Pushes.
      - `units` number · nullable  
        Units won or lost at the staking asked for.
      - `roi` number · nullable  
        Units over units risked.
      - `p_value` number · nullable  
        The record's own p-value against no skill at its prices.
      - `p_adjusted` number · nullable  
        On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
      - `shown_rows` integer  
        On splits and condition-removed rows: the rows p_adjusted counts.
    - `other_side` object  
      The other side of every bet.
      - `record` string  
        Wins-losses(-pushes).
      - `bets` integer  
        Bets graded or not.
      - `decisions` integer  
        Wins plus losses.
      - `wins` integer  
        Wins.
      - `losses` integer  
        Losses.
      - `pushes` integer  
        Pushes.
      - `units` number · nullable  
        Units won or lost at the staking asked for.
      - `roi` number · nullable  
        Units over units risked.
      - `p_value` number · nullable  
        The record's own p-value against no skill at its prices.
      - `p_adjusted` number · nullable  
        On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
      - `shown_rows` integer  
        On splits and condition-removed rows: the rows p_adjusted counts.
    - `break_even` object · nullable  
      F7: how much worse the price or line can get before the profit is gone.
      - `price_multiplier` number · nullable  
        The share of each payout (d - 1) that breaks even (under 1: the room to spare).
      - `american_avg` number · nullable  
        The flat American price that breaks even.
      - `decimal_avg` number · nullable  
        The same, decimal.
      - `line_points` number · nullable  
        The most points worse (in halves, up to 3) the line could be with a profit left; 0 when none; null for moneylines.
    - `grid` array of object · nullable  
      F7: the bets at -105 to -120 with the line 0 to 1 point worse (moneylines: payouts cut 0-6%); left out at detail summary.
      - `vig` integer · nullable  
        Every bet at this American price.
      - `line_shift` number · nullable  
        Points the line moved (negative: worse).
      - `price_multiplier` number · nullable  
        Moneylines: the share of each payout kept.
      - `units` number · nullable  
        Units.
      - `roi` number · nullable  
        ROI.
    - `slippage_mc` object · nullable  
      F7: each bet's line worsened by a draw from the market's own Monday-to-close moves, 1,000 seeded runs; null without such moves.
      - `runs` integer  
        Runs.
      - `roi_p05` number · nullable  
        5th percentile ROI.
      - `roi_p50` number · nullable  
        Median ROI.
      - `profitable_share` number · nullable  
        Share of runs with a profit.
      - `moves_from` integer  
        Line moves the draws come from.
      - `move_median` number · nullable  
        Their median size, points.
    - `price_worse` object · nullable  
      Teasers: every ticket ten cents worse (price_american). Racing: every bet's winnings 5% smaller.
      - `record` string  
        Wins-losses(-pushes).
      - `bets` integer  
        Bets graded or not.
      - `decisions` integer  
        Wins plus losses.
      - `wins` integer  
        Wins.
      - `losses` integer  
        Losses.
      - `pushes` integer  
        Pushes.
      - `units` number · nullable  
        Units won or lost at the staking asked for.
      - `roi` number · nullable  
        Units over units risked.
      - `p_value` number · nullable  
        The record's own p-value against no skill at its prices.
      - `p_adjusted` number · nullable  
        On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
      - `shown_rows` integer  
        On splits and condition-removed rows: the rows p_adjusted counts.
  - `legs` object · nullable  
    Teasers: every teased leg, judged against the per-leg break-even (1/D)^(1/n).
    - `record` string  
      Legs won-lost(-pushed).
    - `decisions` integer  
      Legs won plus lost.
    - `cover_rate` number · nullable  
      Legs won over legs decided.
    - `break_even_per_leg` number  
      The cover rate a leg needs at the ticket's price.
    - `significance` object · nullable  
      The legs' record test against the per-leg break-even.
    - `sample_needed` object · nullable  
      Legs needed to tell this cover rate from the break-even.
  - `teaser` object · nullable  
    Teasers: the options tested. Prices are assumed: Kelly holds no historical teaser prices.
    - `points` number  
      Points each leg moved.
    - `legs` integer  
      Legs a ticket.
    - `price` object  
      The ticket's price (American and decimal).
    - `reduced_prices` object  
      Prices for tickets reduced by a pushed leg, by legs left (American).
    - `push` string  
      reduce, lose or ticket_push.  
      One of: `reduce`, `lose`, `ticket_push` (open: new values may be added).
    - `pairing` string  
      all_pairs or chronological.  
      One of: `all_pairs`, `chronological` (open: new values may be added).
    - `leg_market` string  
      spread, over or under.  
      One of: `spread`, `over`, `under` (open: new values may be added).
    - `break_even_per_leg` number  
      (1/D)^(1/n) at the ticket's price.
    - `price_assumed` boolean  
      Always true: the price is the person's or a common book table.
    - `tickets` integer  
      Tickets formed.
  - `random_baseline` object · nullable  
    F18: the rule against random bets of the same count on the same games, matched by season and price bucket.
    - `sims` integer  
      Random rules drawn.
    - `bets` integer  
      The rule's bets.
    - `pool` integer  
      Bets the market offered.
    - `percentile` number · nullable  
      Share of random rules with a lower ROI.
    - `beats_per_100` integer  
      Random rules out of 100 the rule beats.
    - `p_value` number · nullable  
      (1 + random rules at or above) / (sims + 1).
    - `analytic_p` number · nullable  
      The finite-population normal cross-check.
    - `random_roi_median` number · nullable  
      Median random ROI (about minus the vig).
    - `random_roi_p05` number · nullable  
      5th percentile random ROI.
    - `random_roi_p95` number · nullable  
      95th percentile.
    - `best_of_tests` object  
      Would the best of M random rules (M = rules tried) do this well?
      - `tests` integer  
        M.
      - `p_value` number · nullable  
        1 - F(ROI)^M.
    - `histogram` object · nullable  
      Random ROIs in 30 bins (edges, counts); full detail only.
  - `decay` object · nullable  
    F24: is the rule still making money? Rolling ROI and CLV, one unknown break (sup-F, block permutation p), a CUSUM alarm, a known-date test, the trend and the decay ratio.
    - `bets` integer  
      Graded bets.
    - `window` integer · nullable  
      Rolling window, bets.
    - `rolling` array of object · nullable  
      Up to 200 points; full detail only.
    - `break` object · nullable  
      The most likely date the edge changed.
      - `at` string  
        Date.
      - `bet_index` integer  
        Bets before it.
      - `sup_f` number · nullable  
        sup-F.
      - `p_value` number · nullable  
        Block permutation p-value.
      - `at_edge` boolean  
        Within the first or last 15%: not a confirmed break.
      - `roi_before` number · nullable  
        ROI before.
      - `roi_after` number · nullable  
        ROI after.
      - `bets_after` integer  
        Bets after.
    - `cusum` object · nullable  
      Page's lower CUSUM alarm.
    - `known_break` object · nullable  
      A Chow test at break_date.
    - `trend_per_100_bets` number · nullable  
      Profit per bet's change per 100 bets (1 unit risked).
    - `decay_ratio` number · nullable  
      ROI after the break (or the newest 30%) over ROI before.
    - `clv_break` object · nullable  
      The break test on CLV.
    - `roi_newest_30` number · nullable  
      ROI of the newest 30% of bets.
  - `ablation` object · nullable  
    F27: each top-level AND condition's Shapley share of the units beyond the base's ROI.
    - `base` object  
      Every game with a line: decisions and ROI.
    - `total` number · nullable  
      The rule's units beyond the base's ROI (the Shapley values add up to it).
    - `clauses` array of object  
      One a condition, in the order written.
      - `condition` string  
        The condition.
      - `shapley_units` number · nullable  
        Its share of the extra units.
      - `share` number · nullable  
        Of the total.
      - `label` string  
        dead, harmful, load_bearing or helps.  
        One of: `dead`, `harmful`, `load_bearing`, `helps` (open: new values may be added).
      - `fix` object · nullable  
        Remove it: the rule without it.
    - `pairs` array of object  
      Pairs (up to 6 conditions).
    - `method` string  
      exact or sampled.  
      One of: `exact`, `sampled` (open: new values may be added).
  - `nearby` object · nullable  
    F28: every number in the rule moved two steps each way (steps fixed by the field).
    - `numbers` array of object  
      The rule's numbers.
    - `variants` integer  
      Variants in the grid.
    - `distinct_bet_sets` integer  
      Variants with their own bets.
    - `roi_median` number · nullable  
      Median ROI of the variants.
    - `roi_p05` number · nullable  
      5th percentile.
    - `roi_p95` number · nullable  
      95th percentile.
    - `plateau_share` number · nullable  
      Share of one-step neighbours that made money.
    - `spike_ratio` number · nullable  
      (ROI - median) / IQR of the variants.
    - `reading` string · nullable  
      plateau, slope or spike.
    - `na` string · nullable  
      Why there are no numbers to move.
  - `monte_carlo` object · nullable  
    F31: drawdowns and losing runs the same bets give in other orders.
    - `sims` integer  
      Simulations.
    - `mode` string  
      block, iid or permutation.
    - `max_drawdown_units` object  
      Max drawdown, units.
      - `p05` number · nullable  
        5th percentile.
      - `p50` number · nullable  
        Median.
      - `p95` number · nullable  
        95th percentile.
      - `actual` number · nullable  
        The real order's figure.
    - `longest_losing_run` object  
      Longest losing run, bets.
      - `p05` number · nullable  
        5th percentile.
      - `p50` number · nullable  
        Median.
      - `p95` number · nullable  
        95th percentile.
      - `actual` number · nullable  
        The real order's figure.
    - `final_units` object  
      Final units.
      - `p05` number · nullable  
        5th percentile.
      - `p50` number · nullable  
        Median.
      - `p95` number · nullable  
        95th percentile.
      - `actual` number · nullable  
        The real order's figure.
    - `prob_below_zero` number · nullable  
      Share of runs finishing below zero.
    - `worst_100_bets_units_p05` number · nullable  
      5th percentile of the worst 100-bet stretch.
  - `noise` object · nullable  
    F32: jittered inputs, lines moved half a point either way, and an earlier bet moment.
    - `inputs` object · nullable  
      The rule's compared numbers jittered.
      - `runs` integer  
        Runs.
      - `profitable_runs` integer  
        Runs with a profit.
      - `profitable_share` number · nullable  
        Share.
      - `roi_median` number · nullable  
        Median ROI.
      - `roi_p05` number · nullable  
        5th percentile ROI.
      - `overlap_median` number · nullable  
        Median Jaccard overlap of the bets with the rule's.
    - `lines` object · nullable  
      Lines (moneylines: payouts) moved at random.
    - `delay` object · nullable  
      The rule bet at the earlier moment.
  - `concentration` object · nullable  
    F34: the profit without the best season, team, opponent, month and weekday.
    - `by` array of object  
      Groupings in a fixed order.
      - `group` string  
        season, team, opponent, month or weekday.
      - `best` object · nullable  
        The best group (3+ bets).
      - `without_best` object · nullable  
        The rule without it.
      - `effective_groups` number · nullable  
        1 / Herfindahl of the profitable groups' shares.
      - `p_more_concentrated` number · nullable  
        Permutation p-value (teams and opponents).
    - `trim_top_0_05` object · nullable  
      Without the top 5% of bets (moneylines) or bet-days.
  - `split_dimensions` array of object · nullable  
    F35: the rule by fixed dimensions with shrunk ROI and intervals.
    - `dimension` string  
      The dimension.
    - `heterogeneity_p` number · nullable  
      Chi-square p-value of win rates across its levels.
    - `heterogeneity_q` number · nullable  
      Benjamini-Hochberg q across the dimensions.
    - `real_difference` boolean  
      q < 0.10.
    - `where_profit` string · nullable  
      The level with the most shrunk extra units, when real.
    - `cells` array of object · nullable  
      Levels in a fixed order; full detail only.
  - `robustness` object  
    The suite's run: the verdict v2 checks it feeds and its seed.
    - `checks` array of object  
      half_point_worse, nearby_holds, not_concentrated and still_working.
      - `key` string · required  
        The check.  
        One of: `half_point_worse`, `nearby_holds`, `not_concentrated`, `still_working` (open: new values may be added).
      - `label` string · required  
        The check, in words.
      - `status` string · required  
        pass, fail or na.  
        One of: `pass`, `fail`, `na` (open: new values may be added).
      - `value` string · required  
        The figure behind it, in words.
      - `statistic` number · nullable  
        The figure the status compares.
      - `threshold` number · nullable  
        What it is compared with.
    - `fast_path` boolean  
      The rule's numbers were re-bet from its compiled columns.
    - `seed` integer  
      The seed (a hash of the rule and its options).
    - `evaluations` integer  
      Formula evaluations the suite ran.
    - `off` array of string  
      Blocks switched off.
  - `path` object  
    The units path in date order: drawdown and longest losing run; at detail full its series (F47).
    - `max_drawdown_units` number  
      The deepest fall from a peak, units.
    - `longest_losing_run` integer  
      Most losses in a row (pushes don't break it).
    - `series` object · nullable  
      Bet-indexed lines of the graded bets (detail full): `index` the bet numbers kept (past 600 bets thinned by LTTB, the deepest drawdown always kept), `dates`, `units`, `drawdown`, `base_units` (the market base's ROI at the same stakes, null unless measured), `band_p025` and `band_p975` (the no-skill range: 1,000 seeded runs of the same bets at their fair chances; null under 20 bets or for racing), `rolling_roi_100` with its no-skill range `rolling_p025` and `rolling_p975`, and `markers` (season starts, the holdout).
      - `x` string  
        Always bet_index.  
        One of: `bet_index` (open: new values may be added).
      - `index` array of integer  
        Bet numbers (1 is the first graded bet).
      - `dates` array of string  
        Each kept bet's date (YYYY-MM-DD, UTC).
      - `units` array of number  
        Units to date.
      - `drawdown` array of number  
        Units below the running peak (0 or below).
      - `base_units` array of number · nullable  
        The market base at the same stakes.
      - `band_p025` array of number · nullable  
        No-skill 2.5th percentile.
      - `band_p975` array of number · nullable  
        No-skill 97.5th percentile.
      - `rolling_roi_100` array of number  
        ROI over the last 100 bets (null before).
      - `rolling_p025` array of number  
        Its no-skill 2.5th percentile.
      - `rolling_p975` array of number  
        Its no-skill 97.5th percentile.
      - `markers` array of object  
        Where each season and the holdout start.
        - `type` string  
          season or holdout.  
          One of: `season`, `holdout` (open: new values may be added).
        - `at` integer  
          The bet number it starts at.
        - `label` string · nullable  
          The season, or newest 30%.
    - `downsampled` boolean  
      The series were thinned to 600 points.
    - `expected_max_drawdown_zero_edge` number · nullable  
      The median deepest drawdown of the no-skill runs, units.
  - `holdout` object · nullable  
    The latest 30% of bets against the earlier 70%.
  - `seasons` array of object  
    Seasons in calendar order.
  - `splits` array of object · nullable  
    Home, away, favorite, underdog and line bands, in a fixed order; null at detail summary.
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
  - `without` array of object · nullable  
    One row a top-level AND condition: the rule's record without it; null at detail summary.
    - `record` string  
      Wins-losses(-pushes).
    - `bets` integer  
      Bets graded or not.
    - `decisions` integer  
      Wins plus losses.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `units` number · nullable  
      Units won or lost at the staking asked for.
    - `roi` number · nullable  
      Units over units risked.
    - `p_value` number · nullable  
      The record's own p-value against no skill at its prices.
    - `p_adjusted` number · nullable  
      On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
    - `shown_rows` integer  
      On splits and condition-removed rows: the rows p_adjusted counts.
    - `p_value_vs_rule` number · nullable  
      The rule against the bets the condition removes (F19).
    - `p_value_vs_rule_adjusted` number · nullable  
      p_value_vs_rule, Holm-adjusted over the conditions shown.
  - `bets` array of object  
    Every bet in date order (left out at detail summary).
    - `key` string  
      {game_id}:{team_id} (racing: {race_id}:{runner_id}).
    - `starts_at` string  
      Kickoff (RFC 3339).  
      format date-time
    - `season` string  
      The season.
    - `label` string  
      Date, team and opponent.
    - `price` object · nullable  
      The price at the bet moment, decimal.
    - `line` number · nullable  
      The bet's line as graded (the team's spread, the total).
    - `result` string · nullable  
      win, loss or push (soccer quarter lines: half_win or half_loss); null until played.
    - `close_prob` number · nullable  
      The fair closing probability of the same side, for CLV.
    - `units_to_date` number  
      Units after this bet, in date order.
    - `how_graded` string · nullable  
      How the bet was graded, in words.
    - `units` number · nullable  
      Units the bet won or lost at the run's staking (racing: its exact profit or loss with dead heats, each way, Rule 4 and commission); null until played.
    - `drawdown_to_date` number · nullable  
      Units to date less their running peak (0 or below); null until played.
    - `side` string · nullable  
      home or away (spread, moneyline), over, under or draw.
    - `market` string  
      The market graded (the other total when fading a total).
    - `bet_moment` string  
      When the bet was taken: edition, day_before or close.
    - `clv_prob` number · nullable  
      The fair closing chance less the fair chance at the bet moment, when Kelly holds both.
    - `sample` string · nullable  
      holdout for the latest 30% of graded bets by time, else in_sample; null with no holdout or until played.  
      One of: `in_sample`, `holdout` (open: new values may be added).
    - `why` array of object  
      Why it matched: up to six conditions (F46).
      - `clause` string  
        The condition as written.
      - `value` number | boolean | string · nullable  
        The compared expression's number for a comparison (rest_days - opponent.rest_days for rest_days - opponent.rest_days >= 3), else true or false.
    - `settlement` array of string  
      The settlement rules that decided the bet (IDs in settlement.rules).
  - `leak_test` object  
    The leak test (F3): the rule and each part of it evaluated again on a sample of rows with the data cut at the bet moment. A leak refuses the test (422 rule_not_testable, problem leak_found), so a report always says clean or not_run.
    - `status` string · required  
      clean, leak_found or not_run.  
      One of: `clean`, `leak_found`, `not_run` (open: new values may be added).
    - `rows_checked` integer · required  
      Rows rebuilt at the bet moment.
    - `matched_checked` integer  
      Of them, rows the rule matched.
    - `matches_flipped` integer  
      Rows whose match changed with the data cut.
    - `parts` array of object · required  
      Parts that changed, in the formula's order (empty when clean).
      - `name` string  
        The part, as written (rule is the whole rule).
      - `rows_changed` integer  
        Rows where it changed.
      - `max_change` number · nullable  
        The largest change in a number.
      - `example` string  
        One changed row, {game_id}:{team_id}.
  - `warm_up` object  
    The warm-up check (F4): bets taken before the rule's windows had the earlier games they read (one season at a time; windows never reach into last season).
    - `policy` string  
      The policy graded in the report.  
      One of: `as_written`, `require_full` (open: new values may be added).
    - `games_needed` integer  
      Earlier games every window needs (0: the rule has no window).
    - `windows` array of object  
      Each window in the formula's order.
      - `expr` string  
        The window, as written.
      - `games_needed` integer · nullable  
        Earlier games it reads (null: season to date).
      - `short_rows` integer  
        Rows in scope with fewer earlier games this season.
      - `short_bets` integer  
        Bets the rule took with fewer.
    - `short_bets` integer  
      Bets taken with a window short.
    - `by_policy` array of object · nullable  
      as_written, then require_full; null when the rule has no window.
      - `record` string  
        Wins-losses(-pushes).
      - `bets` integer  
        Bets graded or not.
      - `decisions` integer  
        Wins plus losses.
      - `wins` integer  
        Wins.
      - `losses` integer  
        Losses.
      - `pushes` integer  
        Pushes.
      - `units` number · nullable  
        Units won or lost at the staking asked for.
      - `roi` number · nullable  
        Units over units risked.
      - `p_value` number · nullable  
        The record's own p-value against no skill at its prices.
      - `p_adjusted` number · nullable  
        On splits and condition-removed rows: p_value adjusted (Holm) for every such row the report shows.
      - `shown_rows` integer  
        On splits and condition-removed rows: the rows p_adjusted counts.
    - `warning` boolean  
      Short bets are over 10% of the bets, or leaving them out moves ROI by more than half its 95% interval's half-width.
  - `settlement` object  
    How bets were settled (F9): Kelly's own grading rules as data, and each rule's bets.
    - `profile` string  
      The rules profile (kelly_standard).
    - `rules_version` string  
      The rules table's date.
    - `applied` array of object  
      Rules that decided at least one bet, in table order.
      - `rule` string  
        Rule ID.
      - `bets` integer  
        Bets.
    - `rules` array of object  
      The rules for this league and market.
      - `id` string  
        Rule ID.
      - `text` string  
        The rule in words.
      - `effective_from` string  
        The date Kelly's grader took it up.
  - `coverage` object  
    Coverage (F10): from every game in scope to the bets graded, each season's priced share, blank inputs and whether the rows left out for no line differ from the bets kept.
    - `flow` array of object  
      The steps in order; rule_true rows = decisions + every row out after it.
      - `step` string  
        in_scope, rule_true, one_bet_a_game, full_windows, priced, graded or decisions.
      - `games` integer  
        Games (in_scope only).
      - `rows` integer  
        Rows.
      - `out` object  
        Rows that left at this step, by reason.
    - `by_season` array of object  
      Every season asked for, in order.
      - `season` string  
        Season.
      - `games` integer  
        Games in scope.
      - `rows` integer  
        Rows.
      - `rule_true` integer  
        Rows the rule matched.
      - `bets` integer  
        Bets graded.
      - `priced_share` number · nullable  
        Share of rows with a price at the bet moment.
    - `inputs_missing` array of object  
      Inputs read bare on the row, with blanks.
      - `attribute` string  
        The input.
      - `rows_blank` integer  
        Rows with no value.
      - `share` number · nullable  
        Share of rows in scope.
    - `left_out_differs` object  
      Rows left out for no line against the bets kept: standardized mean difference over home, neutral site and rest days; flagged over 0.1 with 10 or more left out.
      - `flag` boolean  
        They differ.
      - `max_smd` number · nullable  
        The largest difference.
      - `covariate` string · nullable  
        Where it is.
      - `left_out` integer  
        Rows.
      - `kept` integer  
        Rows.
      - `by_covariate` array of object  
        Each covariate's difference.
  - `moment` object  
    The bet moment's clock (F5): its target time, the prices' snapshot age at it and where the lines came from.
    - `bet_moment` string  
      edition, day_before or close.
    - `target` string · nullable  
      The moment's time for a game, in words.
    - `max_stale_minutes` integer  
      Oldest price kept, in minutes before the target.
    - `floor_minutes_before_oct_2022` integer  
      The limit's floor for games before October 2022 (the Odds API's 10-minute snapshots).
    - `rows_priced` integer  
      Rows the rule took that had a price.
    - `rows_aged` integer  
      Rows whose price carries its snapshot time and was kept.
    - `median_snapshot_age_minutes` number · nullable  
      Median minutes from snapshot to target, kept rows.
    - `max_snapshot_age_minutes` number · nullable  
      Oldest kept snapshot, in minutes before the target.
    - `stale_price` integer  
      Rows left out: price older than max_stale_minutes.
    - `after_moment` integer  
      Rows left out: price seen after the target.
    - `age_unknown` integer  
      Rows kept whose price has no snapshot time (Kelly's own frozen lines).
    - `line_sources` object  
      Kept rows by line source (sheet_line, odds_api_early, odds_api_close).
  - `left_out` object  
    Games the rule matched but didn't bet.
    - `no_line` integer  
      No Kelly line at the bet moment.
    - `both_sides` integer  
      The rule matched both teams.
    - `stale_price` integer  
      The price was older than max_stale_minutes at the bet moment, or seen after it (F5).
    - `unpaired` integer  
      Teasers: legs left off a ticket (a week with too few, or the leftover in chronological pairing).
    - `no_price` integer  
      Racing: runners with no price to settle at.
    - `non_runners` integer  
      Racing: non-runners (void).
    - `void_races` integer  
      Racing: abandoned or void races.
  - `risk` object  
    Risk of ruin (F36, kmath.backtest.rule_ruin): the chance of losing ruin_share of the bankroll within horizon_bets bets betting like the record, with its win rate taken as exact and allowing for its sample (a Beta posterior draw a path); the Lundberg bound; the bankroll curve.
    - `bankroll_units` number  
      Bankroll in units.
    - `ruin_share` number  
      Share of the bankroll whose loss counts as ruin.
    - `horizon_bets` integer  
      Bets ahead.
    - `ruin_if_rate_exact` number · nullable  
      Ruin chance if the record's win rate were exact.
    - `ruin_allowing_error` number · nullable  
      Ruin chance allowing for how little the record's sample tells.
    - `estimation_premium` number · nullable  
      The second less the first.
    - `lose_all_ever` number · nullable  
      Lundberg bound on ever losing the whole bankroll at the exact rate.
    - `lose_all_ever_allowing_error` number · nullable  
      The same, averaged over the win rate's posterior.
    - `drawdown_p95_units` number · nullable  
      95th percentile of the worst drop over the horizon, units.
    - `down_after_horizon` number · nullable  
      Chance of being down after the horizon.
    - `bankroll_for_ruin_005_units` number · nullable  
      Smallest bankroll whose ruin chance is at most 0.05.
    - `curve` array of object · nullable  
      Ruin chance by bankroll size; null at detail summary.
    - `status` string  
      ok, or too_few (under 30 decisions: closed form only).  
      One of: `ok`, `too_few` (open: new values may be added).
  - `staking_plans` object  
    Staking plans replayed over the real bet order (F37, kmath.backtest.staking_replay). The Kelly criterion's fractions and the kelly plan are stake mode: on askkelly.ai only, for a signed-in, attested person; elsewhere null with withheld (D34).
    - `kelly` object  
      The Kelly criterion at the record's win rate and mean price, the Baker-McHale multiple for its sample size and the fraction bet.
      - `full_fraction` number · nullable  
        Full Kelly criterion (stake mode; null off askkelly.ai).
      - `shrink` number · nullable  
        The shrink for the sample size.
      - `honest_fraction` number · nullable  
        The fraction bet: shrink × full, capped; 0 unless the verdict is promising or holds up (stake mode; null off askkelly.ai).
      - `withheld` string  
        Why the stake-mode figures are null.  
        One of: `stake_first_party_only` (open: new values may be added).
    - `plans` array of object  
      Each plan asked for, in the order asked.
      - `plan` string  
        flat, to_win, percent or kelly.  
        One of: `flat`, `to_win`, `percent`, `kelly` (open: new values may be added).
  - `risk_adjusted` object  
    Risk-adjusted stats per unit risked (F40, kmath.backtest.risk_adjusted), with 95% intervals from a day-block bootstrap; at detail summary only sharpe_per_bet and profit_factor.
    - `sharpe_per_bet` number · nullable  
      Mean return over its standard deviation, a bet.
    - `profit_factor` number · nullable  
      Units won over units lost (null with no losing bet).
  - `caps` object · nullable  
    Exposure caps applied in time order (F39); the record and checks are on the capped ledger.
    - `skipped` integer  
      Bets the caps skipped.
    - `by_reason` object  
      Skipped bets by cap.
    - `uncapped` object  
      The record without the caps.
    - `random_priority_mean_roi` number · nullable  
      Mean ROI over random tie-breaks.
  - `rule` object  
    The rule and the options it was tested with.
    - `rule_hash` string  
      The rule's identity: SHA-256 of its canonical formula (spacing, case and the order of AND and OR conditions don't change it) with the competition, market, side, bet moment, seasons, season type, stake and price. Detail and tests are not part of it.  
      pattern ^sha256:[0-9a-f]{64}$
    - `translation_id` string  
      The rules:translate result this formula came from (F43), when the request named one.  
      pattern ^tx_[0-9a-hjkmnp-tv-z]{20}$
    - `reads` array of object  
      Every name the rule reads, once.
      - `name` string  
        The attribute, with its relation (opponent.rest_days).
      - `known` string  
        Its moment: static, pregame, edition, close or final (a window's input is read before the game).
      - `windowed` boolean  
        A backward window reads it (earlier games only).
    - `formula_version` string  
      The formula language version the rule was read with (F45).
    - `catalogue_version` string · nullable  
      The stat catalogue version its names were bound against.
  - `report` object  
    A shared report's own facts (get_rule_report only, F54).
    - `report_id` string  
      The report.
    - `report_url` string  
      Its page.  
      format uri
    - `visibility` string  
      unlisted or public.  
      One of: `unlisted`, `public` (open: new values may be added).
    - `author_rules_tried` integer  
      The author's rules tried on this market when shared.
    - `shared_at` string  
      When it was shared.  
      format date-time
    - `frozen` boolean  
      Always true.
    - `rerun` object  
      The run's request, to test it again on today's data.
  - `report_url` string · nullable  
    A frozen report of this run anyone with the link can open (F54): only when the request asked (share) and the call has an account; else null. share_rule_run makes or changes one later.  
    format uri
  - `charts` array of object  
    Only when the request asked (charts) at detail full: equity against the no-skill band, the drawdown and the rolling ROI as Kelly Chart Specs (F47).
  - `transfer` object · nullable  
    Other markets and sports (F33): the same rule on its other market and on other leagues, numbers mapped to the same meaning, pooled with DerSimonian-Laird random effects. Evidence beside the verdict, never part of it; these runs don't count toward rules tried. Present only when the request asks for transfer.
    - `status` string  
      measured or na.  
      One of: `measured`, `na` (open: new values may be added).
    - `why` string · nullable  
      Why nothing ran, when nothing did.
    - `options` object  
      The leagues, markets and thresholds asked for.
    - `cells` array of object  
      Each market and league in a fixed order (the other market first, then sibling leagues), never sorted by a result; up to 12.
      - `competition` string  
        The league.
      - `market` string  
        The market.
      - `thresholds` string  
        literal (the rule's own numbers) or quantile (each number moved to the same percentile of its field in this league).  
        One of: `literal`, `quantile` (open: new values may be added).
      - `formula` string  
        The formula this cell ran (quantile cells carry the moved numbers).
      - `seasons` array of string  
        Seasons read, as this league labels them.
      - `mapped` array of object · nullable  
        Quantile cells only.
        - `number` string  
          The number as written.
        - `field` string  
          What it is compared with.
        - `percentile` number · nullable  
          Its percentile in the rule's own league (a fraction).
        - `value` number · nullable  
          The number at the same percentile here.
      - `decisions` integer  
        Wins plus losses.
      - `bets` integer  
        Graded bets.
      - `record` string  
        Wins-losses(-pushes).
      - `units` number · nullable  
        Units won or lost.
      - `roi` number · nullable  
        Units over units risked.
      - `roi_ci95` array of number · nullable  
        ROI's 95% score interval.
      - `se` number · nullable  
        ROI's standard error at 1 unit risked a bet.
      - `p_value` number · nullable  
        The cell's own one-sided p against no skill at its prices.
      - `p_holm` number · nullable  
        Holm's adjusted p across the cells.
      - `pooled` boolean  
        The cell is in the pool (another league, one a league, 10+ decisions).
    - `pooled` object · nullable  
      The pool of the other leagues' cells.
      - `roi` number · nullable  
        Random-effects ROI.
      - `roi_ci95` array of number · nullable  
        Its 95% interval.
      - `se` number · nullable  
        Its standard error.
      - `p_value` number · nullable  
        Two-sided p of the pooled ROI.
      - `i2` number · nullable  
        I²: the share of the spread across leagues beyond chance (a fraction).
      - `tau2` number · nullable  
        τ²: the between-league variance of true ROI.
      - `q` number · nullable  
        Cochran's Q.
      - `cells` integer  
        Cells pooled.
    - `same_direction` object · nullable  
      Pooled cells whose ROI has the rule's own sign.
      - `agree` integer  
        Cells the same way.
      - `cells` integer  
        Cells.
      - `p_value` number · nullable  
        Two-sided sign-test p.
      - `text` string  
        "4 of 5".
    - `not_testable` array of object  
      Leagues and markets left out, with why.
      - `competition` string  
        The league.
      - `market` string · nullable  
        The market.
      - `missing` array of string  
        Fields that league lacks.
      - `why` string  
        Why.
    - `note` string  
      What the panel is and isn't.
  - `run_id` string · nullable  
    This run, kept on the account (`run_…`): the same request on the same data is the same run. GET /v1/rules/runs/{run_id} reads it back. Null without an account.  
    pattern ^run_[0-9a-hjkmnp-tv-z]{20}$
  - `data_version` string  
    The data the run read: Kelly's lake snapshot (or the data's as-of time). A new snapshot is a new run of the same rule.
  - `manifest` object · nullable  
    What this run read and ran, so the same request can be run again and checked against it (ADR-K885). No prices, lines or rows of source data.
    - `version` integer  
      The manifest's own layout version.
    - `code` object  
      The code that graded the run.
      - `engine` integer  
        The tester's revision; it rises with any fix that can move a result on the same data.
      - `release` string · nullable  
        The deployed commit.
      - `formula_version` string · nullable  
        The formula language's version.
      - `catalogue_version` string · nullable  
        The stat catalogue's version.
      - `attributes_sha256` string · nullable  
        A hash of the attribute registry: what each input means and when it is known.
      - `settlement_rules` string · nullable  
        The settlement rules' version.
    - `data` object  
      The data the run read.
      - `version` string  
        The same value as data_version.
      - `snapshots` array of string  
        The lake snapshots read, in order.
      - `one_snapshot` boolean  
        Whether every season was read on one snapshot.
      - `as_of` string · nullable  
        When the read was made (RFC 3339).  
        format date-time
      - `data_through` object  
        How far Kelly's history went, by league.
      - `latest_result` string · nullable  
        The newest game read that had a result.
      - `rows_built_at` string · nullable  
        When the prepared rows were built, where the run read them.  
        format date-time
      - `queries` object  
        Each reviewed lake query the tester reads, with a hash of its text.
    - `request` object  
      The request.
      - `request_hash` string  
        The request's hash.
      - `rule_hash` string  
        The rule's hash.
      - `seed` integer  
        The seed every simulation in the run used.
    - `sources` object  
      Where the run's inputs came from.
      - `prices` object  
        Bets priced, by the source of the line.
      - `inputs` array of object  
        Each input the rule read, with the moment it is known.
        - `name` string  
          The input.
        - `known` string · nullable  
          The moment it is known.
    - `seasons` array of object  
      Each season read.
      - `season` string  
        The season.
      - `rows` integer  
        Team-games in scope.
      - `priced_share` number · nullable  
        The share Kelly holds a price for at the bet moment.
    - `left_out` object  
      Matched games that were not bet, by reason.
    - `sha256` string  
      The hash of this block. Two runs with the same hash read the same data with the same code.
  - `since_run` object · nullable  
    Only on a run read back: what has changed in Kelly's tester since the run was kept.
    - `status` string  
      current: nothing that can move its numbers changed. superseded: something did. no_manifest: the run was kept before manifests.  
      One of: `current`, `superseded`, `no_manifest` (open: new values may be added).
    - `engine_changed` boolean · nullable  
      Whether the tester's revision has risen since.
    - `changed` array of object  
      The parts that differ, each with its value then (from) and now (to).
      - `part` string  
        engine, release, formula_language, catalogue, attributes, settlement_rules or queries.
  - `tested_at` string  
    When the run was kept (RFC 3339); only on a run read back.  
    format date-time
  - `rule_version` object · nullable  
    The saved rule this test was kept under (save, or rule_id): its rule_id, name, version and versions_tried. Null when the test wasn't saved.
    - `rule_id` string · required  
      The saved rule (rl_…).  
      pattern ^rl_[0-9a-hjkmnp-tv-z]{20}$
    - `name` string  
      Its name.
    - `version` integer · required  
      This rule's version under it: the same rule again keeps its version.  
      min 1
    - `new_version` boolean  
      This test made a new version.
    - `versions_tried` integer · required  
      Versions saved under it, this one included.  
      min 1
  - `since_saved` object · nullable  
    The saved version's record since it was saved (backtester T6, F50), when the test names its rule_id and repeats that version: verdict v2's since_saved check reads it. Null for a new version (its clock starts now) or an unsaved test.
    - `saved_at` string · nullable  
      When the clock started: the version's save, or the registration (RFC 3339).  
      format date-time
    - `record` string · required  
      Wins-losses(-pushes) since then.
    - `wins` integer  
      Wins.
    - `losses` integer  
      Losses.
    - `pushes` integer  
      Pushes.
    - `decisions` integer · required  
      Wins plus losses.
    - `bets` integer  
      Graded bets.
    - `units` number · required  
      Units won or lost.
    - `roi` number · nullable  
      Units over units risked, a fraction.
    - `clv_mean` number · nullable  
      Mean closing-line value of the bets (null at the close: none by definition).
    - `clv_bets` integer  
      Bets with a closing-line value.
    - `e_value` number · nullable  
      Anytime-valid e-value of the forward bets against no edge at the prices taken (safe to read every day).
    - `max_e_value` number · nullable  
      Its running maximum.
    - `e_threshold` number  
      The e-value that counts as evidence at alpha 0.05 (20).
    - `vs_backtest` object · nullable  
      Is live consistent with the backtest?
      - `win_rate_backtest` number  
        The backtest's win rate.
      - `win_rate_forward` number · nullable  
        The win rate since the save.
      - `p_value_difference` number · nullable  
        Two-sided p-value that the two win rates differ.
      - `method` string · nullable  
        fisher_exact (under 30 forward decisions) or two_proportion_z.
      - `e_value_worse` number  
        E-value that live wins less often than the backtest; 20 or more fails the check.
    - `pending` integer  
      Bets recorded at their bet moment, not yet final.
    - `no_line` integer  
      Matches Kelly held no line for at the bet moment (kept, never skipped).
    - `void` integer  
      Postponed games past the window.
    - `status` string · required  
      The since_saved check: na until min_decisions, then pass or fail.  
      One of: `na`, `pass`, `fail` (open: new values may be added).
    - `min_decisions` integer  
      Forward decisions before the check is judged (30).
    - `last_bet_at` string · nullable  
      The latest bet moment recorded.  
      format date-time
  - `tests_on_account` object · nullable  
    Rules this account has tried on this competition and market, this one included (the rules-tried ledger: every distinct rule tested on the site, the API or Kelly MCP, kept for good). The not-luck check adjusts for the larger of this count and the request's own tests. Null when the call has no account.
    - `competition` string · required  
      The competition.
    - `market` string · required  
      The market.
    - `count` integer · required  
      Distinct rules tried.  
      min 1
    - `shown_counted` integer  
      Variants an earlier report showed (its condition-removed forms, nearby numbers and home or away splits) that joined the count because this rule is one of them (audit F6).
  - `staking` string  
    How each bet was staked.
  - `matched` integer  
    Bets taken.
  - `ungraded` integer  
    Bets not yet played.
  - `notice` string  
    This tests a rule on past games; it isn't a pick.
  - `calibration` object · nullable  
    output: probability only. The formula's chances against the market's no-vig close of the same side (moneyline: the team wins; spread: it covers the bet's line), on the newest 30% of the scored team-games (whole days), and the bets it makes at the edge threshold.
    - `formula` string  
      The probability formula as sent.
    - `bet_formula` string  
      The rule it bets: the chance at the bet's own price worth more than the edge threshold (the rule tested, counted and kept).
    - `edge_threshold` number  
      Expected return a bet needs, p × decimal price − 1 (0.02 by default).
    - `basis` string  
      newest_30: scored on the holdout only.  
      One of: `newest_30` (open: new values may be added).
    - `games` integer  
      Games scored.
    - `rows` integer  
      Team-games scored (both teams of a game).
    - `in_sample_rows` integer  
      Team-games before the holdout, not scored.
    - `holdout_from` string · nullable  
      The holdout's first day.
    - `left_out` object  
      Team-games not scored.
      - `pushes` integer  
        Pushes and half results.
      - `outside_0_1` integer  
        Values below 0 or above 1.
      - `no_value` integer  
        Rows the formula gave no number for.
    - `clipped` integer  
      Values of 0 or 1 clipped to 1e-6 from the edge.
    - `brier` number · nullable  
      Brier score of the formula.
    - `brier_market` number · nullable  
      Brier score of the close.
    - `brier_skill` number · nullable  
      1 − formula / close (above 0: the formula scores better).
    - `log_loss` number · nullable  
      Log loss of the formula.
    - `log_loss_market` number · nullable  
      Log loss of the close.
    - `log_loss_skill` number · nullable  
      1 − formula / close.
    - `dm_p_value` number · nullable  
      Diebold–Mariano p on the per-game log-loss difference (two-sided).
    - `dm_statistic` number · nullable  
      The HLN-corrected statistic (positive: the formula's loss is higher).
    - `mcb` number · nullable  
      CORP miscalibration (Brier).
    - `dsc` number · nullable  
      CORP discrimination.
    - `unc` number · nullable  
      Uncertainty; brier = mcb − dsc + unc.
    - `mcb_p_value` number · nullable  
      The MCB test: the chance a calibrated formula looks this miscalibrated (999 resamples).
    - `reliability` array of object · nullable  
      The CORP reliability curve at up to 20 forecast values.
      - `p` number · nullable  
        The formula's probability.
      - `observed` number · nullable  
        How often it happened (PAV fit).
      - `lo` number · nullable  
        90% consistency band, low.
      - `hi` number · nullable  
        90% consistency band, high.
    - `ece` number · nullable  
      Expected calibration error over ten equal-width bins (bin-dependent; for familiarity).
    - `distinct_forecasts` integer  
      Distinct values the formula gave.
    - `slope` number · nullable  
      Calibration slope b in y ~ a + b·logit p (1 is ideal; under 1 overconfident).
    - `slope_se` number · nullable  
      Its game-clustered standard error.
    - `intercept` number · nullable  
      Calibration intercept a (0 is ideal).
    - `encompassing` object · nullable  
      y ~ a + b_q·logit q + b_p·logit p, game-clustered: does the formula know something the close doesn't?
      - `b_model` number · nullable  
        b_p.
      - `b_market` number · nullable  
        b_q.
      - `se_model` number · nullable  
        b_p's standard error.
      - `p_value` number · nullable  
        Two-sided p of b_p.
    - `edge_bins` array of object · nullable  
      Realized results against the formula's edge.
      - `edge` number · nullable  
        Mean of p − q in the bin.
      - `realized_minus_market` number · nullable  
        Mean of y − q in the bin.
      - `rows` integer  
        Team-games in the bin.
    - `status` string  
      The calibrated check: pass, fail or na (under 200 games, or one value).  
      One of: `pass`, `fail`, `na` (open: new values may be added).
    - `value` string  
      The check's line.
    - `statistic` number · nullable  
      The encompassing p.
    - `threshold` number · nullable  
      0.05.
- `summary` string · required  
  One or two sentences with the key figure, written by a server template; when the request could mean two things, the question to ask.
- `assumptions` array of string · required  
  Every default applied (regular season, the qualifier used, ...).
- `has_more` boolean · required  
  More rows follow.
- `next_cursor` string · nullable  
  Pass it back as cursor for the next page.
- `as_of` string · required  
  When the value was true; for a derived value, its newest input's time.  
  format date-time
- `source` string · required  
  Who produced the value, as shown to readers.  
  min length 1
- `attribution` string · nullable  
  Attribution the source's terms require.
- `request_id` string · required · nullable  
  The request that produced this response.
- `live_topics` array of string  
  Kelly Wire topics that update this resource (API and cards only).
- `rg_line` string · nullable  
  The cost line (COMP-1, D19) on every resource and result that touches wagering: one engine-computed cost fact, or the short form, plus 21+ and the helpline. Show it with the value. Null on resources that don't touch wagering.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`rule_not_testable`](/problems/rule_not_testable) · [`query_too_broad`](/problems/query_too_broad) · [`snapshot_expired`](/problems/snapshot_expired) · [`upstream_timeout`](/problems/upstream_timeout)

### Example
```http
POST https://api.askkelly.ai/v1/trends:audit
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "text": "=home",
  "competition": "nba",
  "seasons": [
    "2025-26"
  ],
  "claimed_record": "sixty and forty"
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "code": "invalid_request",
  "detail": "claimed_record: 'sixty and forty' does not match '^\\\\s*\\\\d{1,6}\\\\s*-\\\\s*\\\\d{1,6}(\\\\s*-\\\\s*\\\\d{1,6})?\\\\s*$'",
  "param": "claimed_record",
  "doc_url": "https://docs.askkelly.ai/problems/invalid_request",
  "request_id": "req_78dd0ee167e1a78b243b966e",
  "retryable": false,
  "display_message": "Something in that request was not understood."
}
```

```http
POST https://api.askkelly.ai/v1/trends:audit
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "text": "=AND(home, rest_days >= 2)",
  "competition": "nba",
  "seasons": [
    "2025-26"
  ],
  "claimed_record": "60-40",
  "published_on": "2025-11-01"
}
```

```json
{
  "object": "trend_audit",
  "status": "tested",
  "claim": {
    "text": "=AND(home, rest_days >= 2)",
    "claimed_record": "60-40",
    "claimed_roi": null,
    "published_on": "2025-11-01"
  },
  "translation": {
    "formula": "=AND(home, rest_days >= 2)",
    "readback": "Bets the team against the spread when it is at home, and its rest in days is at least 2.",
    "translation_id": "tx_xbj639zqrcq2kg653rsf"
  },
  "formula": "=AND(home, rest_days >= 2)",
  "claim_check": {
    "claimed_record": "60-40",
    "claimed_roi": 0.14545454545454548,
    "claimed_roi_basis": "the claimed record at -110",
    "kelly_record": "0-0",
    "kelly_roi": null,
    "claim_inflation_roi": null
  },
  "since_published": {
    "from": "2025-11-02",
    "first_game": null,
    "record": "0-0",
    "decisions": 0,
    "units": 0,
    "roi": null
  },
  "coverage": {
    "seasons_tested": [
      "2025-26"
    ],
    "held_from": "2020-06-01",
    "note": "Kelly holds closes from June 2020; seasons a claim counts before that can't be checked."
  },
  "test": {
    "staking": "flat, 1 unit risked a bet",
    "matched": 0,
    "ungraded": 0,
    "overall": {
      "wins": 0,
      "losses": 0,
      "pushes": 0,
      "bets": 0,
      "decisions": 0,
      "record": "0-0",
      "units": 0,
      "roi": null,
      "win_rate": null,
      "break_even": null,
      "significance": null,
      "few_decisions": true,
      "small_sample": true,
      "deflated": null
    },
    "clv": {
      "bets_with_close": 0,
      "bets_without_close": 0,
      "reference": "consensus",
      "devig": "multiplicative",
      "lines_converted": 0,
      "coverage": null,
      "closes_stale": 0,
      "points_coverage": null,
      "points_test": null,
      "basis": "probability",
      "mean": null,
      "ci95": null,
      "p_value": null,
      "beat_close_share": null,
      "beat_rate": null,
      "beat_rate_ci95": null,
      "sign_test_p": null,
      "mean_prob": null,
      "mean_points": null,
      "points_bets": 0,
      "profit_slope": null,
      "profit_slope_se": null,
      "sample_needed": null,
      "sample_needed_roi": null,
      "significance": null,
      "note": "Bets at the close have no closing-line value by definition."
    },
    "seasons": [],
    "holdout": null,
    "dependence": null,
    "honest": null,
    "luck": {
      "reading": "versus_the_market",
      "close_source": "consensus",
      "devig": "multiplicative",
      "bets_without_prob": 0,
      "left_out": {
        "push": 0,
        "half": 0
      },
      "lines_converted": 0,
      "bets": 0,
      "expected_units": null,
      "actual_units": null,
      "luck_units": null,
      "luck_se_units": null,
      "expected_wins": null,
      "actual_wins": null,
      "luck_percentile": null,
      "expected_roi": null,
      "actual_roi": null,
      "theta": null,
      "by_season": []
    },
    "base": {
      "formula": "=home",
      "source": "auto",
      "decisions": 1,
      "status": "na",
      "why": "the base is under twice the rule's bets"
    },
    "stress": {
      "half_point_worse": {
        "bets": 0,
        "decisions": 0,
        "record": "0-0",
        "units": 0,
        "roi": null,
        "p_value": null
      },
      "flat_110": {
        "bets": 0,
        "decisions": 0,
        "record": "0-0",
        "units": 0,
        "roi": null,
        "p_value": null
      },
      "other_side": {
        "bets": 0,
        "decisions": 0,
        "record": "0-0",
        "units": 0,
        "roi": null,
        "p_value": null
      },
      "break_even": null,
      "slippage_mc": null,
      "grid": [
        {
          "vig": -105,
          "line_shift": 0,
          "units": 0,
          "roi": null
        },
        {
          "vig": -105,
          "line_shift": -0.5,
          "units": 0,
          "roi": null
        },
        {
          "vig": -105,
          "line_shift": -1,
          "units": 0,
          "roi": null
        },
        {
          "vig": -110,
          "line_shift": 0,
          "units": 0,
          "roi": null
        },
        {
          "vig": -110,
          "line_shift": -0.5,
          "units": 0,
          "roi": null
        },
        {
          "vig": -110,
          "line_shift": -1,
          "units": 0,
          "roi": null
        },
        {
          "vig": -115,
          "line_shift": 0,
          "units": 0,
          "roi": null
        },
        {
          "vig": -115,
          "line_shift": -0.5,
          "units": 0,
          "roi": null
        },
        {
          "vig": -115,
          "line_shift": -1,
          "units": 0,
          "roi": null
        },
        {
          "vig": -120,
          "line_shift": 0,
          "units": 0,
          "roi": null
        },
        {
          "vig": -120,
          "line_shift": -0.5,
          "units": 0,
          "roi": null
        },
        {
          "vig": -120,
          "line_shift": -1,
          "units": 0,
          "roi": null
        }
      ]
    },
    "leak_test": {
      "status": "clean",
      "rows_checked": 6,
      "matched_checked": 1,
      "matches_flipped": 0,
      "parts": []
    },
    "warm_up": {
      "policy": "as_written",
      "games_needed": 0,
      "windows": [],
      "short_bets": 0,
      "by_policy": null,
      "warning": false
    },
    "settlement": {
      "profile": "kelly_standard",
      "rules_version": "2026-11-08",
      "applied": [],
      "rules": [
        {
          "id": "final_score",
          "text": "Every market grades on the final score as Kelly's score source records it, overtime and extra innings included.",
          "effective_from": "2026-11-06"
        },
        {
          "id": "spread_push",
          "text": "A spread bet whose margin lands exactly on the line pushes: the stake comes back.",
          "effective_from": "2026-11-06"
        },
        {
          "id": "postponed_void",
          "text": "A game with no final score 48 hours after its scheduled start is void: the bet is left out.",
          "effective_from": "2026-11-07"
        },
        {
          "id": "not_played_yet",
          "text": "A game still to be played is listed with no result and left out of every figure.",
          "effective_from": "2026-11-06"
        }
      ]
    },
    "moment": {
      "bet_moment": "close",
      "target": "the start",
      "max_stale_minutes": 60,
      "floor_minutes_before_oct_2022": 10,
      "rows_priced": 0,
      "rows_aged": 0,
      "median_snapshot_age_minutes": null,
      "max_snapshot_age_minutes": null,
      "stale_price": 0,
      "after_moment": 0,
      "age_unknown": 0,
      "line_sources": {}
    },
    "coverage": {
      "flow": [
        {
          "step": "in_scope",
          "games": 3,
          "rows": 6
        },
        {
          "step": "rule_true",
          "rows": 1
        },
        {
          "step": "one_bet_a_game",
          "rows": 1,
          "out": {
            "both_sides": 0,
            "same_game_total": 0
          }
        },
        {
          "step": "priced",
          "rows": 0,
          "out": {
            "no_line": 1
          }
        },
        {
          "step": "graded",
          "rows": 0,
          "out": {
            "void": 0,
            "not_played_yet": 0
          }
        },
        {
          "step": "decisions",
          "rows": 0,
          "out": {
            "push": 0
          }
        }
      ],
      "by_season": [
        {
          "season": "2025-26",
          "games": 3,
          "rows": 6,
          "rule_true": 1,
          "bets": 0,
          "priced_share": 0.3333
        }
      ],
      "inputs_missing": [
        {
          "attribute": "home",
          "rows": 6,
          "rows_blank": 0,
          "share": 0,
          "seasons_blank": []
        },
        {
          "attribute": "rest_days",
          "rows": 6,
          "rows_blank": 2,
          "share": 0.3333,
          "seasons_blank": []
        }
      ],
      "left_out_differs": {
        "left_out": 1,
        "kept": 0,
        "flag": false,
        "max_smd": null,
        "covariate": null,
        "by_covariate": []
      }
    },
    "random_baseline": null,
    "decay": {
      "bets": 0,
      "window": null,
      "rolling": [],
      "break": null,
      "cusum": null,
      "known_break": null,
      "trend_per_100_bets": null,
      "decay_ratio": null,
      "clv_break": null,
      "roi_newest_30": null,
      "status_reason": "no graded bets"
    },
    "ablation": {
      "base": {
        "decisions": 2,
        "roi": -0.04500000000000004
      },
      "value": "excess_units",
      "total": 0,
      "rule": {
        "decisions": 0,
        "units": 0
      },
      "clauses": [
        {
          "condition": "home",
          "shapley_units": 0.4775,
          "share": null,
          "alone": {
            "decisions": 1,
            "units": 0.9099999999999999,
            "roi": 0.9099999999999999
          },
          "without": {
            "decisions": 0,
            "units": 0,
            "roi": null,
            "changed_share": 0,
            "formula": "=rest_days >= 2"
          },
          "label": "dead",
          "implied_by": [],
          "fix": {
            "label": "Remove it",
            "formula": "=rest_days >= 2"
          },
          "sampled_se": null
        },
        {
          "condition": "rest_days >= 2",
          "shapley_units": -0.4775,
          "share": null,
          "alone": {
            "decisions": 0,
            "units": 0,
            "roi": null
          },
          "without": {
            "decisions": 1,
            "units": 0.9099999999999999,
            "roi": 0.9099999999999999,
            "changed_share": 1,
            "formula": "=home"
          },
          "label": "dead",
          "implied_by": [],
          "fix": {
            "label": "Remove it",
            "formula": "=home"
          },
          "sampled_se": null
        }
      ],
      "pairs": [
        {
          "conditions": [
            "home",
            "rest_days >= 2"
          ],
          "interaction_units": -0.955
        }
      ],
      "method": "exact",
      "evaluations": 3
    },
    "nearby": {
      "numbers": [],
      "variants": 0,
      "distinct_bet_sets": 0,
      "grid": null,
      "roi_median": null,
      "roi_p05": null,
      "roi_p95": null,
      "plateau_share": null,
      "spike_ratio": null,
      "reading": null,
      "na": "the rule compares no numbers"
    },
    "monte_carlo": null,
    "noise": {
      "seed": 3125498839,
      "inputs": {
        "runs": 200,
        "profitable_runs": 0,
        "profitable_share": 0,
        "roi_median": null,
        "roi_p05": null,
        "input_scale": 0.1,
        "overlap_median": 1,
        "numbers": 1
      },
      "inputs_na": null,
      "lines": null,
      "delay": {
        "bet_moment": "day_before",
        "na": "day-before lines for this league are still loading"
      },
      "low_power": true
    },
    "concentration": {
      "bets": 0,
      "units": 0,
      "by": [],
      "trim_top_0_05": null
    },
    "split_dimensions": [],
    "robustness": {
      "fast_path": true,
      "seed": 2248428446,
      "evaluations": 1,
      "off": [],
      "checks": [
        {
          "key": "half_point_worse",
          "label": "Holds ½ point worse",
          "status": "na",
          "value": "fewer than (30) decided bets",
          "statistic": null,
          "threshold": null
        },
        {
          "key": "nearby_holds",
          "label": "Holds with nearby numbers",
          "status": "na",
          "value": "fewer than (30) decided bets",
          "statistic": null,
          "threshold": null
        },
        {
          "key": "not_concentrated",
          "label": "Not one team or season",
          "status": "na",
          "value": "fewer than (30) decided bets",
          "statistic": null,
          "threshold": null
        },
        {
          "key": "still_working",
          "label": "Still working",
          "status": "na",
          "value": "fewer than (30) decided bets",
          "statistic": null,
          "threshold": null
        }
      ]
    },
    "verdict": {
      "version": 2,
      "headline": "No bets",
      "level": "too_few",
      "passed": 0,
      "applicable": 0,
      "gate": {
        "key": "no_look_ahead",
        "status": "pass",
        "value": "every value the rule reads is known at the bet moment",
        "leak_test": "clean"
      },
      "checks": []
    },
    "risk": {
      "staking": "flat",
      "stake_fraction": null,
      "bankroll_units": 100,
      "ruin_share": 0.5,
      "horizon_bets": 500,
      "paths": 5000,
      "seed": 4440280713539600,
      "lose_all_ever": null,
      "lose_all_ever_allowing_error": null,
      "ruin_ever_if_rate_exact": null,
      "ruin_if_rate_exact": null,
      "ruin_allowing_error": null,
      "estimation_premium": null,
      "drawdown_p95_units": null,
      "drawdown_p95": null,
      "down_after_horizon": null,
      "bankroll_for_ruin_005_units": null,
      "curve": [],
      "status": "too_few",
      "method": "lundberg+posterior_monte_carlo",
      "warnings": [
        "too_few_decisions"
      ],
      "percent": {
        "stake_fraction": 0.02,
        "ruin_if_rate_exact": null,
        "ruin_allowing_error": null,
        "drawdown_p95": null,
        "status": "too_few"
      }
    },
    "staking_plans": {
      "bankroll_units": 100,
      "percent": 0.02,
      "kelly_cap": 0.05,
      "kelly": {
        "win_rate": null,
        "push_rate": 0,
        "full_fraction": null,
        "shrink": null,
        "multiplier": null,
        "honest_fraction": null,
        "capped": null,
        "simultaneous": false,
        "basis": "record",
        "multiplier_rule": "honest",
        "withheld": "stake_first_party_only"
      },
      "plans": [
        {
          "plan": "flat",
          "status": "ok",
          "stopped_at_bet": null,
          "bets": 0,
          "end_bankroll_units": 100,
          "units": 0,
          "max_drawdown": 0,
          "growth_per_bet": null,
          "roi": null
        },
        {
          "plan": "to_win",
          "status": "ok",
          "stopped_at_bet": null,
          "bets": 0,
          "end_bankroll_units": 100,
          "units": 0,
          "max_drawdown": 0,
          "growth_per_bet": null,
          "roi": null
        },
        {
          "plan": "percent",
          "status": "ok",
          "stopped_at_bet": null,
          "bets": 0,
          "end_bankroll_units": 100,
          "units": 0,
          "max_drawdown": 0,
          "growth_per_bet": null,
          "roi": null
        },
        {
          "plan": "kelly",
          "status": "withheld",
          "withheld": "stake_first_party_only"
        }
      ],
      "warnings": [
        "small_sample"
      ]
    },
    "risk_adjusted": {
      "bets": 0,
      "warnings": [
        "no_bets"
      ]
    },
    "caps": null,
    "capacity": {
      "available": false,
      "market": "spreads",
      "before_start": "0_1h",
      "books": [],
      "max_stake_per_bet": null,
      "per_season_at_limit": null,
      "bets_per_season": null,
      "limits_held": 0,
      "reason": "Kelly holds no measured spreads limits for nba at this moment yet."
    },
    "splits": [],
    "without": [
      {
        "condition": "home",
        "formula": "=rest_days >= 2",
        "bets": 0,
        "decisions": 0,
        "record": "0-0",
        "units": 0,
        "roi": null,
        "p_value": null,
        "p_value_vs_rule": null,
        "p_adjusted": null,
        "shown_rows": 1,
        "p_value_vs_rule_adjusted": null
      },
      {
        "condition": "rest_days >= 2",
        "formula": "=home",
        "bets": 1,
        "decisions": 1,
        "record": "1-0",
        "units": 0.9099999999999999,
        "roi": 0.9099999999999999,
        "p_value": 0.5235602094240838,
        "p_value_vs_rule": null,
        "p_adjusted": 0.5235602094240838,
        "shown_rows": 1,
        "p_value_vs_rule_adjusted": null
      }
    ],
    "rule": {
      "formula": "=AND(home, rest_days >= 2)",
      "competition": "nba",
      "market": "spread",
      "side": "rule",
      "bet_moment": "close",
      "seasons": [
        "2025-26"
      ],
      "season_type": "regular",
      "stake": "risk",
      "price": "consensus",
      "base_formula": null,
      "reads": [
        {
          "name": "home",
          "known": "pregame",
          "windowed": false
        },
        {
          "name": "rest_days",
          "known": "pregame",
          "windowed": false
        }
      ],
      "rule_hash": "sha256:1e9e3c96193481744619102207b3b7c22de187b64f1fdd3c062d04c31cc8d451",
      "formula_version": "1.0.0",
      "catalogue_version": "1:0",
      "translation_id": "tx_xbj639zqrcq2kg653rsf"
    },
    "left_out": {
      "no_line": 1,
      "both_sides": 0,
      "stale_price": 0
    },
    "matched_without_line": 1,
    "matched_both_sides": 0,
    "assumptions": [
      "Each bet is taken at Kelly's consensus close price; games Kelly holds no close line for are left out (1).",
      "Games where the rule matched both teams are left out (0).",
      "One flat unit risked a bet."
    ],
    "as_of": "2026-11-06T00:00:00Z",
    "notice": "This tests your rule on past games. It isn't a pick and doesn't rank selections.",
    "data_through": {},
    "latest_result": "2025-10-25T23:00:00Z",
    "rows_built_at": "2026-11-06T00:00:00Z",
    "stale": false,
    "since_saved": null,
    "tests_on_account": null,
    "data_version": "snap_52",
    "manifest": {
      "version": 1,
      "code": {
        "engine": 8,
        "release": null,
        "formula_version": "1.0.0",
        "catalogue_version": "1:0",
        "attributes_sha256": "0000000000000000",
        "settlement_rules": "2026-11-08"
      },
      "data": {
        "version": "snap_52",
        "snapshots": [
          "snap_52"
        ],
        "one_snapshot": true,
        "as_of": "2026-11-06T00:00:00Z",
        "data_through": {},
        "latest_result": "2025-10-25T23:00:00Z",
        "rows_built_at": "2026-11-06T00:00:00Z",
        "queries": {
          "rule_test_games": "0000000000000000"
        }
      },
      "request": {
        "request_hash": "sha256:e65dcd26df2fdf9aaf92df60ff1159b2a2f11b28898d1af882341bd9a877ad58",
        "rule_hash": "sha256:1e9e3c96193481744619102207b3b7c22de187b64f1fdd3c062d04c31cc8d451",
        "seed": 16551235696159332000
      },
      "sources": {
        "prices": {},
        "inputs": [
          {
            "name": "home",
            "known": "pregame"
          },
          {
            "name": "rest_days",
            "known": "pregame"
          }
        ]
      },
      "seasons": [
        {
          "season": "2025-26",
          "rows": 6,
          "priced_share": 0.3333
        }
      ],
      "left_out": {
        "both_sides": 0,
        "no_line": 1,
        "stale_price": 0
      },
      "sha256": "sha256:a0e4e4125043a139c2c30ac28dcf4a0105b68d55996eeaacf85d176c80f81a16"
    },
    "run_id": null,
    "rule_version": null,
    "report_url": null
  },
  "summary": "Bets the team against the spread when it is at home, and its rest in days is at least 2. Kelly's record: 0-0. Since it was published: 0-0. Verdict: No bets.",
  "assumptions": [
    "Each bet is taken at Kelly's consensus close price; games Kelly holds no close line for are left out (1).",
    "Games where the rule matched both teams are left out (0).",
    "One flat unit risked a bet."
  ],
  "has_more": false,
  "next_cursor": null,
  "as_of": "2026-11-06T00:00:00Z",
  "source": "kelly",
  "attribution": null,
  "request_id": "req_3dd95de735d1f1e0b4319c7f",
  "live_topics": [],
  "rg_line": null
}
```

Where each value comes from:

1. kelly · as of 2026-11-06T00:00:00Z

`POST /v1/rules:import`

## Import a betting system
scope `write:formulas` · 40 credits, not charged during the beta · MCP tool `import_rule` · status live

Reads a betting system written for another tool (SDQL, a filter list from Bet Labs, BetIQ, TrendsCenter, BettingPros or Covrr, a formula in Excel, SQL, pandas and other modes) or in plain words, and maps each of its conditions to Kelly's formula language: exact, close (with how it differs), ask (a question with choices) or cant_map (with why). The draft carries the combined formula, the look-ahead check and the exact POST /v1/rules:test body. dry_run (the default) keeps nothing; dry_run false keeps the draft for 30 days. Kelly never fetches a link or logs in anywhere (I2). Needs your own live API key with write:formulas; an AI app imports through Kelly MCP, which asks you first.

### Parameters
Body, `application/json` (required):

- `text` string  
  The system: SDQL, a filter list, a formula, or plain English.  
  max length 20000
- `rows` array of object  
  Filter rows a reader split, instead of text.  
  max items 60
  - `tool` string · required  
    The tool it came from (sdql, bet_labs, betiq...).  
    pattern ^[a-z0-9_.:-]{1,64}$
  - `label` string · required  
    The choice in words.  
    max length 200
  - `op` any · required  
    The comparison.  
    One of: `=`, `!=`, `<`, `<=`, `>`, `>=`, `between`, `in`, `is` (open: new values may be added).
  - `value` any · required  
    As shown: text, a number, a list for in; the min for between.
  - `value2` any  
    The max for between (null when open-ended).
  - `source_text` string · required  
    The condition in the source's own words.  
    max length 2000
  - `confidence` any  
    The vision reader's confidence; low maps to status ask.  
    One of: `high`, `low` (open: new values may be added).
  - `page` integer · nullable  
    The image or page the row was read from.  
    min 0
- `format` any  
  What the text is; auto (default) tries every reader.  
  One of: `auto`, `sdql`, `filter_list`, `formula`, `plain`, `game_list` (open: new values may be added).
- `tool` string  
  Where it came from (TOOLS, or kelly_template:<id>).  
  pattern ^[a-z0-9_.:-]{1,64}$
- `formula_mode` any  
  For format formula: the mode it is written in.  
  One of: `excel`, `sheets`, `sql`, `polars`, `pandas`, `dplyr`, `dax`, `tableau`, `pine` (open: new values may be added).
- `source_kind` any  
  Set by the entry point; default paste (api on the API, mcp on MCP).  
  One of: `paste`, `url`, `file`, `image`, `email`, `extension`, `api`, `mcp`, `chat`, `bets`, `template` (open: new values may be added).
- `raw_ref` string  
  Where it came from (a URL, file or message id). Kept, never fetched (I2).  
  max length 500
- `via` any  
  The entry point's channel.  
  One of: `site`, `api`, `mcp`, `chat`, `extension`, `bookmarklet`, `share_target`, `email`, `zapier`, `make`, `link` (open: new values may be added).
- `files` array of object  
  Files for the file and vision readers (T9c), uploaded first.  
  max items 20
  - `file_id` string · required  
    The file's ID.  
    max length 100
  - `name` string  
    The name.  
    max length 255
  - `content_type` string  
    The file's media type.  
    max length 100
  - `size` integer  
    The file's size in bytes.  
    min 0
- `name` string  
  The name.  
  max length 120
- `competition` string  
  The league.  
  max length 32
- `market` any  
  spread, moneyline, over or under.  
  One of: `spread`, `moneyline`, `over`, `under`, `teaser`, `draw`, `win`, `place`, `each_way`, `lay`, `lay_place` (open: new values may be added).
- `side` any  
  rule or fade.  
  One of: `rule`, `fade` (open: new values may be added).
- `bet_moment` any  
  close or edition.  
  One of: `open`, `edition`, `close` (open: new values may be added).
- `seasons` array of string  
  1-25 season labels ("2024" or "2024-25"); or from_season and to_season.  
  min items 1 · max items 25
- `from_season` string  
  First season.
- `to_season` string  
  Last season.
- `season_type` any  
  regular, postseason or all.  
  One of: `regular`, `postseason`, `all` (open: new values may be added).
- `stake` any  
  risk or to_win.  
  One of: `risk`, `to_win` (open: new values may be added).
- `strategy` object · nullable  
  Competition exchange: the trading strategy's actions besides entry_when (exchange.contract.ACTIONS); the test runs them with the draft's formula as entry_when.
  - `entry_side` string  
    back (bet it to win) or lay (bet it to lose).  
    One of: `back`, `lay` (open: new values may be added).
  - `entry_order` string  
    take: match now at the best price on the other side (back at back_price), walking down the ladder up to max_slippage_ticks. join: offer at the best price on your own side (back at lay_price) and wait in the queue, entry_offset_ticks better or worse. limit: offer at entry_price.  
    One of: `take`, `join`, `limit` (open: new values may be added).
  - `entry_price` number  
    limit only: the price to offer at (a back takes this or longer, a lay this or shorter).
  - `entry_offset_ticks` integer  
    join only: ticks from the best own-side price; positive asks for a better price (a back offered longer), negative a worse one.
  - `max_slippage_ticks` integer  
    take only: how many ticks past the best price a take may match at; what is left waits at the last price taken.
  - `stake` number  
    The entry stake in the market's currency (a lay's backer's stake unless stake_type is liability).
  - `stake_type` string  
    lay only: stake is the backer's stake you accept; liability is what you can lose.  
    One of: `stake`, `liability` (open: new values may be added).
  - `max_entries` integer  
    Entries per runner per market (Bet Angel's 'place bet triggers on the selection'); the next waits until the last is closed.
  - `fill_or_kill_s` number  
    Seconds an unmatched entry may wait before it is cancelled (0 cancels what doesn't match at once). Blank: it waits until the market turns in play.
  - `keep_in_play` boolean  
    TRUE keeps unmatched orders when the market turns in play (Betfair's persist); FALSE (default) cancels them at the off (lapse).
  - `take_profit_ticks` integer  
    Once the entry is matched, offer the green-up exit this many ticks in profit and wait for it to match.
  - `stop_loss_ticks` integer  
    When the position is this many ticks against (position_ticks <= -n), cancel the take-profit and green up now at the best price (a take).
  - `trailing_stop` boolean  
    The stop loss follows the best position_ticks so far (it trails n ticks behind).
  - `exit_when` string  
    A formula on the runner's ticks that greens up now at the best price when true (may read position_* columns).
  - `exit_before_off_s` number  
    Green up at the best price this many seconds before the scheduled off (0 is at the off). Blank: no time exit.
  - `green_up` boolean  
    TRUE (default): exits are sized to make the same profit on every outcome. FALSE: no exit, the matched entry is held to the result.
  - `commission` number  
    The exchange's commission on a market's net winnings, as a share (0.05 is 5%).
  - `min_stake` number  
    The exchange's smallest stake: a green-up smaller than this can't be placed, and the position is held to the result.
  - `fill_model` string  
    queue (default): a waiting order matches only after the money queued ahead of it at that price has traded. touch: it matches as soon as its price trades (optimistic).  
    One of: `queue`, `touch` (open: new values may be added).
- `source_record` object · nullable  
  The source's own record, as reported; never Kelly's numbers.
  - `wins` integer · nullable  
    Wins as the source wrote them.  
    min 0
  - `losses` integer · nullable  
    Losses as the source wrote them.  
    min 0
  - `pushes` integer · nullable  
    Pushes as the source wrote them.  
    min 0
  - `units` number · nullable  
    Units as the source wrote them.
  - `roi` number · nullable  
    A fraction (0.078).
  - `since` string · nullable  
    The first season or date the source counted from.
  - `market` string · nullable  
    The bet the record is on, as the source said it.
  - `as_reported` boolean  
    Always true: the source's claim, copied (T9f's pre-pass).
  - `games` array of object  
    The source's own list of games.  
    max items 5000
    - `date` string  
      The game's date.
    - `team` string  
      The team.
    - `opponent` string · nullable  
      The opponent.
    - `home` boolean · nullable  
      Whether the team was at home.
    - `line` number · nullable  
      The line taken.
    - `price` number · nullable  
      American odds as listed.
    - `result` string · nullable  
      The result as the source wrote it.
    - `units` number · nullable  
      Units as the source wrote them.
    - `text` string · nullable  
      The row as the source wrote it.
- `versions_tried` integer  
  How many versions the user tried in the other tool; default 20 (I1).  
  min 1 · max 1000 · default 20
- `dry_run` boolean  
  Default true: return the draft without keeping it (id null). False keeps it for 30 days under an imp_ id.  
  default true

### Response
`200` A dry run: the draft, kept nowhere (id null).

- `object` const · required  
  Always rule_import.  
  Always `"rule_import"`.
- `id` string · required · nullable  
  The import's ID (imp_…); null on a dry run.  
  pattern ^imp_[0-9a-hjkmnp-tv-z]{20}$
- `state` any · required  
  draft, confirmed, undone or expired.  
  One of: `draft`, `confirmed`, `undone`, `expired` (open: new values may be added).
- `source` object · required  
  Where the system came from and its text.
  - `tool` string · nullable  
    The tool it came from (sdql, bet_labs, betiq...).  
    pattern ^[a-z0-9_.:-]{1,64}$
  - `tool_label` string · nullable  
    The tool's name in words.
  - `kind` any · required  
    How it reached Kelly: paste, url, file, image, email, extension, api, mcp, chat, bets or template.  
    One of: `paste`, `url`, `file`, `image`, `email`, `extension`, `api`, `mcp`, `chat`, `bets`, `template` (open: new values may be added).
  - `format` any · required  
    What the text is: sdql, filter_list, formula, plain or auto.  
    One of: `auto`, `sdql`, `filter_list`, `formula`, `plain`, `game_list` (open: new values may be added).
  - `via` one of several shapes  
    The entry point that passed it on.
  - `formula_mode` one of several shapes  
    The formula's mode (excel, sql, pandas...).
  - `raw_ref` string · nullable  
    Where it came from (a URL, file or message), kept and never fetched.
  - `captured_at` string · nullable  
    When Kelly received it.  
    format date-time
  - `text` string · nullable  
    The text as received (kept with the draft and the saved rule, for the proof screen; the owner sees it).
  - `text_sha256` string · nullable  
    The text's SHA-256, hex.  
    pattern ^[0-9a-f]{64}$
- `system` object · required  
  The bet the system makes, as the rule tester names it. A reader fills what the source says; the caller's hints win.
  - `name` string · nullable  
    The name.  
    max length 120
  - `competition` string · nullable  
    nfl, ncaaf, nba, wnba, ncaab, nhl, mlb ...  
    max length 32
  - `market` one of several shapes  
    spread, moneyline, over or under.
  - `side` any  
    rule (bet the matched team or over/under) or fade (the other side).  
    One of: `rule`, `fade` (open: new values may be added).
  - `bet_moment` any  
    close or edition.  
    One of: `open`, `edition`, `close` (open: new values may be added).
  - `seasons` array of string · nullable  
    1-25 season labels ("2024" or "2024-25"); or from_season and to_season.  
    min items 1 · max items 25
  - `season_type` one of several shapes  
    regular, postseason or all.
  - `stake` any  
    risk or to_win.  
    One of: `risk`, `to_win` (open: new values may be added).
  - `strategy` object · nullable  
    Competition exchange: the trading strategy's actions besides entry_when (exchange.contract.ACTIONS); the test runs them with the draft's formula as entry_when.
    - `entry_side` string  
      back (bet it to win) or lay (bet it to lose).  
      One of: `back`, `lay` (open: new values may be added).
    - `entry_order` string  
      take: match now at the best price on the other side (back at back_price), walking down the ladder up to max_slippage_ticks. join: offer at the best price on your own side (back at lay_price) and wait in the queue, entry_offset_ticks better or worse. limit: offer at entry_price.  
      One of: `take`, `join`, `limit` (open: new values may be added).
    - `entry_price` number  
      limit only: the price to offer at (a back takes this or longer, a lay this or shorter).
    - `entry_offset_ticks` integer  
      join only: ticks from the best own-side price; positive asks for a better price (a back offered longer), negative a worse one.
    - `max_slippage_ticks` integer  
      take only: how many ticks past the best price a take may match at; what is left waits at the last price taken.
    - `stake` number  
      The entry stake in the market's currency (a lay's backer's stake unless stake_type is liability).
    - `stake_type` string  
      lay only: stake is the backer's stake you accept; liability is what you can lose.  
      One of: `stake`, `liability` (open: new values may be added).
    - `max_entries` integer  
      Entries per runner per market (Bet Angel's 'place bet triggers on the selection'); the next waits until the last is closed.
    - `fill_or_kill_s` number  
      Seconds an unmatched entry may wait before it is cancelled (0 cancels what doesn't match at once). Blank: it waits until the market turns in play.
    - `keep_in_play` boolean  
      TRUE keeps unmatched orders when the market turns in play (Betfair's persist); FALSE (default) cancels them at the off (lapse).
    - `take_profit_ticks` integer  
      Once the entry is matched, offer the green-up exit this many ticks in profit and wait for it to match.
    - `stop_loss_ticks` integer  
      When the position is this many ticks against (position_ticks <= -n), cancel the take-profit and green up now at the best price (a take).
    - `trailing_stop` boolean  
      The stop loss follows the best position_ticks so far (it trails n ticks behind).
    - `exit_when` string  
      A formula on the runner's ticks that greens up now at the best price when true (may read position_* columns).
    - `exit_before_off_s` number  
      Green up at the best price this many seconds before the scheduled off (0 is at the off). Blank: no time exit.
    - `green_up` boolean  
      TRUE (default): exits are sized to make the same profit on every outcome. FALSE: no exit, the matched entry is held to the result.
    - `commission` number  
      The exchange's commission on a market's net winnings, as a share (0.05 is 5%).
    - `min_stake` number  
      The exchange's smallest stake: a green-up smaller than this can't be placed, and the position is held to the result.
    - `fill_model` string  
      queue (default): a waiting order matches only after the money queued ahead of it at that price has traded. touch: it matches as soon as its price trades (optimistic).  
      One of: `queue`, `touch` (open: new values may be added).
- `conditions` array of object · required  
  One entry per condition the source states, in its order.  
  max items 60
  - `index` integer · required  
    The condition's place in the source, from 0.  
    min 0
  - `source_text` string · required  
    The condition as the source wrote it.  
    max length 2000
  - `status` any · required  
    exact, close, ask or cant_map.  
    One of: `exact`, `close`, `ask`, `cant_map` (open: new values may be added).
  - `formula` string · nullable  
    Kelly formula (Excel mode, starts with =); null for ask and cant_map.  
    max length 2000
  - `reason` string · nullable  
    Why close or can't map; how it differs from the source.
  - `question` string · nullable  
    For ask: the question for the user.
  - `choices` array of object  
    The readings to choose from, each with its formula.
    - `label` string · required  
      The choice in words.
    - `formula` string · required  
      The Kelly formula (TRUE or FALSE on each team-game).
  - `data_gap` object · nullable  
    What Kelly lacks for a condition it can't import.
    - `kind` any · required  
      How it reached Kelly: paste, url, file, image, email, extension, api, mcp, chat, bets or template.  
      One of: `no_attribute`, `no_history`, `not_loaded`, `out_of_grain`, `licence`, `edge`, `look_ahead` (open: new values may be added).
    - `detail` string · required  
      The detail, in words.
  - `attributes` array of string  
    Kelly attribute names the formula reads.
  - `method` any  
    deterministic, ai or user.  
    One of: `deterministic`, `ai`, `user` (open: new values may be added).
  - `resolution` one of several shapes  
    removed or live_only, for a condition left out.
- `formula` string · required · nullable  
  AND of the exact and close conditions.
- `match` any · required  
  exact, close_match, needs_answers or cant_import.  
  One of: `exact`, `close_match`, `needs_answers`, `cant_import` (open: new values may be added).
- `counts` object · required  
  Conditions by status.
  - `exact` integer · required  
    Conditions mapped exactly.  
    min 0
  - `close` integer · required  
    Conditions mapped closely.  
    min 0
  - `ask` integer · required  
    Conditions waiting on an answer.  
    min 0
  - `cant_map` integer · required  
    Conditions Kelly can't import.  
    min 0
- `check` object · required  
  kformula.check and the look-ahead check on the combined formula, at system.bet_moment. The leak test runs with the rule tester at confirm.
  - `testable` boolean · required  
    Whether the rule tester can test the formula.
  - `problems` array of object · required  
    Each reason it can't be tested yet.
    - `code` string · required  
      The reason's code.
    - `path` string · nullable  
      The attribute it concerns.
    - `message` string · required  
      The reason in words.
    - `fixes` array of object  
      Ways to fix it.
- `source_record` object · nullable  
  The source's own record, as reported; never Kelly's numbers.
  - `wins` integer · nullable  
    Wins as the source wrote them.  
    min 0
  - `losses` integer · nullable  
    Losses as the source wrote them.  
    min 0
  - `pushes` integer · nullable  
    Pushes as the source wrote them.  
    min 0
  - `units` number · nullable  
    Units as the source wrote them.
  - `roi` number · nullable  
    A fraction (0.078).
  - `since` string · nullable  
    The first season or date the source counted from.
  - `market` string · nullable  
    The bet the record is on, as the source said it.
  - `as_reported` boolean  
    Always true: the source's claim, copied (T9f's pre-pass).
  - `games` array of object  
    The source's own list of games.  
    max items 5000
    - `date` string  
      The game's date.
    - `team` string  
      The team.
    - `opponent` string · nullable  
      The opponent.
    - `home` boolean · nullable  
      Whether the team was at home.
    - `line` number · nullable  
      The line taken.
    - `price` number · nullable  
      American odds as listed.
    - `result` string · nullable  
      The result as the source wrote it.
    - `units` number · nullable  
      Units as the source wrote them.
    - `text` string · nullable  
      The row as the source wrote it.
- `ledger` object · required  
  How the import counts on the rules-tried ledger at confirm (I1).
  - `label` const · required  
    The choice in words.  
    Always `"tuned elsewhere"`.
  - `tries` integer · required  
    Rules counted as tried.  
    min 1 · max 1000
  - `tries_from` any · required  
    default (20) or user.  
    One of: `default`, `user` (open: new values may be added).
- `labels` array of object  
  "tuned elsewhere", and "close match" when match is close_match.
- `reader` object · required  
  The reader that read it.
  - `name` string · required  
    The name.
  - `method` any · required  
    deterministic, ai or user.  
    One of: `deterministic`, `ai`, `user` (open: new values may be added).
  - `attempts` integer  
    The AI reader's calls (1 to 3).  
    min 1
- `warnings` array of object · required  
  Notes on how Kelly read it.
  - `code` string · required  
    The reason's code.
  - `message` string · required  
    The reason in words.
- `test_request` object · nullable  
  The POST /v1/rules:test body this draft would run; for competition exchange, the POST /v1/rules:test_exchange body (test_exchange_strategy). Null when match is needs_answers or cant_import.
- `rule` object · nullable  
  After confirm: the saved rule (T0).
  - `rule_id` string · nullable  
    The saved rule's ID (rl_…).
  - `name` string  
    The name.
  - `version` integer · nullable  
    The saved version.
  - `new_version` boolean · nullable  
    Whether confirm made a new version.
  - `versions_tried` integer · nullable  
    Versions tried, as the rule tester counts.
  - `run_id` string · nullable  
    The rule test kept for it (run_…).
  - `hidden` boolean  
    true after undo.
- `test` object · nullable  
  Confirm only: the rule tester's report on the saved rule (test_rule's facts without the bets, and its summary).
- `others` array of string  
  When the source held several systems: the other drafts' ids.
- `created_at` string · nullable  
  When the draft was kept.  
  format date-time
- `expires_at` string · nullable  
  When an unconfirmed draft expires (30 days).  
  format date-time
- `confirmed_at` string · nullable  
  When it was confirmed.  
  format date-time
- `undo_until` string · nullable  
  Undo is open until then (7 days).  
  format date-time
- `contract_version` const · required  
  The import contract's version.  
  Always `"1.0.0"`.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`import_unreadable`](/problems/import_unreadable)

### Example
```http
POST https://api.askkelly.ai/v1/rules:import
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "text": "H and line<=-3 and p:L",
  "tool": "sdql",
  "competition": "nfl",
  "market": "spread",
  "from_season": "2023",
  "to_season": "2024"
}
```

```json
{
  "object": "rule_import",
  "id": null,
  "state": "draft",
  "source": {
    "tool": "sdql",
    "tool_label": "SDQL (KillerSports / SportsDataBase)",
    "kind": "api",
    "format": "sdql",
    "via": null,
    "formula_mode": null,
    "raw_ref": null,
    "captured_at": "2026-10-04T17:30:00Z",
    "text": "H and line<=-3 and p:L",
    "text_sha256": "ac5e42601cf5209bb381275989ee4652f463b74fa25190e705dfa422f87f9f96"
  },
  "system": {
    "name": null,
    "competition": "nfl",
    "market": "spread",
    "side": "rule",
    "bet_moment": "close",
    "seasons": [
      "2023",
      "2024"
    ],
    "season_type": "regular",
    "stake": "risk"
  },
  "conditions": [
    {
      "index": 0,
      "source_text": "H",
      "status": "exact",
      "formula": "=AND(home, NOT(neutral))",
      "reason": null,
      "question": null,
      "choices": [],
      "data_gap": null,
      "attributes": [
        "home",
        "neutral"
      ],
      "method": "deterministic",
      "resolution": null
    },
    {
      "index": 1,
      "source_text": "line<=-3",
      "status": "exact",
      "formula": "=spread_close <= -3",
      "reason": null,
      "question": null,
      "choices": [],
      "data_gap": null,
      "attributes": [
        "spread_close"
      ],
      "method": "deterministic",
      "resolution": null
    },
    {
      "index": 2,
      "source_text": "p:L",
      "status": "exact",
      "formula": "=LAG(result = \"L\")",
      "reason": null,
      "question": null,
      "choices": [],
      "data_gap": null,
      "attributes": [
        "result"
      ],
      "method": "deterministic",
      "resolution": null
    }
  ],
  "formula": "=AND(AND(home, NOT(neutral)), spread_close <= -3, LAG(result = \"L\"))",
  "match": "exact",
  "counts": {
    "exact": 3,
    "close": 0,
    "ask": 0,
    "cant_map": 0
  },
  "check": {
    "testable": true,
    "problems": []
  },
  "source_record": null,
  "ledger": {
    "label": "tuned elsewhere",
    "tries": 20,
    "tries_from": "default"
  },
  "labels": [
    "tuned elsewhere"
  ],
  "reader": {
    "name": "sdql",
    "method": "deterministic",
    "attempts": 1
  },
  "warnings": [
    {
      "code": "reader",
      "message": "Kelly reads earlier games (p:, P:) within the season tested, so a team's first game of a season has no previous game."
    },
    {
      "code": "line_source",
      "message": "Kelly tests at its own consensus line (closing lines from June 2020), which can differ from the source's line by a half point; the proof step compares the two game by game."
    }
  ],
  "test_request": {
    "formula": "=AND(AND(home, NOT(neutral)), spread_close <= -3, LAG(result = \"L\"))",
    "competition": "nfl",
    "market": "spread",
    "side": "rule",
    "bet_moment": "close",
    "seasons": [
      "2023",
      "2024"
    ],
    "season_type": "regular",
    "stake": "risk"
  },
  "rule": null,
  "created_at": "2026-10-04T17:30:00Z",
  "expires_at": null,
  "confirmed_at": null,
  "undo_until": null,
  "contract_version": "1.0.0"
}
```

```http
POST https://api.askkelly.ai/v1/rules:import
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "text": "Home/Away: Home\nFavorite/Underdog: Favorite\nRest Advantage: 2+ days\nPublic Betting %: under 40%",
  "competition": "nfl",
  "dry_run": false
}
```

```json
{
  "object": "rule_import",
  "id": "imp_7h7p7w2tvm42z7xg6fpy",
  "state": "draft",
  "source": {
    "tool": "bet_labs",
    "tool_label": "Bet Labs (Action Network)",
    "kind": "api",
    "format": "filter_list",
    "via": null,
    "formula_mode": null,
    "raw_ref": null,
    "captured_at": "2026-10-04T17:30:00Z",
    "text": "Home/Away: Home\nFavorite/Underdog: Favorite\nRest Advantage: 2+ days\nPublic Betting %: under 40%",
    "text_sha256": "076d17982bcb14c5005dc77136b1d087fad4b9e64ee54cd3917480fd10d22cbd"
  },
  "system": {
    "name": null,
    "competition": "nfl",
    "market": "spread",
    "side": "rule",
    "bet_moment": "close",
    "seasons": [
      "2020",
      "2021",
      "2022",
      "2023",
      "2024",
      "2025",
      "2026"
    ],
    "season_type": "regular",
    "stake": "risk"
  },
  "conditions": [
    {
      "index": 0,
      "source_text": "Home/Away: Home",
      "status": "exact",
      "formula": "=AND(home, NOT(neutral))",
      "reason": null,
      "question": null,
      "choices": [],
      "data_gap": null,
      "attributes": [
        "home",
        "neutral"
      ],
      "method": "deterministic",
      "resolution": null
    },
    {
      "index": 1,
      "source_text": "Favorite/Underdog: Favorite",
      "status": "exact",
      "formula": "=spread_close < 0",
      "reason": null,
      "question": null,
      "choices": [],
      "data_gap": null,
      "attributes": [
        "spread_close"
      ],
      "method": "deterministic",
      "resolution": null
    },
    {
      "index": 2,
      "source_text": "Rest Advantage: 2+ days",
      "status": "ask",
      "formula": null,
      "reason": null,
      "question": "Rest Advantage: what range did you set? Kelly read '2+ days'.",
      "choices": [],
      "data_gap": null,
      "attributes": [],
      "method": "deterministic",
      "resolution": null
    },
    {
      "index": 3,
      "source_text": "Public Betting %: under 40%",
      "status": "cant_map",
      "formula": null,
      "reason": "Bets %: Kelly holds betting splits only from Nov 2026 (S8).",
      "question": null,
      "choices": [],
      "data_gap": {
        "kind": "no_history",
        "detail": "Kelly holds betting splits only from Nov 2026 (S8)"
      },
      "attributes": [],
      "method": "deterministic",
      "resolution": null
    }
  ],
  "formula": "=AND(AND(home, NOT(neutral)), spread_close < 0)",
  "match": "needs_answers",
  "counts": {
    "exact": 2,
    "close": 0,
    "ask": 1,
    "cant_map": 1
  },
  "check": {
    "testable": true,
    "problems": []
  },
  "source_record": null,
  "ledger": {
    "label": "tuned elsewhere",
    "tries": 20,
    "tries_from": "default"
  },
  "labels": [
    "tuned elsewhere"
  ],
  "reader": {
    "name": "filters:bet_labs",
    "method": "deterministic",
    "attempts": 1
  },
  "warnings": [
    {
      "code": "reader",
      "message": "Kelly's names for bet_labs's filters come from its help pages, not a real export; check each condition against the source."
    },
    {
      "code": "needs_market",
      "message": "Say which bet the system makes: spread, moneyline, over or under. Kelly assumed the spread."
    },
    {
      "code": "line_source",
      "message": "Kelly tests at its own consensus line (closing lines from June 2020), which can differ from the source's line by a half point; the proof step compares the two game by game."
    },
    {
      "code": "seasons",
      "message": "The source names no seasons; Kelly tests 2020 to 2026, every season it holds lines for."
    }
  ],
  "test_request": null,
  "rule": null,
  "created_at": "2026-10-04T17:30:00Z",
  "expires_at": "2026-11-03T17:30:00Z",
  "confirmed_at": null,
  "undo_until": null,
  "contract_version": "1.0.0"
}
```

```http
POST https://api.askkelly.ai/v1/rules:import
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "text": "H and line<=-3 and p:L",
  "tool": "sdql",
  "competition": "nfl",
  "market": "parlay",
  "from_season": "2023",
  "to_season": "2024"
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "code": "invalid_request",
  "detail": "market: 'parlay' is not one of ['spread', 'moneyline', 'over', 'under', 'teaser', 'draw', 'win', 'place', 'each_way', 'lay', 'lay_place']",
  "param": "market",
  "doc_url": "https://docs.askkelly.ai/problems/invalid_request",
  "request_id": "req_607628b862cc4d353365ed7b",
  "retryable": false,
  "display_message": "Something in that request was not understood."
}
```

```http
POST https://api.askkelly.ai/v1/rules:import
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "text": "H and line<=-3 and p:L",
  "tool": "sdql",
  "competition": "nfl",
  "market": "spread",
  "from_season": "2023",
  "to_season": "2024",
  "dry_run": false
}
```

```json
{
  "object": "rule_import",
  "id": "imp_rm4wkv9vhwevdmh05d1z",
  "state": "draft",
  "source": {
    "tool": "sdql",
    "tool_label": "SDQL (KillerSports / SportsDataBase)",
    "kind": "api",
    "format": "sdql",
    "via": null,
    "formula_mode": null,
    "raw_ref": null,
    "captured_at": "2026-10-04T17:30:00Z",
    "text": "H and line<=-3 and p:L",
    "text_sha256": "ac5e42601cf5209bb381275989ee4652f463b74fa25190e705dfa422f87f9f96"
  },
  "system": {
    "name": null,
    "competition": "nfl",
    "market": "spread",
    "side": "rule",
    "bet_moment": "close",
    "seasons": [
      "2023",
      "2024"
    ],
    "season_type": "regular",
    "stake": "risk"
  },
  "conditions": [
    {
      "index": 0,
      "source_text": "H",
      "status": "exact",
      "formula": "=AND(home, NOT(neutral))",
      "reason": null,
      "question": null,
      "choices": [],
      "data_gap": null,
      "attributes": [
        "home",
        "neutral"
      ],
      "method": "deterministic",
      "resolution": null
    },
    {
      "index": 1,
      "source_text": "line<=-3",
      "status": "exact",
      "formula": "=spread_close <= -3",
      "reason": null,
      "question": null,
      "choices": [],
      "data_gap": null,
      "attributes": [
        "spread_close"
      ],
      "method": "deterministic",
      "resolution": null
    },
    {
      "index": 2,
      "source_text": "p:L",
      "status": "exact",
      "formula": "=LAG(result = \"L\")",
      "reason": null,
      "question": null,
      "choices": [],
      "data_gap": null,
      "attributes": [
        "result"
      ],
      "method": "deterministic",
      "resolution": null
    }
  ],
  "formula": "=AND(AND(home, NOT(neutral)), spread_close <= -3, LAG(result = \"L\"))",
  "match": "exact",
  "counts": {
    "exact": 3,
    "close": 0,
    "ask": 0,
    "cant_map": 0
  },
  "check": {
    "testable": true,
    "problems": []
  },
  "source_record": null,
  "ledger": {
    "label": "tuned elsewhere",
    "tries": 20,
    "tries_from": "default"
  },
  "labels": [
    "tuned elsewhere"
  ],
  "reader": {
    "name": "sdql",
    "method": "deterministic",
    "attempts": 1
  },
  "warnings": [
    {
      "code": "reader",
      "message": "Kelly reads earlier games (p:, P:) within the season tested, so a team's first game of a season has no previous game."
    },
    {
      "code": "line_source",
      "message": "Kelly tests at its own consensus line (closing lines from June 2020), which can differ from the source's line by a half point; the proof step compares the two game by game."
    }
  ],
  "test_request": {
    "formula": "=AND(AND(home, NOT(neutral)), spread_close <= -3, LAG(result = \"L\"))",
    "competition": "nfl",
    "market": "spread",
    "side": "rule",
    "bet_moment": "close",
    "seasons": [
      "2023",
      "2024"
    ],
    "season_type": "regular",
    "stake": "risk"
  },
  "rule": null,
  "created_at": "2026-10-04T17:30:00Z",
  "expires_at": "2026-11-03T17:30:00Z",
  "confirmed_at": null,
  "undo_until": null,
  "contract_version": "1.0.0"
}
```

`GET /v1/rules/imports/{import_id}`

## Get an imported system
scope `read:formulas` · 0 credits, not charged during the beta · MCP tool `get_rule_import` · status live

One of your kept imports: the draft with each condition's mapping, or the saved rule it became. Anyone else's answers 404.

### Parameters
- `import_id` string · path · required  
  The import's ID (imp_…).  
  pattern ^imp_[0123456789abcdefghjkmnpqrstvwxyz]{20}$

### Response
`200` The import: a draft, or the rule it was confirmed into.

- `object` const · required  
  Always rule_import.  
  Always `"rule_import"`.
- `id` string · required · nullable  
  The import's ID (imp_…); null on a dry run.  
  pattern ^imp_[0-9a-hjkmnp-tv-z]{20}$
- `state` any · required  
  draft, confirmed, undone or expired.  
  One of: `draft`, `confirmed`, `undone`, `expired` (open: new values may be added).
- `source` object · required  
  Where the system came from and its text.
  - `tool` string · nullable  
    The tool it came from (sdql, bet_labs, betiq...).  
    pattern ^[a-z0-9_.:-]{1,64}$
  - `tool_label` string · nullable  
    The tool's name in words.
  - `kind` any · required  
    How it reached Kelly: paste, url, file, image, email, extension, api, mcp, chat, bets or template.  
    One of: `paste`, `url`, `file`, `image`, `email`, `extension`, `api`, `mcp`, `chat`, `bets`, `template` (open: new values may be added).
  - `format` any · required  
    What the text is: sdql, filter_list, formula, plain or auto.  
    One of: `auto`, `sdql`, `filter_list`, `formula`, `plain`, `game_list` (open: new values may be added).
  - `via` one of several shapes  
    The entry point that passed it on.
  - `formula_mode` one of several shapes  
    The formula's mode (excel, sql, pandas...).
  - `raw_ref` string · nullable  
    Where it came from (a URL, file or message), kept and never fetched.
  - `captured_at` string · nullable  
    When Kelly received it.  
    format date-time
  - `text` string · nullable  
    The text as received (kept with the draft and the saved rule, for the proof screen; the owner sees it).
  - `text_sha256` string · nullable  
    The text's SHA-256, hex.  
    pattern ^[0-9a-f]{64}$
- `system` object · required  
  The bet the system makes, as the rule tester names it. A reader fills what the source says; the caller's hints win.
  - `name` string · nullable  
    The name.  
    max length 120
  - `competition` string · nullable  
    nfl, ncaaf, nba, wnba, ncaab, nhl, mlb ...  
    max length 32
  - `market` one of several shapes  
    spread, moneyline, over or under.
  - `side` any  
    rule (bet the matched team or over/under) or fade (the other side).  
    One of: `rule`, `fade` (open: new values may be added).
  - `bet_moment` any  
    close or edition.  
    One of: `open`, `edition`, `close` (open: new values may be added).
  - `seasons` array of string · nullable  
    1-25 season labels ("2024" or "2024-25"); or from_season and to_season.  
    min items 1 · max items 25
  - `season_type` one of several shapes  
    regular, postseason or all.
  - `stake` any  
    risk or to_win.  
    One of: `risk`, `to_win` (open: new values may be added).
  - `strategy` object · nullable  
    Competition exchange: the trading strategy's actions besides entry_when (exchange.contract.ACTIONS); the test runs them with the draft's formula as entry_when.
    - `entry_side` string  
      back (bet it to win) or lay (bet it to lose).  
      One of: `back`, `lay` (open: new values may be added).
    - `entry_order` string  
      take: match now at the best price on the other side (back at back_price), walking down the ladder up to max_slippage_ticks. join: offer at the best price on your own side (back at lay_price) and wait in the queue, entry_offset_ticks better or worse. limit: offer at entry_price.  
      One of: `take`, `join`, `limit` (open: new values may be added).
    - `entry_price` number  
      limit only: the price to offer at (a back takes this or longer, a lay this or shorter).
    - `entry_offset_ticks` integer  
      join only: ticks from the best own-side price; positive asks for a better price (a back offered longer), negative a worse one.
    - `max_slippage_ticks` integer  
      take only: how many ticks past the best price a take may match at; what is left waits at the last price taken.
    - `stake` number  
      The entry stake in the market's currency (a lay's backer's stake unless stake_type is liability).
    - `stake_type` string  
      lay only: stake is the backer's stake you accept; liability is what you can lose.  
      One of: `stake`, `liability` (open: new values may be added).
    - `max_entries` integer  
      Entries per runner per market (Bet Angel's 'place bet triggers on the selection'); the next waits until the last is closed.
    - `fill_or_kill_s` number  
      Seconds an unmatched entry may wait before it is cancelled (0 cancels what doesn't match at once). Blank: it waits until the market turns in play.
    - `keep_in_play` boolean  
      TRUE keeps unmatched orders when the market turns in play (Betfair's persist); FALSE (default) cancels them at the off (lapse).
    - `take_profit_ticks` integer  
      Once the entry is matched, offer the green-up exit this many ticks in profit and wait for it to match.
    - `stop_loss_ticks` integer  
      When the position is this many ticks against (position_ticks <= -n), cancel the take-profit and green up now at the best price (a take).
    - `trailing_stop` boolean  
      The stop loss follows the best position_ticks so far (it trails n ticks behind).
    - `exit_when` string  
      A formula on the runner's ticks that greens up now at the best price when true (may read position_* columns).
    - `exit_before_off_s` number  
      Green up at the best price this many seconds before the scheduled off (0 is at the off). Blank: no time exit.
    - `green_up` boolean  
      TRUE (default): exits are sized to make the same profit on every outcome. FALSE: no exit, the matched entry is held to the result.
    - `commission` number  
      The exchange's commission on a market's net winnings, as a share (0.05 is 5%).
    - `min_stake` number  
      The exchange's smallest stake: a green-up smaller than this can't be placed, and the position is held to the result.
    - `fill_model` string  
      queue (default): a waiting order matches only after the money queued ahead of it at that price has traded. touch: it matches as soon as its price trades (optimistic).  
      One of: `queue`, `touch` (open: new values may be added).
- `conditions` array of object · required  
  One entry per condition the source states, in its order.  
  max items 60
  - `index` integer · required  
    The condition's place in the source, from 0.  
    min 0
  - `source_text` string · required  
    The condition as the source wrote it.  
    max length 2000
  - `status` any · required  
    exact, close, ask or cant_map.  
    One of: `exact`, `close`, `ask`, `cant_map` (open: new values may be added).
  - `formula` string · nullable  
    Kelly formula (Excel mode, starts with =); null for ask and cant_map.  
    max length 2000
  - `reason` string · nullable  
    Why close or can't map; how it differs from the source.
  - `question` string · nullable  
    For ask: the question for the user.
  - `choices` array of object  
    The readings to choose from, each with its formula.
    - `label` string · required  
      The choice in words.
    - `formula` string · required  
      The Kelly formula (TRUE or FALSE on each team-game).
  - `data_gap` object · nullable  
    What Kelly lacks for a condition it can't import.
    - `kind` any · required  
      How it reached Kelly: paste, url, file, image, email, extension, api, mcp, chat, bets or template.  
      One of: `no_attribute`, `no_history`, `not_loaded`, `out_of_grain`, `licence`, `edge`, `look_ahead` (open: new values may be added).
    - `detail` string · required  
      The detail, in words.
  - `attributes` array of string  
    Kelly attribute names the formula reads.
  - `method` any  
    deterministic, ai or user.  
    One of: `deterministic`, `ai`, `user` (open: new values may be added).
  - `resolution` one of several shapes  
    removed or live_only, for a condition left out.
- `formula` string · required · nullable  
  AND of the exact and close conditions.
- `match` any · required  
  exact, close_match, needs_answers or cant_import.  
  One of: `exact`, `close_match`, `needs_answers`, `cant_import` (open: new values may be added).
- `counts` object · required  
  Conditions by status.
  - `exact` integer · required  
    Conditions mapped exactly.  
    min 0
  - `close` integer · required  
    Conditions mapped closely.  
    min 0
  - `ask` integer · required  
    Conditions waiting on an answer.  
    min 0
  - `cant_map` integer · required  
    Conditions Kelly can't import.  
    min 0
- `check` object · required  
  kformula.check and the look-ahead check on the combined formula, at system.bet_moment. The leak test runs with the rule tester at confirm.
  - `testable` boolean · required  
    Whether the rule tester can test the formula.
  - `problems` array of object · required  
    Each reason it can't be tested yet.
    - `code` string · required  
      The reason's code.
    - `path` string · nullable  
      The attribute it concerns.
    - `message` string · required  
      The reason in words.
    - `fixes` array of object  
      Ways to fix it.
- `source_record` object · nullable  
  The source's own record, as reported; never Kelly's numbers.
  - `wins` integer · nullable  
    Wins as the source wrote them.  
    min 0
  - `losses` integer · nullable  
    Losses as the source wrote them.  
    min 0
  - `pushes` integer · nullable  
    Pushes as the source wrote them.  
    min 0
  - `units` number · nullable  
    Units as the source wrote them.
  - `roi` number · nullable  
    A fraction (0.078).
  - `since` string · nullable  
    The first season or date the source counted from.
  - `market` string · nullable  
    The bet the record is on, as the source said it.
  - `as_reported` boolean  
    Always true: the source's claim, copied (T9f's pre-pass).
  - `games` array of object  
    The source's own list of games.  
    max items 5000
    - `date` string  
      The game's date.
    - `team` string  
      The team.
    - `opponent` string · nullable  
      The opponent.
    - `home` boolean · nullable  
      Whether the team was at home.
    - `line` number · nullable  
      The line taken.
    - `price` number · nullable  
      American odds as listed.
    - `result` string · nullable  
      The result as the source wrote it.
    - `units` number · nullable  
      Units as the source wrote them.
    - `text` string · nullable  
      The row as the source wrote it.
- `ledger` object · required  
  How the import counts on the rules-tried ledger at confirm (I1).
  - `label` const · required  
    The choice in words.  
    Always `"tuned elsewhere"`.
  - `tries` integer · required  
    Rules counted as tried.  
    min 1 · max 1000
  - `tries_from` any · required  
    default (20) or user.  
    One of: `default`, `user` (open: new values may be added).
- `labels` array of object  
  "tuned elsewhere", and "close match" when match is close_match.
- `reader` object · required  
  The reader that read it.
  - `name` string · required  
    The name.
  - `method` any · required  
    deterministic, ai or user.  
    One of: `deterministic`, `ai`, `user` (open: new values may be added).
  - `attempts` integer  
    The AI reader's calls (1 to 3).  
    min 1
- `warnings` array of object · required  
  Notes on how Kelly read it.
  - `code` string · required  
    The reason's code.
  - `message` string · required  
    The reason in words.
- `test_request` object · nullable  
  The POST /v1/rules:test body this draft would run; for competition exchange, the POST /v1/rules:test_exchange body (test_exchange_strategy). Null when match is needs_answers or cant_import.
- `rule` object · nullable  
  After confirm: the saved rule (T0).
  - `rule_id` string · nullable  
    The saved rule's ID (rl_…).
  - `name` string  
    The name.
  - `version` integer · nullable  
    The saved version.
  - `new_version` boolean · nullable  
    Whether confirm made a new version.
  - `versions_tried` integer · nullable  
    Versions tried, as the rule tester counts.
  - `run_id` string · nullable  
    The rule test kept for it (run_…).
  - `hidden` boolean  
    true after undo.
- `test` object · nullable  
  Confirm only: the rule tester's report on the saved rule (test_rule's facts without the bets, and its summary).
- `others` array of string  
  When the source held several systems: the other drafts' ids.
- `created_at` string · nullable  
  When the draft was kept.  
  format date-time
- `expires_at` string · nullable  
  When an unconfirmed draft expires (30 days).  
  format date-time
- `confirmed_at` string · nullable  
  When it was confirmed.  
  format date-time
- `undo_until` string · nullable  
  Undo is open until then (7 days).  
  format date-time
- `contract_version` const · required  
  The import contract's version.  
  Always `"1.0.0"`.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found)

### Example
```http
GET https://api.askkelly.ai/v1/rules/imports/imp_rm4wkv9vhwevdmh05d1z
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "id": "imp_rm4wkv9vhwevdmh05d1z",
  "rule": null,
  "check": {
    "problems": [],
    "testable": true
  },
  "match": "exact",
  "state": "draft",
  "counts": {
    "ask": 0,
    "close": 0,
    "exact": 3,
    "cant_map": 0
  },
  "labels": [
    "tuned elsewhere"
  ],
  "ledger": {
    "label": "tuned elsewhere",
    "tries": 20,
    "tries_from": "default"
  },
  "object": "rule_import",
  "reader": {
    "name": "sdql",
    "method": "deterministic",
    "attempts": 1
  },
  "source": {
    "via": null,
    "kind": "api",
    "text": "H and line<=-3 and p:L",
    "tool": "sdql",
    "format": "sdql",
    "raw_ref": null,
    "tool_label": "SDQL (KillerSports / SportsDataBase)",
    "captured_at": "2026-10-04T17:30:00Z",
    "text_sha256": "ac5e42601cf5209bb381275989ee4652f463b74fa25190e705dfa422f87f9f96",
    "formula_mode": null
  },
  "system": {
    "name": null,
    "side": "rule",
    "stake": "risk",
    "market": "spread",
    "seasons": [
      "2023",
      "2024"
    ],
    "bet_moment": "close",
    "competition": "nfl",
    "season_type": "regular"
  },
  "formula": "=AND(AND(home, NOT(neutral)), spread_close <= -3, LAG(result = \"L\"))",
  "warnings": [
    {
      "code": "reader",
      "message": "Kelly reads earlier games (p:, P:) within the season tested, so a team's first game of a season has no previous game."
    },
    {
      "code": "line_source",
      "message": "Kelly tests at its own consensus line (closing lines from June 2020), which can differ from the source's line by a half point; the proof step compares the two game by game."
    }
  ],
  "conditions": [
    {
      "index": 0,
      "method": "deterministic",
      "reason": null,
      "status": "exact",
      "choices": [],
      "formula": "=AND(home, NOT(neutral))",
      "data_gap": null,
      "question": null,
      "attributes": [
        "home",
        "neutral"
      ],
      "resolution": null,
      "source_text": "H"
    },
    {
      "index": 1,
      "method": "deterministic",
      "reason": null,
      "status": "exact",
      "choices": [],
      "formula": "=spread_close <= -3",
      "data_gap": null,
      "question": null,
      "attributes": [
        "spread_close"
      ],
      "resolution": null,
      "source_text": "line<=-3"
    },
    {
      "index": 2,
      "method": "deterministic",
      "reason": null,
      "status": "exact",
      "choices": [],
      "formula": "=LAG(result = \"L\")",
      "data_gap": null,
      "question": null,
      "attributes": [
        "result"
      ],
      "resolution": null,
      "source_text": "p:L"
    }
  ],
  "created_at": "2026-10-04T17:30:00Z",
  "expires_at": "2026-11-03T17:30:00Z",
  "undo_until": null,
  "confirmed_at": null,
  "test_request": {
    "side": "rule",
    "stake": "risk",
    "market": "spread",
    "formula": "=AND(AND(home, NOT(neutral)), spread_close <= -3, LAG(result = \"L\"))",
    "seasons": [
      "2023",
      "2024"
    ],
    "bet_moment": "close",
    "competition": "nfl",
    "season_type": "regular"
  },
  "source_record": null,
  "contract_version": "1.0.0"
}
```

```http
GET https://api.askkelly.ai/v1/rules/imports/imp_zzzzzzzzzzzzzzzzzzzz
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/not_found",
  "title": "Not found",
  "status": 404,
  "code": "not_found",
  "detail": "No import with that ID on this account.",
  "param": "import_id",
  "doc_url": "https://docs.askkelly.ai/problems/not_found",
  "request_id": "req_303b0fcd43914312dba33164",
  "retryable": false,
  "display_message": "That could not be found."
}
```

`POST /v1/rules:import/{import_id}:confirm`

## Save an imported system
scope `write:formulas` · 1 credit, not charged during the beta · MCP tool `confirm_rule_import` · status live

Applies your answers and edits (conditions), tests the rule with the rule tester and saves it as a saved rule labelled tuned elsewhere, counted as the versions you tried elsewhere (versions_tried, default 20) on your rules-tried ledger. A close match needs accept_close: true and is labelled close match; a condition Kelly can't import is left out, never dropped silently. Needs your own live API key with write:formulas; an AI app imports through Kelly MCP, which asks you first.

### Parameters
- `import_id` string · path · required  
  The import's ID (imp_…).  
  pattern ^imp_[0123456789abcdefghjkmnpqrstvwxyz]{20}$

Body, `application/json` (required):

- `name` string  
  The saved rule's name (unique per account); default system.name.  
  max length 120
- `conditions` array of object  
  One entry per condition the source states, in its order.  
  max items 60
  - `index` integer · required  
    The condition's place in the source, from 0.  
    min 0
  - `formula` string  
    The formula to use (an answer's choice or the user's own).
  - `status` any  
    Default: exact for a choice the mapper offered, close for the user's own formula.  
    One of: `exact`, `close`, `cant_map` (open: new values may be added).
  - `resolution` any  
    For a cant_map condition: removed or live_only.  
    One of: `removed`, `live_only` (open: new values may be added).
- `versions_tried` integer  
  How many versions the user tried in the other tool (I1).  
  min 1 · max 1000 · default 20
- `accept_close` boolean  
  Required true when match is close_match (I4). Every cant_map condition needs a resolution; with accept_close, one left unresolved is removed.  
  default false
- `competition` string  
  The league.
- `market` any  
  spread, moneyline, over or under.  
  One of: `spread`, `moneyline`, `over`, `under`, `teaser`, `draw`, `win`, `place`, `each_way`, `lay`, `lay_place` (open: new values may be added).
- `side` any  
  rule or fade.  
  One of: `rule`, `fade` (open: new values may be added).
- `bet_moment` any  
  close or edition.  
  One of: `open`, `edition`, `close` (open: new values may be added).
- `seasons` array of string  
  1-25 season labels ("2024" or "2024-25"); or from_season and to_season.  
  min items 1 · max items 25
- `stake` any  
  risk or to_win.  
  One of: `risk`, `to_win` (open: new values may be added).
- `strategy` object · nullable  
  Competition exchange: the trading strategy's actions besides entry_when (exchange.contract.ACTIONS); the test runs them with the draft's formula as entry_when.
  - `entry_side` string  
    back (bet it to win) or lay (bet it to lose).  
    One of: `back`, `lay` (open: new values may be added).
  - `entry_order` string  
    take: match now at the best price on the other side (back at back_price), walking down the ladder up to max_slippage_ticks. join: offer at the best price on your own side (back at lay_price) and wait in the queue, entry_offset_ticks better or worse. limit: offer at entry_price.  
    One of: `take`, `join`, `limit` (open: new values may be added).
  - `entry_price` number  
    limit only: the price to offer at (a back takes this or longer, a lay this or shorter).
  - `entry_offset_ticks` integer  
    join only: ticks from the best own-side price; positive asks for a better price (a back offered longer), negative a worse one.
  - `max_slippage_ticks` integer  
    take only: how many ticks past the best price a take may match at; what is left waits at the last price taken.
  - `stake` number  
    The entry stake in the market's currency (a lay's backer's stake unless stake_type is liability).
  - `stake_type` string  
    lay only: stake is the backer's stake you accept; liability is what you can lose.  
    One of: `stake`, `liability` (open: new values may be added).
  - `max_entries` integer  
    Entries per runner per market (Bet Angel's 'place bet triggers on the selection'); the next waits until the last is closed.
  - `fill_or_kill_s` number  
    Seconds an unmatched entry may wait before it is cancelled (0 cancels what doesn't match at once). Blank: it waits until the market turns in play.
  - `keep_in_play` boolean  
    TRUE keeps unmatched orders when the market turns in play (Betfair's persist); FALSE (default) cancels them at the off (lapse).
  - `take_profit_ticks` integer  
    Once the entry is matched, offer the green-up exit this many ticks in profit and wait for it to match.
  - `stop_loss_ticks` integer  
    When the position is this many ticks against (position_ticks <= -n), cancel the take-profit and green up now at the best price (a take).
  - `trailing_stop` boolean  
    The stop loss follows the best position_ticks so far (it trails n ticks behind).
  - `exit_when` string  
    A formula on the runner's ticks that greens up now at the best price when true (may read position_* columns).
  - `exit_before_off_s` number  
    Green up at the best price this many seconds before the scheduled off (0 is at the off). Blank: no time exit.
  - `green_up` boolean  
    TRUE (default): exits are sized to make the same profit on every outcome. FALSE: no exit, the matched entry is held to the result.
  - `commission` number  
    The exchange's commission on a market's net winnings, as a share (0.05 is 5%).
  - `min_stake` number  
    The exchange's smallest stake: a green-up smaller than this can't be placed, and the position is held to the result.
  - `fill_model` string  
    queue (default): a waiting order matches only after the money queued ahead of it at that price has traded. touch: it matches as soon as its price trades (optimistic).  
    One of: `queue`, `touch` (open: new values may be added).
- `detail` any  
  The rule tester report's detail (default summary).  
  One of: `summary`, `full` (open: new values may be added).

### Response
`200` The import, confirmed: the saved rule under rule and the rule tester's report under test.

- `object` const · required  
  Always rule_import.  
  Always `"rule_import"`.
- `id` string · required · nullable  
  The import's ID (imp_…); null on a dry run.  
  pattern ^imp_[0-9a-hjkmnp-tv-z]{20}$
- `state` any · required  
  draft, confirmed, undone or expired.  
  One of: `draft`, `confirmed`, `undone`, `expired` (open: new values may be added).
- `source` object · required  
  Where the system came from and its text.
  - `tool` string · nullable  
    The tool it came from (sdql, bet_labs, betiq...).  
    pattern ^[a-z0-9_.:-]{1,64}$
  - `tool_label` string · nullable  
    The tool's name in words.
  - `kind` any · required  
    How it reached Kelly: paste, url, file, image, email, extension, api, mcp, chat, bets or template.  
    One of: `paste`, `url`, `file`, `image`, `email`, `extension`, `api`, `mcp`, `chat`, `bets`, `template` (open: new values may be added).
  - `format` any · required  
    What the text is: sdql, filter_list, formula, plain or auto.  
    One of: `auto`, `sdql`, `filter_list`, `formula`, `plain`, `game_list` (open: new values may be added).
  - `via` one of several shapes  
    The entry point that passed it on.
  - `formula_mode` one of several shapes  
    The formula's mode (excel, sql, pandas...).
  - `raw_ref` string · nullable  
    Where it came from (a URL, file or message), kept and never fetched.
  - `captured_at` string · nullable  
    When Kelly received it.  
    format date-time
  - `text` string · nullable  
    The text as received (kept with the draft and the saved rule, for the proof screen; the owner sees it).
  - `text_sha256` string · nullable  
    The text's SHA-256, hex.  
    pattern ^[0-9a-f]{64}$
- `system` object · required  
  The bet the system makes, as the rule tester names it. A reader fills what the source says; the caller's hints win.
  - `name` string · nullable  
    The name.  
    max length 120
  - `competition` string · nullable  
    nfl, ncaaf, nba, wnba, ncaab, nhl, mlb ...  
    max length 32
  - `market` one of several shapes  
    spread, moneyline, over or under.
  - `side` any  
    rule (bet the matched team or over/under) or fade (the other side).  
    One of: `rule`, `fade` (open: new values may be added).
  - `bet_moment` any  
    close or edition.  
    One of: `open`, `edition`, `close` (open: new values may be added).
  - `seasons` array of string · nullable  
    1-25 season labels ("2024" or "2024-25"); or from_season and to_season.  
    min items 1 · max items 25
  - `season_type` one of several shapes  
    regular, postseason or all.
  - `stake` any  
    risk or to_win.  
    One of: `risk`, `to_win` (open: new values may be added).
  - `strategy` object · nullable  
    Competition exchange: the trading strategy's actions besides entry_when (exchange.contract.ACTIONS); the test runs them with the draft's formula as entry_when.
    - `entry_side` string  
      back (bet it to win) or lay (bet it to lose).  
      One of: `back`, `lay` (open: new values may be added).
    - `entry_order` string  
      take: match now at the best price on the other side (back at back_price), walking down the ladder up to max_slippage_ticks. join: offer at the best price on your own side (back at lay_price) and wait in the queue, entry_offset_ticks better or worse. limit: offer at entry_price.  
      One of: `take`, `join`, `limit` (open: new values may be added).
    - `entry_price` number  
      limit only: the price to offer at (a back takes this or longer, a lay this or shorter).
    - `entry_offset_ticks` integer  
      join only: ticks from the best own-side price; positive asks for a better price (a back offered longer), negative a worse one.
    - `max_slippage_ticks` integer  
      take only: how many ticks past the best price a take may match at; what is left waits at the last price taken.
    - `stake` number  
      The entry stake in the market's currency (a lay's backer's stake unless stake_type is liability).
    - `stake_type` string  
      lay only: stake is the backer's stake you accept; liability is what you can lose.  
      One of: `stake`, `liability` (open: new values may be added).
    - `max_entries` integer  
      Entries per runner per market (Bet Angel's 'place bet triggers on the selection'); the next waits until the last is closed.
    - `fill_or_kill_s` number  
      Seconds an unmatched entry may wait before it is cancelled (0 cancels what doesn't match at once). Blank: it waits until the market turns in play.
    - `keep_in_play` boolean  
      TRUE keeps unmatched orders when the market turns in play (Betfair's persist); FALSE (default) cancels them at the off (lapse).
    - `take_profit_ticks` integer  
      Once the entry is matched, offer the green-up exit this many ticks in profit and wait for it to match.
    - `stop_loss_ticks` integer  
      When the position is this many ticks against (position_ticks <= -n), cancel the take-profit and green up now at the best price (a take).
    - `trailing_stop` boolean  
      The stop loss follows the best position_ticks so far (it trails n ticks behind).
    - `exit_when` string  
      A formula on the runner's ticks that greens up now at the best price when true (may read position_* columns).
    - `exit_before_off_s` number  
      Green up at the best price this many seconds before the scheduled off (0 is at the off). Blank: no time exit.
    - `green_up` boolean  
      TRUE (default): exits are sized to make the same profit on every outcome. FALSE: no exit, the matched entry is held to the result.
    - `commission` number  
      The exchange's commission on a market's net winnings, as a share (0.05 is 5%).
    - `min_stake` number  
      The exchange's smallest stake: a green-up smaller than this can't be placed, and the position is held to the result.
    - `fill_model` string  
      queue (default): a waiting order matches only after the money queued ahead of it at that price has traded. touch: it matches as soon as its price trades (optimistic).  
      One of: `queue`, `touch` (open: new values may be added).
- `conditions` array of object · required  
  One entry per condition the source states, in its order.  
  max items 60
  - `index` integer · required  
    The condition's place in the source, from 0.  
    min 0
  - `source_text` string · required  
    The condition as the source wrote it.  
    max length 2000
  - `status` any · required  
    exact, close, ask or cant_map.  
    One of: `exact`, `close`, `ask`, `cant_map` (open: new values may be added).
  - `formula` string · nullable  
    Kelly formula (Excel mode, starts with =); null for ask and cant_map.  
    max length 2000
  - `reason` string · nullable  
    Why close or can't map; how it differs from the source.
  - `question` string · nullable  
    For ask: the question for the user.
  - `choices` array of object  
    The readings to choose from, each with its formula.
    - `label` string · required  
      The choice in words.
    - `formula` string · required  
      The Kelly formula (TRUE or FALSE on each team-game).
  - `data_gap` object · nullable  
    What Kelly lacks for a condition it can't import.
    - `kind` any · required  
      How it reached Kelly: paste, url, file, image, email, extension, api, mcp, chat, bets or template.  
      One of: `no_attribute`, `no_history`, `not_loaded`, `out_of_grain`, `licence`, `edge`, `look_ahead` (open: new values may be added).
    - `detail` string · required  
      The detail, in words.
  - `attributes` array of string  
    Kelly attribute names the formula reads.
  - `method` any  
    deterministic, ai or user.  
    One of: `deterministic`, `ai`, `user` (open: new values may be added).
  - `resolution` one of several shapes  
    removed or live_only, for a condition left out.
- `formula` string · required · nullable  
  AND of the exact and close conditions.
- `match` any · required  
  exact, close_match, needs_answers or cant_import.  
  One of: `exact`, `close_match`, `needs_answers`, `cant_import` (open: new values may be added).
- `counts` object · required  
  Conditions by status.
  - `exact` integer · required  
    Conditions mapped exactly.  
    min 0
  - `close` integer · required  
    Conditions mapped closely.  
    min 0
  - `ask` integer · required  
    Conditions waiting on an answer.  
    min 0
  - `cant_map` integer · required  
    Conditions Kelly can't import.  
    min 0
- `check` object · required  
  kformula.check and the look-ahead check on the combined formula, at system.bet_moment. The leak test runs with the rule tester at confirm.
  - `testable` boolean · required  
    Whether the rule tester can test the formula.
  - `problems` array of object · required  
    Each reason it can't be tested yet.
    - `code` string · required  
      The reason's code.
    - `path` string · nullable  
      The attribute it concerns.
    - `message` string · required  
      The reason in words.
    - `fixes` array of object  
      Ways to fix it.
- `source_record` object · nullable  
  The source's own record, as reported; never Kelly's numbers.
  - `wins` integer · nullable  
    Wins as the source wrote them.  
    min 0
  - `losses` integer · nullable  
    Losses as the source wrote them.  
    min 0
  - `pushes` integer · nullable  
    Pushes as the source wrote them.  
    min 0
  - `units` number · nullable  
    Units as the source wrote them.
  - `roi` number · nullable  
    A fraction (0.078).
  - `since` string · nullable  
    The first season or date the source counted from.
  - `market` string · nullable  
    The bet the record is on, as the source said it.
  - `as_reported` boolean  
    Always true: the source's claim, copied (T9f's pre-pass).
  - `games` array of object  
    The source's own list of games.  
    max items 5000
    - `date` string  
      The game's date.
    - `team` string  
      The team.
    - `opponent` string · nullable  
      The opponent.
    - `home` boolean · nullable  
      Whether the team was at home.
    - `line` number · nullable  
      The line taken.
    - `price` number · nullable  
      American odds as listed.
    - `result` string · nullable  
      The result as the source wrote it.
    - `units` number · nullable  
      Units as the source wrote them.
    - `text` string · nullable  
      The row as the source wrote it.
- `ledger` object · required  
  How the import counts on the rules-tried ledger at confirm (I1).
  - `label` const · required  
    The choice in words.  
    Always `"tuned elsewhere"`.
  - `tries` integer · required  
    Rules counted as tried.  
    min 1 · max 1000
  - `tries_from` any · required  
    default (20) or user.  
    One of: `default`, `user` (open: new values may be added).
- `labels` array of object  
  "tuned elsewhere", and "close match" when match is close_match.
- `reader` object · required  
  The reader that read it.
  - `name` string · required  
    The name.
  - `method` any · required  
    deterministic, ai or user.  
    One of: `deterministic`, `ai`, `user` (open: new values may be added).
  - `attempts` integer  
    The AI reader's calls (1 to 3).  
    min 1
- `warnings` array of object · required  
  Notes on how Kelly read it.
  - `code` string · required  
    The reason's code.
  - `message` string · required  
    The reason in words.
- `test_request` object · nullable  
  The POST /v1/rules:test body this draft would run; for competition exchange, the POST /v1/rules:test_exchange body (test_exchange_strategy). Null when match is needs_answers or cant_import.
- `rule` object · nullable  
  After confirm: the saved rule (T0).
  - `rule_id` string · nullable  
    The saved rule's ID (rl_…).
  - `name` string  
    The name.
  - `version` integer · nullable  
    The saved version.
  - `new_version` boolean · nullable  
    Whether confirm made a new version.
  - `versions_tried` integer · nullable  
    Versions tried, as the rule tester counts.
  - `run_id` string · nullable  
    The rule test kept for it (run_…).
  - `hidden` boolean  
    true after undo.
- `test` object · nullable  
  Confirm only: the rule tester's report on the saved rule (test_rule's facts without the bets, and its summary).
- `others` array of string  
  When the source held several systems: the other drafts' ids.
- `created_at` string · nullable  
  When the draft was kept.  
  format date-time
- `expires_at` string · nullable  
  When an unconfirmed draft expires (30 days).  
  format date-time
- `confirmed_at` string · nullable  
  When it was confirmed.  
  format date-time
- `undo_until` string · nullable  
  Undo is open until then (7 days).  
  format date-time
- `contract_version` const · required  
  The import contract's version.  
  Always `"1.0.0"`.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`payload_too_large`](/problems/payload_too_large) · [`not_found`](/problems/not_found) · [`import_not_ready`](/problems/import_not_ready) · [`import_confirmed`](/problems/import_confirmed) · [`import_expired`](/problems/import_expired) · [`rule_not_testable`](/problems/rule_not_testable) · [`conflict`](/problems/conflict)

### Example
```http
POST https://api.askkelly.ai/v1/rules:import/imp_7h7p7w2tvm42z7xg6fpy:confirm
Authorization: Bearer $KELLY_API_KEY
Content-Type: application/json

{
  "name": "Rested home favourites"
}
```

```json
{
  "type": "https://docs.askkelly.ai/problems/import_not_ready",
  "title": "Import not ready",
  "status": 422,
  "code": "import_not_ready",
  "detail": "Answer condition 2 first (conditions[].formula from its choices).",
  "param": "conditions",
  "doc_url": "https://docs.askkelly.ai/problems/import_not_ready",
  "request_id": "req_d085c4c4f9bb07331b3d9eaa",
  "retryable": false,
  "display_message": "That import needs your answers before it can be saved.",
  "match": "needs_answers",
  "problems": []
}
```

`POST /v1/rules:import/{import_id}:undo`

## Undo a saved import
scope `write:formulas` · 0 credits, not charged during the beta · MCP tool `undo_rule_import` · status live

Hides the rule an import saved, once, within 7 days of confirming. The rules-tried ledger keeps its count (S6). Needs your own live API key with write:formulas; an AI app imports through Kelly MCP, which asks you first.

### Parameters
- `import_id` string · path · required  
  The import's ID (imp_…).  
  pattern ^imp_[0123456789abcdefghjkmnpqrstvwxyz]{20}$

### Response
`200` The import, undone: its saved rule hidden.

- `object` const · required  
  Always rule_import.  
  Always `"rule_import"`.
- `id` string · required · nullable  
  The import's ID (imp_…); null on a dry run.  
  pattern ^imp_[0-9a-hjkmnp-tv-z]{20}$
- `state` any · required  
  draft, confirmed, undone or expired.  
  One of: `draft`, `confirmed`, `undone`, `expired` (open: new values may be added).
- `source` object · required  
  Where the system came from and its text.
  - `tool` string · nullable  
    The tool it came from (sdql, bet_labs, betiq...).  
    pattern ^[a-z0-9_.:-]{1,64}$
  - `tool_label` string · nullable  
    The tool's name in words.
  - `kind` any · required  
    How it reached Kelly: paste, url, file, image, email, extension, api, mcp, chat, bets or template.  
    One of: `paste`, `url`, `file`, `image`, `email`, `extension`, `api`, `mcp`, `chat`, `bets`, `template` (open: new values may be added).
  - `format` any · required  
    What the text is: sdql, filter_list, formula, plain or auto.  
    One of: `auto`, `sdql`, `filter_list`, `formula`, `plain`, `game_list` (open: new values may be added).
  - `via` one of several shapes  
    The entry point that passed it on.
  - `formula_mode` one of several shapes  
    The formula's mode (excel, sql, pandas...).
  - `raw_ref` string · nullable  
    Where it came from (a URL, file or message), kept and never fetched.
  - `captured_at` string · nullable  
    When Kelly received it.  
    format date-time
  - `text` string · nullable  
    The text as received (kept with the draft and the saved rule, for the proof screen; the owner sees it).
  - `text_sha256` string · nullable  
    The text's SHA-256, hex.  
    pattern ^[0-9a-f]{64}$
- `system` object · required  
  The bet the system makes, as the rule tester names it. A reader fills what the source says; the caller's hints win.
  - `name` string · nullable  
    The name.  
    max length 120
  - `competition` string · nullable  
    nfl, ncaaf, nba, wnba, ncaab, nhl, mlb ...  
    max length 32
  - `market` one of several shapes  
    spread, moneyline, over or under.
  - `side` any  
    rule (bet the matched team or over/under) or fade (the other side).  
    One of: `rule`, `fade` (open: new values may be added).
  - `bet_moment` any  
    close or edition.  
    One of: `open`, `edition`, `close` (open: new values may be added).
  - `seasons` array of string · nullable  
    1-25 season labels ("2024" or "2024-25"); or from_season and to_season.  
    min items 1 · max items 25
  - `season_type` one of several shapes  
    regular, postseason or all.
  - `stake` any  
    risk or to_win.  
    One of: `risk`, `to_win` (open: new values may be added).
  - `strategy` object · nullable  
    Competition exchange: the trading strategy's actions besides entry_when (exchange.contract.ACTIONS); the test runs them with the draft's formula as entry_when.
    - `entry_side` string  
      back (bet it to win) or lay (bet it to lose).  
      One of: `back`, `lay` (open: new values may be added).
    - `entry_order` string  
      take: match now at the best price on the other side (back at back_price), walking down the ladder up to max_slippage_ticks. join: offer at the best price on your own side (back at lay_price) and wait in the queue, entry_offset_ticks better or worse. limit: offer at entry_price.  
      One of: `take`, `join`, `limit` (open: new values may be added).
    - `entry_price` number  
      limit only: the price to offer at (a back takes this or longer, a lay this or shorter).
    - `entry_offset_ticks` integer  
      join only: ticks from the best own-side price; positive asks for a better price (a back offered longer), negative a worse one.
    - `max_slippage_ticks` integer  
      take only: how many ticks past the best price a take may match at; what is left waits at the last price taken.
    - `stake` number  
      The entry stake in the market's currency (a lay's backer's stake unless stake_type is liability).
    - `stake_type` string  
      lay only: stake is the backer's stake you accept; liability is what you can lose.  
      One of: `stake`, `liability` (open: new values may be added).
    - `max_entries` integer  
      Entries per runner per market (Bet Angel's 'place bet triggers on the selection'); the next waits until the last is closed.
    - `fill_or_kill_s` number  
      Seconds an unmatched entry may wait before it is cancelled (0 cancels what doesn't match at once). Blank: it waits until the market turns in play.
    - `keep_in_play` boolean  
      TRUE keeps unmatched orders when the market turns in play (Betfair's persist); FALSE (default) cancels them at the off (lapse).
    - `take_profit_ticks` integer  
      Once the entry is matched, offer the green-up exit this many ticks in profit and wait for it to match.
    - `stop_loss_ticks` integer  
      When the position is this many ticks against (position_ticks <= -n), cancel the take-profit and green up now at the best price (a take).
    - `trailing_stop` boolean  
      The stop loss follows the best position_ticks so far (it trails n ticks behind).
    - `exit_when` string  
      A formula on the runner's ticks that greens up now at the best price when true (may read position_* columns).
    - `exit_before_off_s` number  
      Green up at the best price this many seconds before the scheduled off (0 is at the off). Blank: no time exit.
    - `green_up` boolean  
      TRUE (default): exits are sized to make the same profit on every outcome. FALSE: no exit, the matched entry is held to the result.
    - `commission` number  
      The exchange's commission on a market's net winnings, as a share (0.05 is 5%).
    - `min_stake` number  
      The exchange's smallest stake: a green-up smaller than this can't be placed, and the position is held to the result.
    - `fill_model` string  
      queue (default): a waiting order matches only after the money queued ahead of it at that price has traded. touch: it matches as soon as its price trades (optimistic).  
      One of: `queue`, `touch` (open: new values may be added).
- `conditions` array of object · required  
  One entry per condition the source states, in its order.  
  max items 60
  - `index` integer · required  
    The condition's place in the source, from 0.  
    min 0
  - `source_text` string · required  
    The condition as the source wrote it.  
    max length 2000
  - `status` any · required  
    exact, close, ask or cant_map.  
    One of: `exact`, `close`, `ask`, `cant_map` (open: new values may be added).
  - `formula` string · nullable  
    Kelly formula (Excel mode, starts with =); null for ask and cant_map.  
    max length 2000
  - `reason` string · nullable  
    Why close or can't map; how it differs from the source.
  - `question` string · nullable  
    For ask: the question for the user.
  - `choices` array of object  
    The readings to choose from, each with its formula.
    - `label` string · required  
      The choice in words.
    - `formula` string · required  
      The Kelly formula (TRUE or FALSE on each team-game).
  - `data_gap` object · nullable  
    What Kelly lacks for a condition it can't import.
    - `kind` any · required  
      How it reached Kelly: paste, url, file, image, email, extension, api, mcp, chat, bets or template.  
      One of: `no_attribute`, `no_history`, `not_loaded`, `out_of_grain`, `licence`, `edge`, `look_ahead` (open: new values may be added).
    - `detail` string · required  
      The detail, in words.
  - `attributes` array of string  
    Kelly attribute names the formula reads.
  - `method` any  
    deterministic, ai or user.  
    One of: `deterministic`, `ai`, `user` (open: new values may be added).
  - `resolution` one of several shapes  
    removed or live_only, for a condition left out.
- `formula` string · required · nullable  
  AND of the exact and close conditions.
- `match` any · required  
  exact, close_match, needs_answers or cant_import.  
  One of: `exact`, `close_match`, `needs_answers`, `cant_import` (open: new values may be added).
- `counts` object · required  
  Conditions by status.
  - `exact` integer · required  
    Conditions mapped exactly.  
    min 0
  - `close` integer · required  
    Conditions mapped closely.  
    min 0
  - `ask` integer · required  
    Conditions waiting on an answer.  
    min 0
  - `cant_map` integer · required  
    Conditions Kelly can't import.  
    min 0
- `check` object · required  
  kformula.check and the look-ahead check on the combined formula, at system.bet_moment. The leak test runs with the rule tester at confirm.
  - `testable` boolean · required  
    Whether the rule tester can test the formula.
  - `problems` array of object · required  
    Each reason it can't be tested yet.
    - `code` string · required  
      The reason's code.
    - `path` string · nullable  
      The attribute it concerns.
    - `message` string · required  
      The reason in words.
    - `fixes` array of object  
      Ways to fix it.
- `source_record` object · nullable  
  The source's own record, as reported; never Kelly's numbers.
  - `wins` integer · nullable  
    Wins as the source wrote them.  
    min 0
  - `losses` integer · nullable  
    Losses as the source wrote them.  
    min 0
  - `pushes` integer · nullable  
    Pushes as the source wrote them.  
    min 0
  - `units` number · nullable  
    Units as the source wrote them.
  - `roi` number · nullable  
    A fraction (0.078).
  - `since` string · nullable  
    The first season or date the source counted from.
  - `market` string · nullable  
    The bet the record is on, as the source said it.
  - `as_reported` boolean  
    Always true: the source's claim, copied (T9f's pre-pass).
  - `games` array of object  
    The source's own list of games.  
    max items 5000
    - `date` string  
      The game's date.
    - `team` string  
      The team.
    - `opponent` string · nullable  
      The opponent.
    - `home` boolean · nullable  
      Whether the team was at home.
    - `line` number · nullable  
      The line taken.
    - `price` number · nullable  
      American odds as listed.
    - `result` string · nullable  
      The result as the source wrote it.
    - `units` number · nullable  
      Units as the source wrote them.
    - `text` string · nullable  
      The row as the source wrote it.
- `ledger` object · required  
  How the import counts on the rules-tried ledger at confirm (I1).
  - `label` const · required  
    The choice in words.  
    Always `"tuned elsewhere"`.
  - `tries` integer · required  
    Rules counted as tried.  
    min 1 · max 1000
  - `tries_from` any · required  
    default (20) or user.  
    One of: `default`, `user` (open: new values may be added).
- `labels` array of object  
  "tuned elsewhere", and "close match" when match is close_match.
- `reader` object · required  
  The reader that read it.
  - `name` string · required  
    The name.
  - `method` any · required  
    deterministic, ai or user.  
    One of: `deterministic`, `ai`, `user` (open: new values may be added).
  - `attempts` integer  
    The AI reader's calls (1 to 3).  
    min 1
- `warnings` array of object · required  
  Notes on how Kelly read it.
  - `code` string · required  
    The reason's code.
  - `message` string · required  
    The reason in words.
- `test_request` object · nullable  
  The POST /v1/rules:test body this draft would run; for competition exchange, the POST /v1/rules:test_exchange body (test_exchange_strategy). Null when match is needs_answers or cant_import.
- `rule` object · nullable  
  After confirm: the saved rule (T0).
  - `rule_id` string · nullable  
    The saved rule's ID (rl_…).
  - `name` string  
    The name.
  - `version` integer · nullable  
    The saved version.
  - `new_version` boolean · nullable  
    Whether confirm made a new version.
  - `versions_tried` integer · nullable  
    Versions tried, as the rule tester counts.
  - `run_id` string · nullable  
    The rule test kept for it (run_…).
  - `hidden` boolean  
    true after undo.
- `test` object · nullable  
  Confirm only: the rule tester's report on the saved rule (test_rule's facts without the bets, and its summary).
- `others` array of string  
  When the source held several systems: the other drafts' ids.
- `created_at` string · nullable  
  When the draft was kept.  
  format date-time
- `expires_at` string · nullable  
  When an unconfirmed draft expires (30 days).  
  format date-time
- `confirmed_at` string · nullable  
  When it was confirmed.  
  format date-time
- `undo_until` string · nullable  
  Undo is open until then (7 days).  
  format date-time
- `contract_version` const · required  
  The import contract's version.  
  Always `"1.0.0"`.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found) · [`undo_closed`](/problems/undo_closed)

### Example
```http
POST https://api.askkelly.ai/v1/rules:import/imp_rm4wkv9vhwevdmh05d1z:undo
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/undo_closed",
  "title": "Undo closed",
  "status": 409,
  "code": "undo_closed",
  "detail": "Only a confirmed import can be undone.",
  "param": "import_id",
  "doc_url": "https://docs.askkelly.ai/problems/undo_closed",
  "request_id": "req_845d62b82ce36f74ebf78092",
  "retryable": false,
  "display_message": "That import can't be undone any more."
}
```

`GET /v1/rules/imports`

## List your imported systems
scope `read:formulas` · 0 credits, not charged during the beta · MCP tool `list_rule_imports` · status live

Your kept imports, newest first: drafts waiting on answers, the ones you confirmed (with the saved rule's name and when undo closes), undone and expired drafts. state keeps one state; a dry run is never kept, so it never appears.

### Parameters
- `state` string · query  
  Only imports in this state (expired: a draft past its 30 days).  
  One of: `draft`, `confirmed`, `undone`, `expired` (open: new values may be added).
- `limit` integer · query  
  Imports per page, 1 to 100.  
  min 1 · max 100 · default 20
- `cursor` string · query  
  The next_cursor of the page before.  
  max length 200

### Response
`200` A page of your kept imports, newest first.

- `object` const · required  
  Always list.  
  Always `"list"`.
- `data` array of object · required  
  The page's imports, newest first.
  - `object` const · required  
    Always rule_import.  
    Always `"rule_import"`.
  - `id` string · required · nullable  
    The import's ID (imp_…); null on a dry run.  
    pattern ^imp_[0-9a-hjkmnp-tv-z]{20}$
  - `state` any · required  
    draft, confirmed, undone or expired.  
    One of: `draft`, `confirmed`, `undone`, `expired` (open: new values may be added).
  - `source` object · required  
    Where the system came from and its text.
    - `tool` string · nullable  
      The tool it came from (sdql, bet_labs, betiq...).  
      pattern ^[a-z0-9_.:-]{1,64}$
    - `tool_label` string · nullable  
      The tool's name in words.
    - `kind` any · required  
      How it reached Kelly: paste, url, file, image, email, extension, api, mcp, chat, bets or template.  
      One of: `paste`, `url`, `file`, `image`, `email`, `extension`, `api`, `mcp`, `chat`, `bets`, `template` (open: new values may be added).
    - `format` any · required  
      What the text is: sdql, filter_list, formula, plain or auto.  
      One of: `auto`, `sdql`, `filter_list`, `formula`, `plain`, `game_list` (open: new values may be added).
    - `via` one of several shapes  
      The entry point that passed it on.
    - `formula_mode` one of several shapes  
      The formula's mode (excel, sql, pandas...).
    - `raw_ref` string · nullable  
      Where it came from (a URL, file or message), kept and never fetched.
    - `captured_at` string · nullable  
      When Kelly received it.  
      format date-time
    - `text` string · nullable  
      The text as received (kept with the draft and the saved rule, for the proof screen; the owner sees it).
    - `text_sha256` string · nullable  
      The text's SHA-256, hex.  
      pattern ^[0-9a-f]{64}$
  - `system` object · required  
    The bet the system makes, as the rule tester names it. A reader fills what the source says; the caller's hints win.
    - `name` string · nullable  
      The name.  
      max length 120
    - `competition` string · nullable  
      nfl, ncaaf, nba, wnba, ncaab, nhl, mlb ...  
      max length 32
    - `market` one of several shapes  
      spread, moneyline, over or under.
    - `side` any  
      rule (bet the matched team or over/under) or fade (the other side).  
      One of: `rule`, `fade` (open: new values may be added).
    - `bet_moment` any  
      close or edition.  
      One of: `open`, `edition`, `close` (open: new values may be added).
    - `seasons` array of string · nullable  
      1-25 season labels ("2024" or "2024-25"); or from_season and to_season.  
      min items 1 · max items 25
    - `season_type` one of several shapes  
      regular, postseason or all.
    - `stake` any  
      risk or to_win.  
      One of: `risk`, `to_win` (open: new values may be added).
    - `strategy` object · nullable  
      Competition exchange: the trading strategy's actions besides entry_when (exchange.contract.ACTIONS); the test runs them with the draft's formula as entry_when.
      - `entry_side` string  
        back (bet it to win) or lay (bet it to lose).  
        One of: `back`, `lay` (open: new values may be added).
      - `entry_order` string  
        take: match now at the best price on the other side (back at back_price), walking down the ladder up to max_slippage_ticks. join: offer at the best price on your own side (back at lay_price) and wait in the queue, entry_offset_ticks better or worse. limit: offer at entry_price.  
        One of: `take`, `join`, `limit` (open: new values may be added).
      - `entry_price` number  
        limit only: the price to offer at (a back takes this or longer, a lay this or shorter).
      - `entry_offset_ticks` integer  
        join only: ticks from the best own-side price; positive asks for a better price (a back offered longer), negative a worse one.
      - `max_slippage_ticks` integer  
        take only: how many ticks past the best price a take may match at; what is left waits at the last price taken.
      - `stake` number  
        The entry stake in the market's currency (a lay's backer's stake unless stake_type is liability).
      - `stake_type` string  
        lay only: stake is the backer's stake you accept; liability is what you can lose.  
        One of: `stake`, `liability` (open: new values may be added).
      - `max_entries` integer  
        Entries per runner per market (Bet Angel's 'place bet triggers on the selection'); the next waits until the last is closed.
      - `fill_or_kill_s` number  
        Seconds an unmatched entry may wait before it is cancelled (0 cancels what doesn't match at once). Blank: it waits until the market turns in play.
      - `keep_in_play` boolean  
        TRUE keeps unmatched orders when the market turns in play (Betfair's persist); FALSE (default) cancels them at the off (lapse).
      - `take_profit_ticks` integer  
        Once the entry is matched, offer the green-up exit this many ticks in profit and wait for it to match.
      - `stop_loss_ticks` integer  
        When the position is this many ticks against (position_ticks <= -n), cancel the take-profit and green up now at the best price (a take).
      - `trailing_stop` boolean  
        The stop loss follows the best position_ticks so far (it trails n ticks behind).
      - `exit_when` string  
        A formula on the runner's ticks that greens up now at the best price when true (may read position_* columns).
      - `exit_before_off_s` number  
        Green up at the best price this many seconds before the scheduled off (0 is at the off). Blank: no time exit.
      - `green_up` boolean  
        TRUE (default): exits are sized to make the same profit on every outcome. FALSE: no exit, the matched entry is held to the result.
      - `commission` number  
        The exchange's commission on a market's net winnings, as a share (0.05 is 5%).
      - `min_stake` number  
        The exchange's smallest stake: a green-up smaller than this can't be placed, and the position is held to the result.
      - `fill_model` string  
        queue (default): a waiting order matches only after the money queued ahead of it at that price has traded. touch: it matches as soon as its price trades (optimistic).  
        One of: `queue`, `touch` (open: new values may be added).
  - `conditions` array of object · required  
    One entry per condition the source states, in its order.  
    max items 60
    - `index` integer · required  
      The condition's place in the source, from 0.  
      min 0
    - `source_text` string · required  
      The condition as the source wrote it.  
      max length 2000
    - `status` any · required  
      exact, close, ask or cant_map.  
      One of: `exact`, `close`, `ask`, `cant_map` (open: new values may be added).
    - `formula` string · nullable  
      Kelly formula (Excel mode, starts with =); null for ask and cant_map.  
      max length 2000
    - `reason` string · nullable  
      Why close or can't map; how it differs from the source.
    - `question` string · nullable  
      For ask: the question for the user.
    - `choices` array of object  
      The readings to choose from, each with its formula.
      - `label` string · required  
        The choice in words.
      - `formula` string · required  
        The Kelly formula (TRUE or FALSE on each team-game).
    - `data_gap` object · nullable  
      What Kelly lacks for a condition it can't import.
      - `kind` any · required  
        How it reached Kelly: paste, url, file, image, email, extension, api, mcp, chat, bets or template.  
        One of: `no_attribute`, `no_history`, `not_loaded`, `out_of_grain`, `licence`, `edge`, `look_ahead` (open: new values may be added).
      - `detail` string · required  
        The detail, in words.
    - `attributes` array of string  
      Kelly attribute names the formula reads.
    - `method` any  
      deterministic, ai or user.  
      One of: `deterministic`, `ai`, `user` (open: new values may be added).
    - `resolution` one of several shapes  
      removed or live_only, for a condition left out.
  - `formula` string · required · nullable  
    AND of the exact and close conditions.
  - `match` any · required  
    exact, close_match, needs_answers or cant_import.  
    One of: `exact`, `close_match`, `needs_answers`, `cant_import` (open: new values may be added).
  - `counts` object · required  
    Conditions by status.
    - `exact` integer · required  
      Conditions mapped exactly.  
      min 0
    - `close` integer · required  
      Conditions mapped closely.  
      min 0
    - `ask` integer · required  
      Conditions waiting on an answer.  
      min 0
    - `cant_map` integer · required  
      Conditions Kelly can't import.  
      min 0
  - `check` object · required  
    kformula.check and the look-ahead check on the combined formula, at system.bet_moment. The leak test runs with the rule tester at confirm.
    - `testable` boolean · required  
      Whether the rule tester can test the formula.
    - `problems` array of object · required  
      Each reason it can't be tested yet.
      - `code` string · required  
        The reason's code.
      - `path` string · nullable  
        The attribute it concerns.
      - `message` string · required  
        The reason in words.
      - `fixes` array of object  
        Ways to fix it.
  - `source_record` object · nullable  
    The source's own record, as reported; never Kelly's numbers.
    - `wins` integer · nullable  
      Wins as the source wrote them.  
      min 0
    - `losses` integer · nullable  
      Losses as the source wrote them.  
      min 0
    - `pushes` integer · nullable  
      Pushes as the source wrote them.  
      min 0
    - `units` number · nullable  
      Units as the source wrote them.
    - `roi` number · nullable  
      A fraction (0.078).
    - `since` string · nullable  
      The first season or date the source counted from.
    - `market` string · nullable  
      The bet the record is on, as the source said it.
    - `as_reported` boolean  
      Always true: the source's claim, copied (T9f's pre-pass).
    - `games` array of object  
      The source's own list of games.  
      max items 5000
      - `date` string  
        The game's date.
      - `team` string  
        The team.
      - `opponent` string · nullable  
        The opponent.
      - `home` boolean · nullable  
        Whether the team was at home.
      - `line` number · nullable  
        The line taken.
      - `price` number · nullable  
        American odds as listed.
      - `result` string · nullable  
        The result as the source wrote it.
      - `units` number · nullable  
        Units as the source wrote them.
      - `text` string · nullable  
        The row as the source wrote it.
  - `ledger` object · required  
    How the import counts on the rules-tried ledger at confirm (I1).
    - `label` const · required  
      The choice in words.  
      Always `"tuned elsewhere"`.
    - `tries` integer · required  
      Rules counted as tried.  
      min 1 · max 1000
    - `tries_from` any · required  
      default (20) or user.  
      One of: `default`, `user` (open: new values may be added).
  - `labels` array of object  
    "tuned elsewhere", and "close match" when match is close_match.
  - `reader` object · required  
    The reader that read it.
    - `name` string · required  
      The name.
    - `method` any · required  
      deterministic, ai or user.  
      One of: `deterministic`, `ai`, `user` (open: new values may be added).
    - `attempts` integer  
      The AI reader's calls (1 to 3).  
      min 1
  - `warnings` array of object · required  
    Notes on how Kelly read it.
    - `code` string · required  
      The reason's code.
    - `message` string · required  
      The reason in words.
  - `test_request` object · nullable  
    The POST /v1/rules:test body this draft would run; for competition exchange, the POST /v1/rules:test_exchange body (test_exchange_strategy). Null when match is needs_answers or cant_import.
  - `rule` object · nullable  
    After confirm: the saved rule (T0).
    - `rule_id` string · nullable  
      The saved rule's ID (rl_…).
    - `name` string  
      The name.
    - `version` integer · nullable  
      The saved version.
    - `new_version` boolean · nullable  
      Whether confirm made a new version.
    - `versions_tried` integer · nullable  
      Versions tried, as the rule tester counts.
    - `run_id` string · nullable  
      The rule test kept for it (run_…).
    - `hidden` boolean  
      true after undo.
  - `test` object · nullable  
    Confirm only: the rule tester's report on the saved rule (test_rule's facts without the bets, and its summary).
  - `others` array of string  
    When the source held several systems: the other drafts' ids.
  - `created_at` string · nullable  
    When the draft was kept.  
    format date-time
  - `expires_at` string · nullable  
    When an unconfirmed draft expires (30 days).  
    format date-time
  - `confirmed_at` string · nullable  
    When it was confirmed.  
    format date-time
  - `undo_until` string · nullable  
    Undo is open until then (7 days).  
    format date-time
  - `contract_version` const · required  
    The import contract's version.  
    Always `"1.0.0"`.
- `has_more` boolean · required  
  Whether another page follows.
- `next_cursor` string · required · nullable  
  Pass as cursor for the next page.

### Errors
[`invalid_request`](/problems/invalid_request) · [`credential_in_url`](/problems/credential_in_url) · [`unsupported_api_version`](/problems/unsupported_api_version) · [`unauthenticated`](/problems/unauthenticated) · [`method_not_allowed`](/problems/method_not_allowed) · [`rate_limited`](/problems/rate_limited) · [`internal_error`](/problems/internal_error) · [`service_unavailable`](/problems/service_unavailable) · [`quota_exhausted`](/problems/quota_exhausted) · [`insufficient_scope`](/problems/insufficient_scope) · [`not_entitled`](/problems/not_entitled) · [`not_found`](/problems/not_found)

### Example
```http
GET https://api.askkelly.ai/v1/rules/imports?limit=2
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "object": "list",
  "data": [
    {
      "id": "imp_rm4wkv9vhwevdmh05d1z",
      "rule": null,
      "check": {
        "problems": [],
        "testable": true
      },
      "match": "exact",
      "state": "draft",
      "counts": {
        "ask": 0,
        "close": 0,
        "exact": 3,
        "cant_map": 0
      },
      "labels": [
        "tuned elsewhere"
      ],
      "ledger": {
        "label": "tuned elsewhere",
        "tries": 20,
        "tries_from": "default"
      },
      "object": "rule_import",
      "reader": {
        "name": "sdql",
        "method": "deterministic",
        "attempts": 1
      },
      "source": {
        "via": null,
        "kind": "api",
        "text": "H and line<=-3 and p:L",
        "tool": "sdql",
        "format": "sdql",
        "raw_ref": null,
        "tool_label": "SDQL (KillerSports / SportsDataBase)",
        "captured_at": "2026-10-04T17:30:00Z",
        "text_sha256": "ac5e42601cf5209bb381275989ee4652f463b74fa25190e705dfa422f87f9f96",
        "formula_mode": null
      },
      "system": {
        "name": null,
        "side": "rule",
        "stake": "risk",
        "market": "spread",
        "seasons": [
          "2023",
          "2024"
        ],
        "bet_moment": "close",
        "competition": "nfl",
        "season_type": "regular"
      },
      "formula": "=AND(AND(home, NOT(neutral)), spread_close <= -3, LAG(result = \"L\"))",
      "warnings": [
        {
          "code": "reader",
          "message": "Kelly reads earlier games (p:, P:) within the season tested, so a team's first game of a season has no previous game."
        },
        {
          "code": "line_source",
          "message": "Kelly tests at its own consensus line (closing lines from June 2020), which can differ from the source's line by a half point; the proof step compares the two game by game."
        }
      ],
      "conditions": [
        {
          "index": 0,
          "method": "deterministic",
          "reason": null,
          "status": "exact",
          "choices": [],
          "formula": "=AND(home, NOT(neutral))",
          "data_gap": null,
          "question": null,
          "attributes": [
            "home",
            "neutral"
          ],
          "resolution": null,
          "source_text": "H"
        },
        {
          "index": 1,
          "method": "deterministic",
          "reason": null,
          "status": "exact",
          "choices": [],
          "formula": "=spread_close <= -3",
          "data_gap": null,
          "question": null,
          "attributes": [
            "spread_close"
          ],
          "resolution": null,
          "source_text": "line<=-3"
        },
        {
          "index": 2,
          "method": "deterministic",
          "reason": null,
          "status": "exact",
          "choices": [],
          "formula": "=LAG(result = \"L\")",
          "data_gap": null,
          "question": null,
          "attributes": [
            "result"
          ],
          "resolution": null,
          "source_text": "p:L"
        }
      ],
      "created_at": "2026-10-04T17:30:00Z",
      "expires_at": "2026-11-03T17:30:00Z",
      "undo_until": null,
      "confirmed_at": null,
      "test_request": {
        "side": "rule",
        "stake": "risk",
        "market": "spread",
        "formula": "=AND(AND(home, NOT(neutral)), spread_close <= -3, LAG(result = \"L\"))",
        "seasons": [
          "2023",
          "2024"
        ],
        "bet_moment": "close",
        "competition": "nfl",
        "season_type": "regular"
      },
      "source_record": null,
      "contract_version": "1.0.0"
    },
    {
      "id": "imp_7h7p7w2tvm42z7xg6fpy",
      "rule": null,
      "check": {
        "problems": [],
        "testable": true
      },
      "match": "needs_answers",
      "state": "draft",
      "counts": {
        "ask": 1,
        "close": 0,
        "exact": 2,
        "cant_map": 1
      },
      "labels": [
        "tuned elsewhere"
      ],
      "ledger": {
        "label": "tuned elsewhere",
        "tries": 20,
        "tries_from": "default"
      },
      "object": "rule_import",
      "reader": {
        "name": "filters:bet_labs",
        "method": "deterministic",
        "attempts": 1
      },
      "source": {
        "via": null,
        "kind": "api",
        "text": "Home/Away: Home\nFavorite/Underdog: Favorite\nRest Advantage: 2+ days\nPublic Betting %: under 40%",
        "tool": "bet_labs",
        "format": "filter_list",
        "raw_ref": null,
        "tool_label": "Bet Labs (Action Network)",
        "captured_at": "2026-10-04T17:30:00Z",
        "text_sha256": "076d17982bcb14c5005dc77136b1d087fad4b9e64ee54cd3917480fd10d22cbd",
        "formula_mode": null
      },
      "system": {
        "name": null,
        "side": "rule",
        "stake": "risk",
        "market": "spread",
        "seasons": [
          "2020",
          "2021",
          "2022",
          "2023",
          "2024",
          "2025",
          "2026"
        ],
        "bet_moment": "close",
        "competition": "nfl",
        "season_type": "regular"
      },
      "formula": "=AND(AND(home, NOT(neutral)), spread_close < 0)",
      "warnings": [
        {
          "code": "reader",
          "message": "Kelly's names for bet_labs's filters come from its help pages, not a real export; check each condition against the source."
        },
        {
          "code": "needs_market",
          "message": "Say which bet the system makes: spread, moneyline, over or under. Kelly assumed the spread."
        },
        {
          "code": "line_source",
          "message": "Kelly tests at its own consensus line (closing lines from June 2020), which can differ from the source's line by a half point; the proof step compares the two game by game."
        },
        {
          "code": "seasons",
          "message": "The source names no seasons; Kelly tests 2020 to 2026, every season it holds lines for."
        }
      ],
      "conditions": [
        {
          "index": 0,
          "method": "deterministic",
          "reason": null,
          "status": "exact",
          "choices": [],
          "formula": "=AND(home, NOT(neutral))",
          "data_gap": null,
          "question": null,
          "attributes": [
            "home",
            "neutral"
          ],
          "resolution": null,
          "source_text": "Home/Away: Home"
        },
        {
          "index": 1,
          "method": "deterministic",
          "reason": null,
          "status": "exact",
          "choices": [],
          "formula": "=spread_close < 0",
          "data_gap": null,
          "question": null,
          "attributes": [
            "spread_close"
          ],
          "resolution": null,
          "source_text": "Favorite/Underdog: Favorite"
        },
        {
          "index": 2,
          "method": "deterministic",
          "reason": null,
          "status": "ask",
          "choices": [],
          "formula": null,
          "data_gap": null,
          "question": "Rest Advantage: what range did you set? Kelly read '2+ days'.",
          "attributes": [],
          "resolution": null,
          "source_text": "Rest Advantage: 2+ days"
        },
        {
          "index": 3,
          "method": "deterministic",
          "reason": "Bets %: Kelly holds betting splits only from Nov 2026 (S8).",
          "status": "cant_map",
          "choices": [],
          "formula": null,
          "data_gap": {
            "kind": "no_history",
            "detail": "Kelly holds betting splits only from Nov 2026 (S8)"
          },
          "question": null,
          "attributes": [],
          "resolution": null,
          "source_text": "Public Betting %: under 40%"
        }
      ],
      "created_at": "2026-10-04T17:30:00Z",
      "expires_at": "2026-11-03T17:30:00Z",
      "undo_until": null,
      "confirmed_at": null,
      "test_request": null,
      "source_record": null,
      "contract_version": "1.0.0"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

```http
GET https://api.askkelly.ai/v1/rules/imports?cursor=bm90LWEtY3Vyc29y
Authorization: Bearer $KELLY_API_KEY
```

```json
{
  "type": "https://docs.askkelly.ai/problems/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "code": "invalid_request",
  "detail": "That cursor isn't one Kelly gave.",
  "param": "cursor",
  "doc_url": "https://docs.askkelly.ai/problems/invalid_request",
  "request_id": "req_1ca1bd7a5f343108e1e25b49",
  "retryable": false,
  "display_message": "Something in that request was not understood."
}
```

Generated from Kelly API 2026-10-05.

---

Generated from Kelly API 2026-10-05

Support: support@askkelly.ai · Security and disclosure: https://docs.askkelly.ai/security

Data is the edge. Odds are information, not advice · 21+ · Get help
