Skip to content

betting_combat.rounds.market.polymarket

Polymarket’s fight-level timing markets for the dataset’s fights, and their trades.

Ported from the research (ufc/dataset/polymarket.py: market_kind, build). The matching of Polymarket events to fights (match) and the pulls stay with the data job; this module turns the matched markets and their cached trade lists into the trade table.

distance 'Fight to Go the Distance?'
before_k 'Will the fight end before Round k?'
decision 'Will the fight be won by decision?'
ou_k5 'O/U k.5 Rounds'

Trades carry no trader identifiers: timestamp, side (BUY / SELL, the taker’s), outcome (Yes / No), price, size.

Functions

market_kind

market_kind(question: str) -> str | None

The market’s kind from its question, or None for a market not kept.

poly_trades

poly_trades(markets: pd.DataFrame, trades: Mapping[str, list[Mapping[str, Any]]]) -> pd.DataFrame

Every trade as the YES side (research build): yes_price, and the taker’s direction on YES (+1 buys YES: BUY Yes or SELL No; -1 sells YES), ts, size, dollars (size x the traded outcome’s price); sorted by (fight_id, kind, ts), the original index kept.

Args: markets: the matched markets (poly_markets.csv: fight_id, kind, condition_id). trades: condition_id -> its trades (polymarket_side/<condition_id>.json.gz); a market without a list has no trades.