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

# Trades 🌱

> Polymarket trades on Polygon.

The `polygon.predictions_onchain.trades` table contains every Polymarket trade on Polygon. Each row represents one fill.

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

### Table Details

| Property | Value |
| - | - |
| Table Name | `polygon.predictions_onchain.trades` |
| Table Status | Beta 🌱 |
| Unique Key | `block_timestamp`, `transaction_hash`, `log_index` |

### Table Columns

| Column Name | Data Type | Description |
| - | - | - |
| event\_name | VARCHAR(16777216) | Type of trade event (OrderFilled, FPMMBuy, FPMMSell). |
| project | VARCHAR(16777216) | Name of the project (e.g., Polymarket). |
| protocol | VARCHAR(16777216) | Protocol name (e.g., polymarket). |
| exchange\_type | VARCHAR(16777216) | Exchange type: CTFExchange, NegRiskCTFExchange, CTFExchangeV2, NegRiskCTFExchangeV2, ComboExchange, or FPMM. |
| contract\_version | VARCHAR(16777216) | Exchange contract version: `v1`, `v2`, or `v3` (Combos). |
| market\_address | VARCHAR(42) | Address of the prediction market contract. |
| order\_hash | VARCHAR(16777216) | Unique hash of the order. |
| maker | VARCHAR(42) | Address of the maker in the trade. |
| taker | VARCHAR(42) | Address of the taker in the trade. |
| side | NUMBER(38,0) | Maker order side. 0 = BUY (bid), 1 = SELL (ask). |
| side\_name | VARCHAR(16777216) | BUY if the maker posted a bid, SELL if the maker posted an ask. Null for FPMM. |
| builder | VARCHAR(16777216) | Order attribution field (bytes32). |
| metadata | VARCHAR(16777216) | Per-order data field (bytes32). |
| condition\_id | VARCHAR(16777216) | Market condition id, or the combo id on v3 Combos rows. |
| asset\_id | VARCHAR(16777216) | Outcome token id, or the PositionManager id on v3 Combos rows. |
| collateral\_amount\_raw | VARCHAR(16777216) | Raw collateral amount (unnormalized). |
| token\_amount\_raw | VARCHAR(16777216) | Raw share amount (unnormalized). |
| price\_str | VARCHAR(16777216) | Trade price per share, as a string. |
| price | FLOAT | Share price as a float. |
| maker\_amount\_raw | VARCHAR(16777216) | Raw amount provided by the maker. |
| taker\_amount\_raw | VARCHAR(16777216) | Raw amount provided by the taker. |
| fee\_charged\_raw | VARCHAR(16777216) | Gross fee for the fill in raw collateral units. |
| fee\_rebate\_raw | VARCHAR(16777216) | Maker rebate for the fill in raw collateral units. |
| fee\_raw | VARCHAR(16777216) | Raw fee amount. |
| fee\_charged\_event\_count | NUMBER(38,0) | Number of FeeCharged events in the transaction. |
| fee\_rebate\_event\_count | NUMBER(38,0) | Number of FeeRefunded events in the transaction. |
| collateral\_token\_address | VARCHAR(42) | Address of the collateral token. |
| collateral\_token\_name | VARCHAR(16777216) | Name of the collateral token. |
| collateral\_token\_symbol | VARCHAR(16777216) | Symbol of the collateral token. |
| collateral\_token\_decimals | NUMBER(38,0) | Decimals of the collateral token. |
| collateral\_amount | VARCHAR(16777216) | Collateral amount (normalized). |
| fee\_charged\_amount | VARCHAR(16777216) | Per-row gross fee in collateral token units. |
| fee\_rebate\_amount | VARCHAR(16777216) | Per-row maker rebate in collateral token units. |
| fee\_amount | VARCHAR(16777216) | Fee amount (normalized). |
| usd\_exchange\_rate | FLOAT | USD exchange rate of the collateral token at the time of trade. |
| usd\_collateral\_amount | FLOAT | Collateral amount in USD. |
| usd\_fee\_charged\_amount | FLOAT | USD value of the per-row gross fee. |
| usd\_fee\_rebate\_amount | FLOAT | USD value of the per-row maker rebate. |
| usd\_fee\_amount | FLOAT | Fee amount in USD. |
| transaction\_index | NUMBER(38,0) | Index of the transaction in the block. |
| transaction\_hash | VARCHAR(66) | Hash of the transaction. |
| log\_index | NUMBER(38,0) | Log index of the trade event. |
| block\_timestamp | TIMESTAMP\_NTZ(9) | Timestamp of the block containing the trade. |
| block\_number | NUMBER(38,0) | Block number of the trade. |
| block\_hash | VARCHAR(66) | Hash of the block containing the trade. |
| unique\_id | VARCHAR(16777216) | Concatenated identifier for the trade. |
| \_created\_at | TIMESTAMP\_NTZ(9) | The timestamp of the creation of the trade. |
| \_updated\_at | TIMESTAMP\_NTZ(9) | The timestamp of the last update of the trade. |

***

### Sample Query

```sql theme={null}
select *
from polygon.predictions_onchain.trades
where block_timestamp >= '2026-10-18' and block_timestamp < '2026-10-19'
limit 100
```
