A two-direction ingestion system that pairs Telegram tipster predictions with live Melbet odds, then resolves GREEN/YELLOW/RED verdicts via three-model consensus.
On the left, the Hetzner server ingests Telegram. On the right, local Windows watches Melbet's live market. They meet at /api/analyses.
MTProto event listener — every channel post is POSTed to the intake URL. Current mode: BRIDGE_MODE=ALL
// bridge.js
client.addEventHandler(handleMessage,
new NewMessage({ chats: [...] }));
postIntake(payload) // → :4300
Reads each message, decides if it is a prediction — extracts home/away/market/pick/odds.
Planner (6h) → Analyst (Ensemble) → Monitor (5m). Verdict by collective reasoning of three models.
Fuzzy-matches API picks to local fixtures, calculates hit rate, ranks top tipsters.
Every 6 hours, screens live + upcoming matches and selects 0–3 candidates with low LLM cost.
Runs Panaliz v3 SKILL's 8 steps for every selected match. Three models with equal weight — verdict by consensus.
Checks each pending demo bet every 5 minutes. Decides HOLD / CASH_OUT / ADJUST based on live odds shifts and current score.
Consensus is not a sentiment algorithm. It is the clean count of three opinions.
def _pick_consensus(opinions):
if all_failed: return YELLOW
counts = Counter(o.verdict
for o in opinions if o.verdict)
top, n = counts.most_common(1)[0]
if n >= 2: return top # majority
return YELLOW # split → caution
≥2 models agree on «BET», Panaliz 8-step discount rules pass, odds × probability > 1.10. Best bet → auto-written to demo_bets.
Three models disagree (split vote) — caution by default. Also returned when verdict cannot be extracted (never silent-flips to RED).
≥2 models agree on «DON'T BET», or discount rules fail (friendly, dead rubber, relegation zone). Decision: skip.
High-coefficient (2.915) Over taken without prior form/H2H check — insufficient data.
Cremonese in Serie A's lower bracket — Over 4.0 line too high. League goal average ≪ 4.
Coef 4.34 — implied prob 23%. Required deeper analysis before entering such low-probability bet.
All postmortems append to data/lessons_learned.md and feed into the next analysis's Panaliz prompt automatically. A loss is information — information is leverage.
Model Context Protocol — internal coordinator that exposes every tool to the agents.
Melbet HTTP polling — fixtures and odds forwarded to intake. --http mode.
Server-side Panaliz worker — automatically analyzes detected predictions.
AI message classifier — isPrediction flag + market/odds extraction. /api/* endpoint.
MTProto session listener (Naidan's personal account). Listens to all subscribed channels and POSTs to localhost:4300/api/intake/telegram. Backend handles spam/prediction triage.
Beyond Telegram tipsters, we can cross-check odds across many bookmakers and use sharp money signals + prediction models.
🔑 With API keys we can automatically pull data from these sources and pair them with Melbet's live odds for more reliable value bets. The list below shows integrable options.
Currently the main source — live + line feed scrape, 10s polling.
Sharp money benchmark — pro bettors' true market. Low-margin odds.
Peer-to-peer exchange — back/lay liquidity = market sentiment.
Mainstream public odds — no public API, requires scraping.
Asian markets, handicap, same backend as Melbet.
Asian Handicap reference — handicap pricing standard.
Live odds JSON API for 40+ bookmakers — historical also available.
Historical odds movement — calculate closing line value.
UK markets average. See which bookmaker has the highest tip.
1100+ leagues, fixture/lineup/h2h/standing — already used on the server.
Live score, advanced stats (xG, attack momentum) — undocumented JSON.
League goal averages, BTTS %, Over/Under tendency — key for value bets.
Form table, head-to-head — especially for small leagues.
Statistical prediction baseline — to validate our model against.
Pro-grade live data — most sportsbooks are fed by this.
To enable any of the sources above, write the matching API key in the `.env` file. For example Pinnacle (sharp benchmark), API-FOOTBALL (fixture/h2h), The Odds API (multi-book), SofaScore (advanced stats) — adding them lets us:
# .env (жишээ) ODDS_API_KEY=... APIFOOTBALL_KEY=... PINNACLE_USERNAME=... PINNACLE_PASSWORD=... SOFASCORE_TOKEN=... FOOTYSTATS_KEY=...