> ## 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.

# Markets 🌱

> Polymarket markets and outcome tokens with resolution outcomes, from onchain data only.

The `polygon.predictions_onchain.markets` table lists Polymarket markets with their outcome tokens and resolution outcomes. Each row represents one outcome token of a market.

This table contains no Polymarket API data. The equivalent table with Polymarket API metadata is [`polygon.predictions.markets`](/historical-data/supported-blockchains/evm/polygon/predictions/markets).

### Table Details

| Property | Value |
| - | - |
| Table Name | `polygon.predictions_onchain.markets` |
| Table Status | Beta 🌱 |
| Unique Key | `condition_id`, `outcome_index`, `token_id` |
| Clustering Key(s) | `prepared_at::date` |
| Search Optimization | `condition_id`, `question_id`, `token_id` |

### Table Columns

| Column Name | Data Type | Description |
| - | - | - |
| project | VARCHAR(16777216) | Project name (ex. polymarket). |
| protocol | VARCHAR(16777216) | Protocol name (ex. polymarket). |
| market\_unique\_id | VARCHAR(16777216) | Unique key for grouping related markets. |
| condition\_id | VARCHAR(16777216) | Unique condition identifier. |
| market\_id | VARCHAR(16777216) | Neg-risk market identifier. |
| market\_name | VARCHAR(16777216) | Neg-risk event title, or 'single market' for markets outside a neg-risk event. |
| market\_description\_onchain | VARCHAR(16777216) | Neg-risk event description published onchain. |
| question\_id | VARCHAR(16777216) | Unique question identifier. |
| question | VARCHAR(16777216) | Market question text published onchain. |
| description | VARCHAR(16777216) | Market resolution description published onchain. |
| polymarket\_market\_id | VARCHAR(16777216) | Polymarket market identifier. |
| token\_id | VARCHAR(16777216) | Token ID for this outcome. |
| outcome\_index | NUMBER(38,0) | Outcome slot of the token within the condition (0-based). |
| collateral\_token | VARCHAR(42) | Collateral token the outcome token was minted with. |
| token\_outcome | VARCHAR(16777216) | Outcome name for the token, such as Yes, No, Up or Down. |
| token\_name | VARCHAR(16777216) | Combined outcome and question name. |
| is\_winner | BOOLEAN | Whether this outcome won. |
| neg\_risk | BOOLEAN | Whether this is a NegRisk market. |
| oracle | VARCHAR(42) | Address that resolves the market question. |
| fee\_bips | VARCHAR(16777216) | Neg-risk market fee in basis points. |
| fpmm | VARCHAR(42) | FPMM contract address. |
| prepared\_at | TIMESTAMP\_NTZ(9) | Timestamp when the market was created onchain. |
| outcome | VARCHAR(16777216) | Resolution outcome: yes, no, 50/50, unknown, or unresolved. |
| resolved\_at | TIMESTAMP\_NTZ(9) | Resolution timestamp. |
| \_created\_at | TIMESTAMP\_NTZ(9) | Record creation timestamp. |
| \_updated\_at | TIMESTAMP\_NTZ(9) | Record update timestamp. |

***

### Sample Query

```sql theme={null}
select *
from polygon.predictions_onchain.markets
where condition_id = '0x7ed35c6b3e0afd120e291f434b0e220970906b7b91572c1490c657e89f2d3d17'
```
