API reference
Closing line value
How far a price you took beat the book's close and the fair close, for one selection.
/odds/v1/clv- Cost
- 1 token
- Authentication
- X-API-Key, your own key (not the demo key)
Parameters
event_idstringrequiredAn event_id from /events, sent back verbatim.selection_keystringrequiredThe selection_key from /odds (live or finished) or /history.bookstringrequiredThe book you bet at, a key from /books.oddsstringrequiredThe price you took, in format.formatstringoptionaldecimal (1.55), american (-182, 150; send + as %2B) or fractional (11/20). Prices in the response use the same format.Default:decimal
Formula
Prices are decimal with the stake included. This is the standard price-ratio CLV: positive means you beat the close. Percentages are 2 dp and computed in decimal whatever format you send.
clv_pct = (taken / close_odds - 1) * 100
clv_vs_fair_pct = (taken / fair_odds - 1) * 100It equals the ratio of implied probabilities, p_close / p_taken - 1 with p = 1 / odds, not the difference between them. Against fair_odds it is your expected return per unit staked if the fair close is the true probability.
Request
curl -s "https://api.b337.ai/odds/v1/clv?event_id=baseball%2Fus%2Fmlb%2Fphiladelphia_phillies_v_tampa_bay_rays%2F2026-09-26&selection_key=4ec43f065e08&book=betfair&odds=1.95" \
-H "X-API-Key: $ODDS_API_KEY"import os
import requests
resp = requests.get(
"https://api.b337.ai/odds/v1/clv",
params={"event_id": "baseball/us/mlb/philadelphia_phillies_v_tampa_bay_rays/2026-09-26", "selection_key": "4ec43f065e08", "book": "betfair", "odds": "1.95"},
headers={"X-API-Key": os.environ["ODDS_API_KEY"]},
timeout=10,
)
resp.raise_for_status()
print(resp.json())// Node 18+, saved as an .mjs file
const res = await fetch("https://api.b337.ai/odds/v1/clv?event_id=baseball%2Fus%2Fmlb%2Fphiladelphia_phillies_v_tampa_bay_rays%2F2026-09-26&selection_key=4ec43f065e08&book=betfair&odds=1.95", {
headers: { "X-API-Key": process.env.ODDS_API_KEY },
});
console.log(await res.json());Response
{
"schema_version": 1,
"event_id": "baseball/us/mlb/philadelphia_phillies_v_tampa_bay_rays/2026-09-26",
"selection_key": "4ec43f065e08", "book": "betfair", "status": "finished",
"market": "head_to_head", "name": "Philadelphia Phillies",
"label": "Philadelphia Phillies", "player": null, "line": null,
"direction": null, "period": null,
"taken_odds": 1.95, "off_at": "2026-09-26T23:15:00Z",
"close_odds": 1.86, "closed_at": "2026-09-26T23:11:58Z", "lag_seconds": 182,
"clv_pct": 4.84, "close_reason": null,
"fair_odds": null, "fair_method": null, "fair_anchor": null,
"clv_vs_fair_pct": null, "fair_reason": "no_fair_price",
"odds_format": "decimal", "generated_at": "2026-10-05T03:39:45Z"
}Here the betfair close was 1.86 and the price taken 1.95, so clv_pct is 4.84. No fair close exists for this market, so the fair side is null with a reason.
Null and reason codes
When a side cannot be computed its fields are null and close_reason or fair_reason says why. A null is never a zero.
| Reason | Meaning |
|---|---|
event_not_started | The event has not gone off; no close exists yet. |
close_pending | In play and the close has not been recorded yet. Retry later. |
no_close_captured | The event is over and we stored no close for it. |
selection_not_found | No closed selection has that key: a wrong key, or the market was not captured at the close. |
book_not_closed | The selection closed, but not at that book. books_closed lists the books that did. |
no_fair_price | No fair close: pinnacle did not price a complete two or three way set, or it is a handicap. |
unknown_event | Batch rows only: no such event_id. A single GET answers 404. |
Fields
close_oddsis that book's closing price for the selection;closed_atandlag_secondssay when and how long before the off. See opening and closing prices.fair_oddsis the margin-free close, withfair_methodandfair_anchornaming how it was derived.selection_keyis the same key as /odds and /history. Prices in the response use yourformat.- The demo key cannot call this (
403 plan_required). For many bets at once use POST /clv.