diff --git a/src/services/proplineVerify.js b/src/services/proplineVerify.js index cd851fb..425a73c 100644 --- a/src/services/proplineVerify.js +++ b/src/services/proplineVerify.js @@ -379,6 +379,28 @@ async function verify(opts = {}) { out.endpoints.push(await probe(`${p}/results`, { markets }, `${sport} — settled outcomes + actual values`, httpGet)); } + // AGGREGATE-ONLY bodies, returned in full. These two carry no per-prop data + // and no credentials — and the shape summary alone can't answer the question + // they exist to answer: does PropLine actually GRADE the sports we can't + // settle? A shape is not a number. + out.aggregates = {}; + for (const [name, path, params] of [ + ['sports', '/sports', {}], + ['resolution_summary', '/markets/resolution-summary', { days: 30 }], + ]) { + try { + const keys = PA.getKeys().filter(Boolean); + const res = await (httpGet || axios.get)(`${BASE}${path}`, { + params: { apiKey: keys[0], ...params }, timeout: TIMEOUT_MS, validateStatus: () => true, + }); + out.aggregates[name] = res.status === 200 + ? JSON.parse(scrubKeys(JSON.stringify(res.data))) + : { error: `HTTP ${res.status}` }; + } catch (err) { + out.aggregates[name] = { error: scrubKeys(err && err.message) }; + } + } + // The $19/mo question: does the bulk resolved export settle sports we can't? for (const sportKey of ['baseball_mlb', 'basketball_wnba', 'basketball_nba', 'soccer_epl']) { out.endpoints.push(await probe('/exports/resolved-props', { sport: sportKey }, `bulk resolved export — ${sportKey}`, httpGet));