Skip to content

feat(synth-overlay): expand to 5min/15min markets and ETH/SOL assets#13

Open
bitloi wants to merge 1 commit intoentrius:mainfrom
bitloi:feature/issue-11-expand-synth-overlay
Open

feat(synth-overlay): expand to 5min/15min markets and ETH/SOL assets#13
bitloi wants to merge 1 commit intoentrius:mainfrom
bitloi:feature/issue-11-expand-synth-overlay

Conversation

@bitloi
Copy link
Contributor

@bitloi bitloi commented Mar 3, 2026

Summary

Expand the synth-overlay Chrome extension tool to support:

  1. 5-minute and 15-minute markets — new up/down horizons from the Synth API
  2. ETH and SOL assets — multi-asset support for all up/down market types (daily, hourly, 15min, 5min)

This implementation preserves the existing dual-horizon analysis (1h vs 24h cross-comparison) for daily/hourly markets while adding single-horizon analysis with reference-horizon context for the new 5min/15min markets.

Key Changes

Component Changes
synth_client/client.py Added get_polymarket_5min(), get_polymarket_15min(); added asset param to daily/hourly methods
tools/synth-overlay/matcher.py Added MARKET_5MIN, MARKET_15MIN detection; added short prefixes (btc-, eth-, sol-) for asset extraction
tools/synth-overlay/server.py Refactored to handle all market types × assets; preserves dual-horizon for daily/hourly, uses single-horizon for 5min/15min
tools/synth-overlay/analyzer.py Added analyze_single_horizon() with cross-horizon reference and horizon-appropriate invalidation text
tools/synth-overlay/extension/ Updated UI for dynamic horizon labels, asset display, and both response formats
mock_data/polymarket/ Added 10 new mock files for 5min/15min × BTC/ETH/SOL and daily/hourly × ETH/SOL

Demo Video

https://screenrec.com/share/oGic2vSunU

Demo covers:

  • BTC 5min market — single-horizon analysis with 15min reference context
  • BTC 15min market — horizon-specific invalidation text, 1h reference
  • ETH 5min market — multi-asset support, signal conflict detection
  • SOL 5min market — low confidence warning, reference disagreement
  • Side panel showing asset, horizon, edge, confidence, and invalidation

Related Issues

Closes #11

Type of Change

  • Bug fix
  • Improvement to existing tool
  • Documentation
  • Other (describe below)

Testing

  • Tested against Synth API
  • Manually tested
  • Tests added/updated

Test Results

.venv/bin/python -m pytest tools/synth-overlay/tests/ -v
# 80 passed, 1 warning in 0.19s

New tests added:

  • TestSingleHorizonAnalysis (6 tests) — covers single-horizon edge extraction, reference confirmation/conflict, horizon-specific invalidation text
  • Server tests for 5min/15min endpoints with field assertions
  • Dual-horizon field preservation tests for daily/hourly

Verification Steps

  1. Start the server:

    python tools/synth-overlay/server.py
  2. Test API endpoints:

    # BTC daily (dual-horizon response)
    curl -s "http://127.0.0.1:8765/api/edge?slug=bitcoin-up-or-down-on-february-26" | jq
    
    # ETH 15-minute (single-horizon response)
    curl -s "http://127.0.0.1:8765/api/edge?slug=eth-updown-15m-1772204400" | jq
    
    # SOL 5-minute
    curl -s "http://127.0.0.1:8765/api/edge?slug=sol-updown-5m-1772205000" | jq
  3. Load extension in Chrome:

    • Extensions → Load unpacked → select tools/synth-overlay/extension
    • Navigate to Polymarket pages with different assets/horizons
    • Verify side panel displays correct asset, horizon, and signals

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Changes are documented (if applicable)

Files Changed

File Purpose
synth_client/client.py Add 5min/15min methods, asset param to existing methods
tools/synth-overlay/server.py Handle all market types with correct analysis path
tools/synth-overlay/analyzer.py Add analyze_single_horizon() with reference context
tools/synth-overlay/matcher.py Add 5min/15min detection and short asset prefixes
tools/synth-overlay/extension/sidepanel.html Dynamic horizon/asset UI elements
tools/synth-overlay/extension/sidepanel.js Handle both dual-horizon and single-horizon responses
tools/synth-overlay/README.md Updated API usage documentation
tools/synth-overlay/tests/test_analyzer.py 6 new tests for single-horizon analysis
tools/synth-overlay/tests/test_matcher.py Tests for 5min/15min detection and short prefixes
tools/synth-overlay/tests/test_server.py Tests for new endpoints and field assertions
mock_data/polymarket/*.json 10 new mock files for expanded coverage

- Add get_polymarket_5min() and get_polymarket_15min() methods to SynthClient
- Add asset parameter to get_polymarket_daily() and get_polymarket_hourly()
- Update matcher.py with MARKET_5MIN and MARKET_15MIN type detection
- Add short asset prefixes (btc-, eth-, sol-) to asset detection
- Preserve dual-horizon analysis (1h vs 24h) for daily/hourly markets
- Add analyze_single_horizon() with cross-horizon reference for 5min/15min
- Update Chrome extension UI for dynamic horizon labels and asset display
- Add mock data for 5min/15min markets and ETH/SOL daily/hourly
- 80 tests passing including 6 new analyzer + 8 new server tests

Closes entrius#11
@bitloi
Copy link
Contributor Author

bitloi commented Mar 3, 2026

Hi @e35ventura Please check the pr and give me your feedback.
Thank you.

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.

Feature request: add 5/15 minute markets and ETH/SOL events

1 participant