1. Choose the unit before comparing venues
Outcome's trades.count column stores Kalshi contract quantity and Polymarket outcome-token share quantity. sum(count) therefore measures traded quantity. count() counts trade records. Neither expression is dollar volume, unique traders, or open interest, and a record does not necessarily correspond to one customer order.
Keep the venue series separate and label them Kalshi contracts and Polymarket shares. Quantities are useful for tracking activity within a venue; venue-wide totals also reflect different market listings and coverage. The markets.volume and volume_24h fields are current venue-supplied snapshots, so this recipe derives every period from trades instead of combining those fields into a historical comparison.
Run these queries in the SQL playground or API with an account and credits. Each query uses FINAL to collapse stored row versions and is_deleted = 0 to exclude deleted records. Start with a short period before expanding the scan. LIMIT reduces the returned result size, not necessarily the query's data scan.
2. Build a daily activity chart
Replace the dates with the complete UTC days you want to compare. This example includes October 1 through October 7 and excludes October 8. The output contains one row per observed venue-day, with the first and last observed trade to help investigate partial days.
Plot day_utc on the x-axis and traded_quantity on the y-axis, split by venue. Use observed_trades or active_markets as a second chart. A quantity spike with few active markets suggests concentrated activity; a rise in all three measures indicates broader activity in the observed dataset. Missing venue-days need investigation before replacing them with zeros.
SELECT
toDate(created_time, 'UTC') AS day_utc,
venue,
count() AS observed_trades,
sum(count) AS traded_quantity,
uniqExact(ticker) AS active_markets,
min(created_time) AS first_observed_trade,
max(created_time) AS last_observed_trade
FROM trades FINAL
WHERE venue IN ('kalshi', 'polymarket')
AND is_deleted = 0
AND count > 0
AND created_time >= toDateTime('2026-10-01 00:00:00', 'UTC')
AND created_time < toDateTime('2026-10-08 00:00:00', 'UTC')
GROUP BY day_utc, venue
ORDER BY day_utc, venue3. Find the markets driving a spike
Set the window to the day or week that stood out. This query returns the ten largest markets by quantity within each venue. Copy a venue/ticker pair into the SQL discovery guide to retrieve its title and rules, or use it directly in the candlestick recipe to inspect the timing of the activity.
Check whether a few markets dominate before interpreting a venue-wide change as broad growth. When comparing equivalent questions across venues, read the rules and cutoff times first. Matching keywords or titles alone do not establish that their contracts pay out on the same event.
SELECT
venue,
ticker,
sum(count) AS traded_quantity,
count() AS observed_trades,
min(created_time) AS first_observed_trade,
max(created_time) AS last_observed_trade
FROM trades FINAL
WHERE venue IN ('kalshi', 'polymarket')
AND is_deleted = 0
AND count > 0
AND created_time >= toDateTime('2026-10-01 00:00:00', 'UTC')
AND created_time < toDateTime('2026-10-08 00:00:00', 'UTC')
GROUP BY venue, ticker
ORDER BY venue, traded_quantity DESC, ticker
LIMIT 10 BY venue4. Compare each venue with its own previous week
Set period_end to the UTC midnight after your last complete day. The query compares the preceding seven days with the seven days before them, excluding a partial current day. Keeping both periods the same length makes a percentage change more useful than comparing unlike calendar windows.
quantity_change_pct is positive when observed quantity rose and negative when it fell. A null percentage means there was no positive denominator, so report the two quantities instead of an infinite increase. records_change_pct provides a second view: quantity can increase even while fewer trade records are observed.
WITH
toDateTime('2026-10-15 00:00:00', 'UTC') AS period_end,
period_end - INTERVAL 7 DAY AS recent_start,
period_end - INTERVAL 14 DAY AS previous_start
SELECT
venue,
sumIf(count, created_time < recent_start) AS previous_quantity,
sumIf(count, created_time >= recent_start) AS recent_quantity,
countIf(created_time < recent_start) AS previous_records,
countIf(created_time >= recent_start) AS recent_records,
100.0 * (recent_quantity / nullIf(previous_quantity, 0) - 1)
AS quantity_change_pct,
100.0 * (recent_records / nullIf(previous_records, 0) - 1)
AS records_change_pct
FROM trades FINAL
WHERE venue IN ('kalshi', 'polymarket')
AND is_deleted = 0
AND count > 0
AND created_time >= previous_start
AND created_time < period_end
GROUP BY venue
ORDER BY venue5. Label the result so someone else can use it
A useful chart title is Daily observed Kalshi contracts and Polymarket shares, with the UTC window and query time in its caption. Retain both daily activity and market-driver tables in the notebook so readers can explain a large change. Use within-venue percentage changes to compare momentum while keeping the underlying units visible.
Do not turn sum(yes_price * count) into a dollar-volume label: for a NO-token trade, yes_price is the complementary first-outcome price. Fees, collateral conventions, and trade-side mapping require a separately defined cash-value measure. These recipes deliberately produce activity metrics that can be reproduced from the named columns, rather than an unexplained combined dollar total.