Overview
This example shows the complete workflow for generating an interactive price chart for a Polymarket outcome. You’ll learn how to:- Get the condition ID from event or market data
- Resolve decimal CLOB token IDs
- Generate an interactive HTML chart with multiple time windows
- Interpret the chart output
The Complete Workflow
Step 1: Get Market Data
First, look up the market to get itsconditionId:
conditionId - you’ll need it for the next step.
Step 2: Get Decimal Token IDs
Use the condition ID to get CLOB token IDs:Step 3: Generate the Chart
Now generate an interactive chart for the YES outcome:- The script fetches recent high-resolution price data
- It fetches the full historical timeline (with
--fidelity 5000) - It merges both datasets for complete coverage
- It generates an HTML file with an interactive Plotly chart
- It automatically opens the chart in your default browser
Step 4: Explore the Interactive Chart
The generated chart includes: Time Window Tabs:- 1H - Last hour
- 6H - Last 6 hours
- 1D - Last 24 hours
- 1W - Last week (default view)
- 1M - Last month
- 3M - Last 3 months
- 6M - Last 6 months
- All - Complete history
- Hover over points to see exact price and timestamp
- Zoom by clicking and dragging
- Pan by holding shift and dragging
- Reset view with the home icon
- Download chart as PNG
Using the Installed Skill Path
If you installed the Polymarket skill via Codex, use the full path:Multi-Outcome Event Example
For events with multiple outcomes (e.g., “Democratic Presidential Nominee 2028”), chart each outcome separately:Step 1: Get event data
Step 2: Extract a condition ID
Step 3: Chart YES outcome
Step 4: Chart NO outcome (optional)
Converting Hex to Decimal
If you only have a hex token ID (e.g., from a smart contract), convert it:Troubleshooting
”No price history returned”
Browser doesn’t open
If the chart doesn’t open automatically:- Look for the file path in the console output
- Manually open the
.htmlfile in any browser - The file is saved in
/tmp/by default
Chart shows no data for recent time windows
For newly created markets:- Recent time windows (1H, 6H) may be empty
- Switch to longer windows (1W, 1M, All)
- Markets need trading activity to generate price history
Advanced: Comparing Multiple Outcomes
To compare outcomes side-by-side:- Generate separate charts for each outcome
- Open them in different browser tabs
- Use the same time window in each tab
- Manually compare price movements
Future versions may support multi-line charts. For now, generate separate charts per outcome.
What the Chart Shows
The Y-axis represents the price (probability) from 1.00:- $0.50 = 50% implied probability
- $0.75 = 75% implied probability
- $0.95 = 95% implied probability
- Sharp increases = New information favoring YES
- Gradual trends = Sustained sentiment shift
- Volatility = Uncertainty or breaking news
- Flat lines = Low trading activity or consensus
Next Steps
After generating charts:- Analyze holder positions - See who’s betting at different price levels
- Track wallet activity - Monitor specific traders’ entries and exits
- Compare with events - Correlate price spikes with news events
Related Commands
- Event Lookup - Get condition IDs from events
- Market Research - Find markets to chart
- CLI Reference - Full CLOB command documentation