Add a real-time prediction market probability panel to an existing investment research or trading dashboard.
Pull unified Polymarket and Kalshi data into a Python dataset grouped by topic for quantitative analysis.
Embed the package as an AI assistant skill that surfaces global event probabilities on demand inside your tool.
Requires API access to Polymarket and Kalshi, title translation uses an LLM provider that may need an API key.
This repository is a build guide and reference code package for adding a global market-probability panel to an investment research system. It connects to two prediction-market platforms, Polymarket and Kalshi, both of which publish probability numbers for real-world events like Federal Reserve decisions, elections, and geopolitical developments. The probabilities come from people betting real money, so they reflect genuine market opinion rather than surveys or models. Reading those numbers is free and requires no account. The system collects raw market data from five public API endpoints and classifies every market into one of ten topic groups, such as monetary policy, elections, geopolitics, or AI milestones. It merges the two sources into a common data structure so outputs look consistent regardless of where a data point originated. The result is a snapshot panel that loads instantly from a local file, while a background refresh process quietly updates the data without making the user wait. Several practical problems are handled inside the package. Kalshi's full market catalog can take several minutes to download, so the system fetches it in the background and returns the previous snapshot while a new one builds. If an API call returns zero results, nothing gets written to disk, which protects against an outage accidentally clearing stored data. Title translation is done in small batches with retry logic to work around rate limits from language-model providers. The project is framed as a skill for AI coding assistants like Claude Code: you load the included files into your assistant's context and ask it to integrate the panel into your own app. The code folder contains a Python backend that uses only the httpx library for HTTP requests, plus a React frontend with chart components. Three swap points are documented, covering the data storage path, translation client, and chart library, so you can substitute your own choices without rewriting the core logic.
← simonlin1212 on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.