You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extends Synth Overlay to support Kalshi as a second prediction market platform alongside Polymarket. The extension now detects Kalshi pages, scrapes live prices (dollar + cent formats), maps real Kalshi ticker formats to Synth assets/market types, and serves edge data through the existing API server. Includes extension context invalidation guards to prevent errors on extension reload.
Added _KALSHI_ASSET_MAP with 30+ real Kalshi series tickers (KXBTCD, KXBTC, KXBTC15M, KXETHD, etc.) mapped to assets
Added _kalshi_series_from_ticker() to extract series from full market tickers (e.g. KXBTCD-26MAR1317-T70499.99 → kxbtcd)
Short legacy tickers (btc, eth, btcd, ethd) require Kalshi-style date suffix to avoid collision with Polymarket slugs
Added detect_platform(), asset_from_kalshi_ticker(), get_kalshi_market_type() for Kalshi-specific routing
normalize_slug() handles multi-segment Kalshi URLs (e.g. /markets/kxsol15m/solana-15-minutes/kxsol15m-26mar121945) and tickers containing periods (e.g. -T70499.99)
Content Script (content.js)
Added scrapeKalshiPrices() with 4 strategies: cent format ("Yes 52¢"), dollar format ("Yes $0.52"), standalone prices with parent context walk, and order book patterns
slugFromPage() updated to extract last path segment for deep Kalshi URLs
Added scanKalshiMarketLinks() to detect crypto market links on Kalshi browse pages
Added isContextValid() guard + teardown() to prevent "Extension context invalidated" errors — clears polling interval, disconnects MutationObserver, and silences all chrome.runtime calls when extension context dies
Hi, @e35ventura
I am sorry, I know you are so busy. If you don't mind, could you please review my first PR and leave the feedback kindly?
I appreciate you.
It doesn't even work in your demo video? extensions shows kalshi price as 99c to 1c?
bandicam.2026-03-12.21-00-35-853.mp4
@e35ventura
Could you review this video again?
And please leave the feedback kindly.
dev-miro26
changed the title
feat(synth-overlay): Add Kalshi platform support with real ticker format matching
feat(synth-overlay): Add Kalshi platform support with real ticker format matching(close: #19)
Mar 13, 2026
dev-miro26
changed the title
feat(synth-overlay): Add Kalshi platform support with real ticker format matching(close: #19)
feat(synth-overlay): Add Kalshi platform support with real ticker format matching(Closes: #19)
Mar 13, 2026
Closing in favor of #41. PR #41 implements a much more robust Platform Registry architecture and a dynamic grammar parser for Kalshi tickers, which scales significantly better than maintaining a hardcoded list. More importantly, #41 fixes the critical Chrome extension context invalidation bugs on reload and reliably tracks Polymarket balances during SPA navigation. Great effort here, but the structural improvements in #41 make it the preferred path forward.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends Synth Overlay to support Kalshi as a second prediction market platform alongside Polymarket. The extension now detects Kalshi pages, scrapes live prices (dollar + cent formats), maps real Kalshi ticker formats to Synth assets/market types, and serves edge data through the existing API server. Includes extension context invalidation guards to prevent errors on extension reload.
Related Issues
Fixes #19
Type of Change
What Changed
Matcher (
matcher.py)_KALSHI_ASSET_MAPwith 30+ real Kalshi series tickers (KXBTCD, KXBTC, KXBTC15M, KXETHD, etc.) mapped to assets_kalshi_series_from_ticker()to extract series from full market tickers (e.g.KXBTCD-26MAR1317-T70499.99→kxbtcd)btc,eth,btcd,ethd) require Kalshi-style date suffix to avoid collision with Polymarket slugsdetect_platform(),asset_from_kalshi_ticker(),get_kalshi_market_type()for Kalshi-specific routingnormalize_slug()handles multi-segment Kalshi URLs (e.g./markets/kxsol15m/solana-15-minutes/kxsol15m-26mar121945) and tickers containing periods (e.g.-T70499.99)Content Script (
content.js)scrapeKalshiPrices()with 4 strategies: cent format ("Yes 52¢"), dollar format ("Yes $0.52"), standalone prices with parent context walk, and order book patternsslugFromPage()updated to extract last path segment for deep Kalshi URLsscanKalshiMarketLinks()to detect crypto market links on Kalshi browse pagesisContextValid()guard +teardown()to prevent "Extension context invalidated" errors — clears polling interval, disconnects MutationObserver, and silences allchrome.runtimecalls when extension context diesExtension (
manifest.json,background.js,sidepanel.js)https://*.kalshi.com/*to host_permissions and content_scripts matchesbackground.js: SUPPORTED_ORIGINS includeskalshi.com, null guard onisSupportedUrl()sidepanel.js: platform-aware UI labels ("Kalshi" vs "Poly"), Kalshi market link buttons for navigation, updated hint text with real ticker examplesServer (
server.py)detect_platform()asset_from_kalshi_ticker()for asset resolution"platform": "kalshi"fieldREADME
Testing
venth-issue-19.mp4