Overview
This example shows how to retrieve event metadata and all outcome markets from a Polymarket event page. You’ll learn how to:- Look up an event using its slug
- Parse the event response structure
- Access outcome markets and their prices
- Handle the
outcomePricesJSON string correctly
The Command
Let’s look up the “Democratic Presidential Nominee 2028” event:The slug comes from the URL:
https://polymarket.com/event/democratic-presidential-nominee-2028Sample Output
What to Look For
Top-Level Event Metadata
- title: The event name displayed on Polymarket
- status:
active,closed, orresolved - startDate and endDate: When the event opened and when it closes
Markets Array
Themarkets array contains all outcome markets for this event. Each outcome has:
- question: The outcome option (e.g., “Gavin Newsom”)
- conditionId: Required for looking up holders, CLOB data, and token IDs
- slug: Used for direct market lookup with
markets get - outcomePrices: Current YES/NO prices (see parsing below)
- volume: Total trading volume in USDC
Parsing Outcome Prices
In Python:Common Mistake
The URL path tells you which command to use:/event/→events get/market/→markets get
Next Steps
Now that you have the event data, you can:- Generate price charts - Use the
conditionIdto get token IDs, then create charts (see Price Tracking) - Find top holders - Run
polymarket data holders <CONDITION_ID>for any outcome - Look up individual markets - Use the outcome
slugwithmarkets getfor detailed market data
Related Commands
- Market Research - Search and filter markets by volume
- Price Tracking - Generate interactive price charts