Skip to content

Add exchange changelog monitoring agent - #7

Draft
pcriadoperez wants to merge 6 commits into
masterfrom
changelog-agent
Draft

Add exchange changelog monitoring agent#7
pcriadoperez wants to merge 6 commits into
masterfrom
changelog-agent

Conversation

@pcriadoperez

Copy link
Copy Markdown
Owner

Summary

  • Automated daily system that monitors API changelogs for all 110 CCXT exchanges and creates GitHub issues when new API changes are detected
  • Uses Playwright (headless Chromium) to fetch changelog pages, SHA-256 hashing to detect changes, and Claude Haiku to interpret diffs into structured issue data
  • Supports multiple changelog sources per exchange (e.g., Binance spot + derivatives, OKX upcoming changes + API announcements)
  • 81 exchanges have changelog URLs (93 total sources across 12 multi-source exchanges), 29 without URLs auto-generate "needs review" issues
  • New exchanges added to CCXT are auto-detected and flagged

Files

  • exchange-changelog-monitor/monitor.py — Main CLI (run, seed, check)
  • exchange-changelog-monitor/fetcher.py — Playwright-based page fetching
  • exchange-changelog-monitor/agent.py — Claude Haiku diff interpretation
  • exchange-changelog-monitor/state.py — JSON state persistence
  • exchange-changelog-monitor/exchanges.yaml — All 110 exchanges with changelog URLs
  • .github/workflows/changelog-monitor.yml — Daily cron at 08:00 UTC

Test plan

  • Run pip install -r exchange-changelog-monitor/requirements.txt && playwright install chromium
  • Run python exchange-changelog-monitor/monitor.py check binance to verify fetch + analysis pipeline
  • Run python exchange-changelog-monitor/monitor.py seed to establish baseline state
  • Run python exchange-changelog-monitor/monitor.py run --dry-run to verify full pipeline without creating issues
  • Trigger workflow manually with dry_run: true to test in CI
  • Switch to dry_run: false for production

🤖 Generated with Claude Code

Automated daily system that monitors API changelogs for all 110 CCXT
exchanges and creates GitHub issues when changes are detected.

- Playwright fetches changelog pages (handles JS-rendered + bot blocking)
- SHA-256 hashing detects content changes between runs
- Claude Haiku interprets diffs and extracts structured API change data
- GitHub API creates issues with labels, deduplicating against existing
- 81 exchanges have changelog URLs (93 total sources), 12 multi-source
- 29 exchanges without URLs trigger "needs review" issues
- New CCXT exchanges auto-detected via __init__.py comparison
- Daily cron at 08:00 UTC via GitHub Actions
- Async concurrent fetching with Playwright (5 pages at once vs sequential)
- Fix agent truncation: both old/new text truncated from head (changelogs prepend)
- Increase agent max_tokens to 4000 to prevent truncated JSON responses
- Auto-create GitHub labels before issue creation (prevents 422 errors)
- Rate limiting on GitHub API calls (2s between calls, avoids 30 req/min cap)
- Auto-seed on first run (empty state triggers seed, prevents issue flood)
- Truncate state text_snapshot to 20K chars (keeps state.json under 2MB)
- Add .gitignore for __pycache__
- Increase workflow timeout to 30 minutes
- Remove dead legacy changelog_url fallback code
- check command reuses single browser for all sources
- Fix Bybit announcements URL (was returning HTTP2 protocol error)
- Deduplicate 9 exchange aliases that shared identical changelog URLs
  (binancecoinm, binanceusdm, gateio, huobi, krakenfutures,
  kucoinfutures, myokx, okxus, woofipro) — avoids duplicate fetches
- Add pacifica exchange (newly detected in CCXT)
- Log when agent finds no actionable changes (was silent before)
- Add retries (3 attempts with backoff) for failed fetches
- Use realistic browser User-Agent and headers to avoid bot blocking
- Try networkidle first, fall back to domcontentloaded + extra wait
- Increase timeout to 45s, add extra wait for JS-rendered pages
- Remove fetch-failure GitHub issue creation (just log instead)
- Remove broken Bybit announcements URL (site blocks headless browsers)
- Fixes modetrade/orderly empty page issue (now succeeds on retry)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant