> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Combo Legs 🌱

> Polymarket Combos v3 legs: one row per combo condition and ordered leg.

The `polygon.predictions.combo_legs` table lists every leg of a Polymarket Combos (v3) parlay. One row is one (combo, ordered leg). ComboExchange fills are `contract_version = 'v3'` on `trades_enriched`.

`combo_condition_id` is the combo id on those fills. `market_token_id` is the outcome token on `markets.token_id`. Each `markets.condition_id` has two token rows. `leg_question_id` is set on negrisk (`02`) legs only.

### Table Details

| Property     | Value                               |
| ------------ | ----------------------------------- |
| Table Name   | `polygon.predictions.combo_legs`    |
| Table Status | Beta 🌱                             |
| Unique Key   | `combo_condition_id`, `leg_ordinal` |

### Table Columns

| Column Name          | Data Type         | Description                                                                                      |
| -------------------- | ----------------- | ------------------------------------------------------------------------------------------------ |
| combo\_condition\_id | VARCHAR(16777216) | Combo (parlay) condition id. Same value as `trades_enriched.condition_id` on Combos (`v3`) rows. |
| leg\_ordinal         | NUMBER(38,0)      | 0-based position of the leg in the combo's ordered legs.                                         |
| leg\_position\_id    | VARCHAR(16777216) | Leg outcome PositionManager id. Not `markets.token_id`.                                          |
| leg\_module          | VARCHAR(16777216) | `01` binary market, `02` negrisk.                                                                |
| leg\_outcome         | VARCHAR(16777216) | `YES` or `NO`.                                                                                   |
| leg\_condition\_id   | VARCHAR(16777216) | Underlying market condition id.                                                                  |
| leg\_question\_id    | VARCHAR(16777216) | Negrisk (`02`) question id for this leg. Null on binary (`01`) legs.                             |
| leg\_event\_name     | VARCHAR(16777216) | Negrisk (`02`) event name. Null on binary (`01`) legs.                                           |
| leg\_question        | VARCHAR(16777216) | Leg market question text.                                                                        |
| leg\_category        | VARCHAR(16777216) | Leg market category.                                                                             |
| market\_token\_id    | VARCHAR(16777216) | Outcome token id for this leg. Same value as `markets.token_id`.                                 |

***

### Sample Query

```sql theme={null}
select
  t.block_timestamp,
  t.parlay_description,
  l.leg_ordinal,
  l.leg_outcome,
  l.leg_question,
  m.question,
  m.token_outcome,
  t.usd_collateral_amount
from polygon.predictions.trades_enriched t
inner join polygon.predictions.combo_legs l
  on l.combo_condition_id = t.condition_id
inner join polygon.predictions.markets m
  on m.token_id = l.market_token_id
where t.contract_version = 'v3'
  and t.block_timestamp >= current_timestamp - interval '7 days'
order by t.block_timestamp desc, l.leg_ordinal
```
