Polydune
Docs

The query language.

Every widget can be written as a short query: pick a source, shape the rows, choose a chart. One clause per line, applied top to bottom. Switch any widget to Advanced · query in the editor to see and edit its query.

Clauses

from
from <source> [field=value …]
Pick the data source and its fields. Sources: markets, market, smart_money, traders, trader, signals, conviction, activity, categories.
where
where <field> <op> <value>
Keep rows matching the condition; repeat for AND. Ops: = != > >= < <= contains !contains empty !empty. Nested fields use dots (trader.handle).
derive
derive <name> = <expression>
Add a computed column: fields, numbers, + - * / and parentheses, e.g. size * curPrice - size * avgPrice.
group
group <field> sum(<f>) avg(<f>) count() min(<f>) max(<f>) [as <name>]
Group rows by a field and aggregate. Output columns are named sum_<f>, count, … unless renamed with as.
sort
sort <field> [asc|desc]
Order the rows (default desc).
limit
limit <n>
Keep the first n rows.
show
show table|bar|line|number|list [x=<field>] [y=<field>] [width=half|full]
Choose the visualisation and axes.

Sources and their fields

marketsLive markets
category subcategory q upcoming limit
Live Polymarket markets with current odds, 24h volume and liquidity, hottest first. Filter by category, subcategory or a title search.
marketMarket & odds history
market* history period
One market by slug or conditionId with live probabilities, volume, liquidity and (optionally) the odds history over 1h to max.
smart_moneySmart money on a market
market* scope holders
Which ranked, Sharp and Whale wallets hold each side of a market, their shares, entries and track records, plus the aggregate 'follow' line and the top holders.
tradersTrader leaderboard
sort category subcategory hideBots q limit offset
200k+ Polymarket wallets ranked by realized P&L, volume, ROI or 24h/7d/30d P&L, with win rate and bot flag; filter by category and subcategory.
traderTrader deep-dive
trader* include limit
A wallet's profile, all-time metrics, per-category stats, ranks and badges; add positions, trades, series or markets.
signalsModel signals
family history
Polynyx's signal families with their live picks and paper track records (win rate, Brier, P&L).
convictionSmart-money conviction
category subcategory clustersOnly limit
Accumulated smart-money positioning on live and upcoming markets: wallets agreeing, net flow, entries, divergence vs the crowd.
activityLive trade tape
category subcategory exclude minUsd limit
The latest taker trades across Polymarket, enriched with each trader's rank and badge; filter by category, subcategory and minimum size.
categoriesCategories
no fields
The category taxonomy used by every other source.

Examples

Who is buying NFL right now
from activity subcategory="NFL" minUsd=1000 limit=100
where side = BUY
group trader.handle sum(value) count()
sort sum_value desc
limit 10
show bar x=handle y=sum_value width=full
Unrealized P&L per open position of a wallet
from trader trader=quietwhale include=positions limit=50
derive unrealized = size * curPrice - size * avgPrice
sort unrealized desc
limit 12
show bar x=title y=unrealized
Politics markets where sharps disagree with the crowd
from conviction category=Politics limit=50
where divergence >= 0.1
sort netFlow desc
limit 10
show table
Total 24h volume of live crypto markets
from markets category=Crypto limit=200
group category sum(volume24h) count()
show number y=sum_volume24h
Odds history of the Fed market
from market market=fed-cut-dec history=true period=1m
show line width=full
Is PQL SQL?
No. It is a small pipeline language: one clause per line, applied in order to the rows a data source returns. It covers what dashboard queries use most — filter, computed columns, group and aggregate, sort, limit — without joins or arbitrary code.
Do Simple and Advanced modes stay in sync?
Yes. Every widget is stored as a source, fields and a transform; the Simple forms and the Advanced query are two views of the same thing, so you can switch at any time.
Where does the data come from?
Each `from` source is an endpoint of the Polynyx Developer API, fetched live and cached on your plan's refresh cadence.