Commit Graph
9 Commits
Author SHA1 Message Date
John Doe 69f57a9ff9 feat: detailed Telegram scan reports with open positions and EV signals 2026-04-18 19:28:46 +08:00
John Doe 1698f09ad0 Fix bucket_prob: bounded ranges now use proper Gaussian CDF (was returning 0 for all finite ranges) 2026-04-18 17:23:15 +08:00
John Doe cd976bc812 Add self-learning system, timeout wrappers, and fix Atlanta hang
- Self-learning: trade_log.json + model.json track winrate/PnL per city/bucket
- Adaptive Kelly: lowers fraction if winrate < 45% or PnL negative
- Adaptive EV floor: raises threshold when performance poor
- Timeout wrapper (_timeout_call): 10s limit on CLOB auth + order calls
- Timeout on get_condition_id: 8s limit per market
- Fix: DATA_DIR referenced before assignment (moved LEARNING_DIR to BOT_DIR)
- Add debug timing logs per city and per D+N fetch
- [LIVE] output format for successful orders
- Fix print flow: 'ok' + newline after each city regardless of signal
- record_trade() called on every successful order (outcome=pending)
2026-04-18 17:19:19 +08:00
John Doe f82721a9ef Revert proxy complexity: TUN mode handles all routing at OS level
- start_bot_v3.sh: unset ALL_PROXY/all_proxy so TUN VPN handles all traffic
- Revert _direct_session and _tg_session proxy config
- All requests now use standard requests module (goes through TUN)
- Keep Telegram notification functions (tg_signal, tg_scan_summary)
- Keep config.json with bot token and chat ID
2026-04-18 16:59:25 +08:00
John Doe c1d026d988 Fix proxy routing: use direct session for Polymarket/Open-Meteo, SOCKS only for Telegram
- Remove duplicate import requests
- Add _direct_session (trust_env=False) for gamma-api.polymarket.com and open-meteo.com
- Replace all requests.get/post calls with _direct_session
- _tg_session still uses SOCKS5h proxy for Telegram API
- Closes gamma-api timeout issue caused by ALL_PROXY routing it through SOCKS
2026-04-18 16:56:08 +08:00
John Doe f19655cb08 Add Telegram notifications for trade signals and scan summaries
- Add requests + logging imports
- Add TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID to config
- Add send_telegram(), tg_signal(), tg_scan_summary() functions
- Configure SOCKS5h proxy (socks5h://127.0.0.1:6922) for Telegram API
- Send tg_signal() on order filled/failed in scan_and_trade()
- Send tg_scan_summary() after each scan cycle
- Update config.json with bot token and chat ID
2026-04-18 16:53:02 +08:00
John Doe 3722cf2ffd ii 2026-04-18 15:27:39 +08:00
alteregoeth-aiandGitHub 7e48a5d499 Delete bot_v3.py 2026-03-10 13:40:29 -05:00
alteregoeth-aiandGitHub 60cfeaa81c Rename bot_v3 (1).py to bot_v3.py 2026-03-09 02:25:39 -05:00