node:http2, node:readline, node:crypto, node:perf_hooks, node:events).ws for low-overhead Boost.Beast WebSocket streaming.http2.connect session maintained against https://edge.madmarket.io.PING frames dispatched every 15 seconds to keep connection warm and measure sub-millisecond RTT.BaseAdapter $\rightarrow$ MollybetAdapter):DELETE /v1/betslips/<id>/ when switching matches or market modes.process.stdin.setRawMode(true).https://edge.madmarket.io must transmit:POST /v1/betslips/ DELETE /v1/betslips/<betslipId>/POST /v1/orders/ GET /v1/orders/<orderId>/{ status: "done" | "in_flight" | "failed", closed: true, close_reason: "order_filled" | "timed_out", ... }.lineIndex = Math.round(line * 4)):"fb" / "fb_ht")for,ir,<h>,<a>,ahover,<lineIndex> (e.g. Total Over 2.5 at 0-0 $\rightarrow$ for,ir,0,0,ahover,10)for,h (Home), for,a (Away)for,ir,<h>,<a>,tahover,h,<lineIndex>for,ir,<h>,<a>,tahover,a,<lineIndex>"sport": "fb_ht".for,ir,0,0,ahover,2."ih")"sport": "ih" in POST /v1/betslips/ (for both Regular Time 60m and Period markets), and without ir,<h>,<a> in bet_type:FT, prefix tp,reg):OVER (Default line 5.5 $\rightarrow$ 22): for,tp,reg,ahover,<lineIndex>HOME / AWAY (1X2 60m): for,tp,reg,wdw,h / for,tp,reg,wdw,aITB1 / ITB2 (Default line 2.5 $\rightarrow$ 10): for,tp,reg,tahover,h,<lineIndex> / for,tp,reg,tahover,a,<lineIndex>HT, prefix tperiod,<N>):ir_status.period_scores:HT_OVER (Default line 1.5 $\rightarrow$ 6): for,tperiod,<N>,ahover,<lineIndex>HT_HOME / HT_AWAY: for,tperiod,<N>,wdw,h / for,tperiod,<N>,wdw,aHT_ITB1 / HT_ITB2 (Default line 0.5 $\rightarrow$ 2): for,tperiod,<N>,tahover,h,<lineIndex> / for,tperiod,<N>,tahover,a,<lineIndex>getAllowedBookies())pmk or betdex) send distorted quotes (e.g. quote 93.257 with limit €1218 on closed lines). When using Math.max(), these quotes polluted Pinnacle's (pin88) real market prices.MollybetAdapter and StateManager strictly filter quotes using getAllowedBookies() derived from config.accounts and config.adaptiveBookies. Any PMM frame or bookies_with_offers item from non-configured bookmakers (pmk, betdex, sbo, etc.) is immediately rejected. Only pin88 quotes and stake limits are accepted.1=0, 2=0 on blowout or danger moments), previous logic kept stale prices because it ignored zero values (if (odds.winHome > 0)).WsFeed emits updatedMarkets: { wdw, ahou, itb1, itb2 }.StateManager.updateOdds() explicitly zeroes out prices when the market has no offers.TerminalUI.formatSlipStatus() displays closed lines in bold bright red: 0.00 (ЗАКРЫТО 38s) or 0.00 (NO SLIP).ExecutionEngine.fire() aborts instantly on closed lines (livePrice <= 1.0) with [ABORT] Линия БК закрыта (кэф: 0.00) to prevent failed orders.ExecutionEngine.trackOrder(orderId, targetKey, result) tracks its execution asynchronously without blocking the UI:IN_FLIGHT: Displayed in yellow in the permanent HUD combat banner.DONE: Displayed in green [СТАВКА ПРИНЯТА (DONE) pin88] OVER @ кэф 1.35 | €5 | ID: 2290691511 (0.8s).REJECTED / TIMED_OUT: Displayed in red with rejection reason.€5 instead of €EUR,5).MAIN: Pre-arms [OVER, HOME, AWAY].ITB: Pre-arms [OVER, ITB1, ITB2].I. Unused slips are deleted from Mollybet via HTTP DELETE to remain strictly within the 3-slip limit.T between Full-Time (FT) and 1st Half (HT).3 (HT Over), 4 (HT Home/ITB1), 5 (HT Away/ITB2), 6 (Direct ITB1), 7 (Direct ITB2).StateManager.getOrdersHistory(limit=200) parsing /v1/orders/.orderNormalizer.js extracts partial fills, true stakes (effStake), true odds (effPrice), and actual PnL (profit/loss).close_reason: "order_filled" on a failed bet.B) and a concise 3-bet preview block directly in the Combat HUD.selectionMode in parseTotalMarket.ahou), it picks the line closest to 1.95 (even money) to offer the most balanced handicap.tahou), it uses lowest mode to automatically latch onto the lowest available line (e.g. 0.5) with odds > 1.0, and holds it until suspended (sticky line).FB + IH)fb / fb_ht) and Ice Hockey (ih) simultaneously in the live feed and Match Selection Menu ([FB] green / [IH] cyan badges).P1 / P2 / P3) for Ice Hockey via ir_status.period_scores, with automatic betslip teardown and re-arming when a period ends and the next period begins (P1 -> P2 -> P3).H/Ctrl+H and F/Ctrl+F filter by sport.config.json)sessionToken string Active Mollybet authentication token. instanceId string Whitelabel routing instance identifier. accounts Array<[string, string]> List of [bookmaker, account_id] credentials. adaptiveBookies string[] Authorized bookmakers for pricing and routing (strictly ["pin88"]). defaultStake number Combat stake amount in active currency. stakeStep number Incremental step when pressing + / -. slippagePct number Max allowable price slippage (0.03 = 3%). limitPrice = livePrice * (1 - slippagePct). defaultDuration number Order queue lifespan in seconds at Pinnacle. Default: 15. debounceMs number Hardware anti-double-click guard period (ms). dryRun boolean When true, executes full pipeline locally without sending HTTP order frame.SPACE FIRE TOTAL OVER on active match & active period. 1 FIRE HOME (П1) in MAIN mode, or FIRE ITB1 in ITB mode. 2 FIRE AWAY (П2) in MAIN mode, or FIRE ITB2 in ITB mode. 6 DIRECT FIRE ITB1 (Home Individual Total Over). 7 DIRECT FIRE ITB2 (Away Individual Total Over). 3 DIRECT FIRE 1st Half (HT) Total Over. 4 DIRECT FIRE 1st Half (HT) Home / ITB1. 5 DIRECT FIRE 1st Half (HT) Away / ITB2. I Toggle Market Mode: MAIN (1X2 + Total) $\leftrightarrow$ ITB (ITB1 + ITB2 + Total). T Toggle Active Period: Full-Time (FT) $\leftrightarrow$ 1st Half (HT). + / - Increase / Decrease active stake by stakeStep. S Open manual stake entry modal (with broker max-limit enforcement). [ / ] Cycle between armed matches in the pool. M Open Live Match Selection Menu. C Open Pre-Armed Coupons & Matches Manager. TAB Toggle Full-screen Live Log Viewer (terminal.log). D Disarm and release betslips for active match. Shift+D Disarm ALL matches and purge betslip pool. Q / Ctrl+C Graceful shutdown and release of all resources.M)UP / DOWN Navigate match list. ENTER / SPACE Select match and pre-arm 3 slips in combat pool. H / Ctrl+H Filter list: Toggle Ice Hockey Only ([IH]). F / Ctrl+F Filter list: Toggle Football Only ([FB]). L / Ctrl+L Filter list: Show Live Only. A / Ctrl+A Filter list: Show All Matches (all sports). 1-9 + ENTER Fast select by match row number. ESC / M Clear search query or return to Combat HUD.Posted Oct 26, 2026
Developed a Node.js-based CLI terminal for semi-automated sports betting.
0
1