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.
It 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
Response
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.