Commit a034ccd
docs(odds): reality-audit — flat envelopes, no-op params dropped, live-reverified odds family (#275)
* docs(odds-comparison): rewrite to live response contract
Fixes audit findings H10/C4/C5/C6/H11/H12/H13 (verified vs live :3003):
- event= -> event_id in param table, callout, and all examples, ahead of
the 2026-07-01 deprecated-alias sunset
- envelope {success,data,meta} -> flat {data,pagination,updated_at}
- data is a flat array of {market_type,selection,line,books[],book_holds[]},
not a single nested event object
- books is an array of {sportsbook,odds_american,odds_decimal,timestamp}
sorted best-first, not an object keyed by book id
- per-entry book_holds[{sportsbook,hold}] replaces the nonexistent
hold.{best_available,by_book}
- drop best_book/best_odds/worst_book/worst_odds/spread (never emitted) and
the "Understanding the spread Field" section
- drop phantom selection_type + event-metadata fields; document the real
pagination object; fix the X-Request-Id example format
EN only; de/es/pt-BR backfill tracked separately.
Type: docs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs(odds-delta): rewrite to real flat envelope; fix examples + 401
Fixes audit C1/C2/H7/H8 + phantom-field findings (verified vs live :3003):
- envelope {success, meta:{count,total,books_changed,pagination,filters}} ->
real flat {data, removed, pagination, updated_at, meta:{server_time}, overflow?}
- remove meta.books_changed (does not exist — broke JS .join()/Python KeyError)
- document the top-level removed[] array ({id,sportsbook,removed_at}) + overflow flag
- drop phantom data-row field status:"upcoming"
- JS/Python examples read pagination.count + removed.length; still chain on
meta.server_time (real)
- 401: code unauthorized -> missing_api_key / invalid_api_key, real message + docs URL
- param table: event -> event_id (deprecated alias, sunset 2026-07-01), live -> is_live
- fix X-Request-Id example format
Deferred pending the no-op-param decision (S4): sort/fields/min_odds/max_odds are
silently ignored by the delta handler but left in the param table for now.
EN only; de/es/pt-BR backfill tracked separately.
Type: docs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs(odds-delta): drop no-op params sort/fields/min_odds/max_odds (S4 #1-3)
The delta handler ignores all four (always chronological, full row, no odds-range
filter). Removed from the param table per the approved case-by-case S4 decision;
they remain implement-candidates for engineering. min_odds/max_odds still work on
/opportunities/* and stay documented there.
Type: docs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs(odds): flat envelope, drop no-op params, fix tiers/errcodes/fields
Fixes audit H1/H2/H3/H4/H5/H6 + MEDIUM/LOW (verified vs origin/main + live):
- envelope {success, meta:{count,total,books_available,books_returned,pagination,
filters}} -> real flat {data, pagination, updated_at}; pagination omits total on
/odds (omitempty); same fix applied to the group_by=event example
- remove no-op params + sections (S4, approved): sort, fields, min_odds, max_odds
- param table: event -> event_id (alias sunset 2026-07-01), live -> is_live;
filtering examples updated to is_live= / event_id=
- 401: unauthorized -> missing_api_key/invalid_api_key + real docs URL
- 403 tier_restricted: add tier/required_tier, fix docs URL (sharpapi.io/pricing).
Pinnacle=Sharp+ is correct (sportsbooks.go RequiresTier "sharp")
- 429: retry_after documented as Unix-ms timestamp + Retry-After header note
- schema: document emitted fields is_player_prop, is_stale_pregame_price,
market_segment; market_type description uses canonical values
- Book Access table: Hobby books corrected (BetRivers/Bet365 US are hobby), Sharp
"All 32" -> 25, Enterprise -> All (unlimited)
- group_by event_name "A vs B" -> "Away @ Home"; nested-ref logo host
cdn.opticodds.com -> cdn.sharpapi.io; X-Request-Id format
EN only; de/es/pt-BR backfill tracked separately.
Type: docs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs(odds-best): flat envelope; document consensus_odds/market_hold; fix fields
Fixes audit C3/H9 + MED/LOW (verified vs live :3003):
- envelope {success, data, meta} -> real flat {data, pagination, updated_at}
(pagination includes total here); JS example stops destructuring meta
- document emitted-but-undocumented fields: consensus_odds, market_hold,
all_books[].sportsbook (alias of book)
- remove all_books[].line (never emitted)
- best_odds.probability noted as also emitted as odds_probability (example aligned)
- 401 unauthorized -> missing_api_key/invalid_api_key; 429 retry_after = Unix-ms
- param table: event -> event_id (alias sunset 2026-07-01), live -> is_live;
offset max 5000 -> 500 (odds-family cap); X-Request-Id format
EN only; de/es/pt-BR backfill tracked separately.
Type: docs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs(odds-batch, odds-closing): fix envelopes + book-value shape
Fixes audit H14/H15/H16/H17 + MED/LOW (verified vs live :3003):
odds-batch:
- envelope {success, ..., meta:{requested,found,missing,max_batch,filters}} -> flat
{data:{events,missing_events}, updated_at}; examples derive counts from
data.events.length / data.missing_events.length (no meta.found/requested)
- remove phantom event game_state field; drop docs field from validation_error
examples; 401 -> missing_api_key/invalid_api_key
odds-closing:
- data.books[<book>] is a BookClosing OBJECT {odds, captured_at,
seconds_before_kickoff, capture_trigger, is_final}, not a bare ClosingOdd[];
fix JS/Python to read payload.odds; add BookClosing shape table
- ClosingOdd: document real CLV fields (market_id, selection_id, canonical_key,
implied_probability, no_vig_probability, fair_close_decimal, closing_probability,
source_updated_at); odds_decimal is full precision; fix internal historical links
EN only; de/es/pt-BR backfill tracked separately.
Type: docs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs(odds): 2026-07-02 live re-verification fixes on top of the 06-26 audit
Re-verified every odds-family endpoint against the live API (OVH :3003)
and the sharp-api-go source; fixed drift the 06-26 audit predates or missed:
- odds: market category alias table corrected to real expansion (main =
7-market exact set incl. run_line/puck_line/total_goals/total_runs;
spread/total are substring matches); documented the moneyline_3-way
carve-out; grouped-mode pagination carries total + no cursor; nested-ref
absence also depends on per-book adapter coverage.
- odds-delta: 400 missing-since example now matches the real message
(no docs field); confirmed removed[] cap 1000, since clamp 10m,
overflow flag, limit cap 500 live.
- odds-comparison: market and sportsbook query params are NO-OPs in
oddsComparisonHandler — removed from the params table, examples now
filter client-side; documented the functional market_segment filter.
- odds-best: min_odds/max_odds parsed but never applied — dropped;
offset cap not enforced on this endpoint — "(max 500)" removed;
all_books[].edge is percent vs the CONSENSUS decimal (can be negative),
not "over the worst odds"; example replaced with a real live row.
- odds-batch: real 400 messages ("event_ids array required" /
"Maximum N event_ids per request for X tier"); nested odds rows carry
id/event_uuid/external_event_id/market_label/odds_probability —
added to schema; example replaced with a real live response.
- odds-closing: ClosingOdd rows carry market_segment — added;
market_type examples corrected to canonical values.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: sharp-resolver[bot] <3736210+sharp-resolver[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 718df7a commit a034ccd
6 files changed
Lines changed: 393 additions & 528 deletions
File tree
- content/en/api-reference
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
| 75 | + | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
| 105 | + | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
134 | 133 | | |
135 | 134 | | |
| 135 | + | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
137 | 139 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 140 | + | |
| 141 | + | |
149 | 142 | | |
150 | | - | |
151 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
152 | 146 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 147 | + | |
| 148 | + | |
165 | 149 | | |
| 150 | + | |
166 | 151 | | |
| 152 | + | |
| 153 | + | |
167 | 154 | | |
168 | | - | |
| 155 | + | |
| 156 | + | |
169 | 157 | | |
170 | | - | |
171 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
172 | 161 | | |
173 | | - | |
| 162 | + | |
174 | 163 | | |
175 | 164 | | |
176 | 165 | | |
177 | 166 | | |
178 | | - | |
| 167 | + | |
179 | 168 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 169 | + | |
191 | 170 | | |
192 | 171 | | |
193 | 172 | | |
| |||
198 | 177 | | |
199 | 178 | | |
200 | 179 | | |
201 | | - | |
| 180 | + | |
202 | 181 | | |
203 | 182 | | |
204 | 183 | | |
| |||
208 | 187 | | |
209 | 188 | | |
210 | 189 | | |
211 | | - | |
212 | | - | |
| 190 | + | |
213 | 191 | | |
214 | 192 | | |
215 | 193 | | |
| |||
219 | 197 | | |
220 | 198 | | |
221 | 199 | | |
222 | | - | |
223 | | - | |
| 200 | + | |
224 | 201 | | |
225 | 202 | | |
226 | 203 | | |
227 | 204 | | |
228 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
229 | 209 | | |
230 | 210 | | |
231 | 211 | | |
232 | | - | |
233 | | - | |
234 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
235 | 215 | | |
236 | 216 | | |
237 | 217 | | |
238 | 218 | | |
239 | 219 | | |
240 | 220 | | |
241 | | - | |
| 221 | + | |
242 | 222 | | |
243 | 223 | | |
244 | 224 | | |
| |||
247 | 227 | | |
248 | 228 | | |
249 | 229 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | 230 | | |
261 | | - | |
| 231 | + | |
262 | 232 | | |
263 | 233 | | |
264 | 234 | | |
| |||
275 | 245 | | |
276 | 246 | | |
277 | 247 | | |
278 | | - | |
279 | 248 | | |
280 | 249 | | |
281 | 250 | | |
282 | 251 | | |
283 | 252 | | |
284 | 253 | | |
| 254 | + | |
285 | 255 | | |
286 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
287 | 260 | | |
288 | | - | |
| 261 | + | |
289 | 262 | | |
290 | 263 | | |
| 264 | + | |
291 | 265 | | |
292 | 266 | | |
293 | 267 | | |
| |||
329 | 303 | | |
330 | 304 | | |
331 | 305 | | |
332 | | - | |
| 306 | + | |
333 | 307 | | |
334 | 308 | | |
335 | 309 | | |
| |||
0 commit comments