Conversation
Co-authored-by: Warhawk69 <112916099+Warhawk69@users.noreply.github.com>
…tate management Co-authored-by: Warhawk69 <112916099+Warhawk69@users.noreply.github.com>
…bets and market-matcher Co-authored-by: Warhawk69 <112916099+Warhawk69@users.noreply.github.com>
…ems using live data and store Co-authored-by: Warhawk69 <112916099+Warhawk69@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Integrate Live Kalshi & Polymarket Data + Arbitrage Logic (Replace Mock Data)
Replace mock data with live API integration for arbitrage detection across Kalshi and Polymarket
Aug 9, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR completely replaces hardcoded mock data in all four React components with live API integration for real-time arbitrage detection between Kalshi and Polymarket prediction markets.
Overview
The application now fetches live market data, performs fuzzy market matching, calculates real arbitrage opportunities, and provides a complete workflow for cross-platform prediction market arbitrage detection.
Key Changes
Core Infrastructure
src/api/kalshi.ts) and Polymarket (src/api/polymarket.ts) with normalized market data structuresAPR = (1-C)/C * 365/Dwhere C = minYes + minNoLive Data Integration
Component Refactoring
Arbitrage Bets Component: Now displays live arbitrage opportunities calculated from matched markets in the store, showing real APR calculations, profit projections, and detailed condition pricing breakdowns.
Market Matcher Component: Replaced static market lists with live feeds from both exchanges. Implements fuzzy similarity scoring for match suggestions and provides a manual approval workflow with confidence metrics.
Ecosystem Matcher Component: Multi-platform market selection from live data with real-time ecosystem creation. Markets are grouped across exchanges with derived statistics (exchange count, market count, total conditions).
Matched Ecosystems Component: Displays stored ecosystems with live-calculated days until close, expandable details showing constituent markets, and integrated condition mapping interfaces.
Arbitrage Detection Logic
The system now detects arbitrage opportunities when:
Data Persistence
Example Usage
The application is now ready for production use with live prediction market data and real arbitrage detection capabilities.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.