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

> Prediction market trades on BNB Smart Chain.

The `bsc.predictions.trades` table is prediction-market trade fills on BNB Smart Chain. Each row is one fill. `project` identifies the venue.

### Table Details

| Property | Value |
| - | - |
| Table Name | `bsc.predictions.trades` |
| Table Status | Beta 🌱 |
| Unique Key | `block_timestamp`, `transaction_hash`, `log_index` |
| Clustering Key(s) | `block_timestamp::date` |
| Search Optimization | `transaction_hash` |

<Note>
  `side` is the maker's resting order. 0 / BUY is a bid. 1 / SELL is an ask. `taker` is the other party. Null when the project has no maker order.
</Note>

<Note>
  `fee_amount` is the net fee after rebates recorded on the trade.
</Note>

### Table Columns

`_raw` amounts are unnormalized. `price_str` keeps the trade price as text.

| Column Name | Data Type | Description |
| - | - | - |
| event\_name | VARCHAR | Trade event name. |
| project | VARCHAR | Project name. |
| protocol | VARCHAR | Protocol name. |
| exchange\_type | VARCHAR | Exchange type. |
| contract\_version | VARCHAR | Contract version. Null when the project does not set one. |
| market\_address | VARCHAR | Exchange contract address. |
| order\_hash | VARCHAR | Hash of the maker order. |
| maker | VARCHAR | Maker address. |
| taker | VARCHAR | Taker address. |
| side | NUMBER(38,0) | Maker order side. 0 is a bid, 1 is an ask. Null when the project has no maker order. |
| side\_name | VARCHAR | BUY when the maker posted a bid, SELL when the maker posted an ask. Null when the project has no maker order. |
| builder | VARCHAR | Builder attribution on the order. Null when the project does not set one. |
| metadata | VARCHAR | Extra per-order data. Null when the project does not set it. |
| condition\_id | VARCHAR | Onchain condition id for the market. |
| asset\_id | VARCHAR | Outcome token id. Same value as `token_id` on [markets](/historical-data/supported-blockchains/evm/bsc/predictions/markets). |
| collateral\_amount\_raw | VARCHAR | Collateral amount in raw token units. |
| token\_amount\_raw | VARCHAR | Outcome token amount in raw units. |
| price\_str | VARCHAR | Trade price as text, so precision is not lost. |
| price | FLOAT | Trade price. |
| maker\_amount\_raw | VARCHAR | Maker order amount in raw units. |
| taker\_amount\_raw | VARCHAR | Taker order amount in raw units. |
| fee\_charged\_raw | VARCHAR | Gross fee charged on the trade, in raw collateral units. |
| fee\_rebate\_raw | VARCHAR | Rebate in raw collateral units. 0 when the trade has no rebate. |
| fee\_raw | VARCHAR | Net fee in raw collateral units, after the rebate. |
| fee\_charged\_event\_count | NUMBER(38,0) | Number of fee charges on this transaction. |
| fee\_rebate\_event\_count | NUMBER(38,0) | Number of rebates on this transaction. 0 when the trade has no rebate. |
| collateral\_token\_address | VARCHAR | Collateral token address. |
| collateral\_token\_name | VARCHAR | Collateral token name. |
| collateral\_token\_symbol | VARCHAR | Collateral token symbol. |
| collateral\_token\_decimals | NUMBER(38,0) | Collateral token decimals. |
| collateral\_amount | VARCHAR | Collateral amount in token units. |
| fee\_charged\_amount | VARCHAR | Gross fee charged on the trade, in collateral token units. |
| fee\_rebate\_amount | VARCHAR | Rebate in collateral token units. 0 when the trade has no rebate. |
| fee\_amount | VARCHAR | Net fee in collateral token units, after the rebate. |
| usd\_exchange\_rate | FLOAT | USD price of the collateral token at the time of the trade. |
| usd\_collateral\_amount | FLOAT | USD value of the collateral amount. |
| usd\_fee\_charged\_amount | FLOAT | USD value of the gross fee. |
| usd\_fee\_rebate\_amount | FLOAT | USD value of the rebate. |
| usd\_fee\_amount | FLOAT | USD value of the net fee. |
| transaction\_index | NUMBER(38,0) | Transaction index in the block. |
| transaction\_hash | VARCHAR | Transaction hash. |
| log\_index | NUMBER(38,0) | Log index of the trade in the transaction. |
| block\_timestamp | TIMESTAMP\_NTZ(9) | Block timestamp. |
| block\_number | NUMBER(38,0) | Block number. |
| block\_hash | VARCHAR | Block hash. |
| unique\_id | VARCHAR | Unique row id. |
| \_created\_at | TIMESTAMP\_NTZ(9) | When this row was first written. |
| \_updated\_at | TIMESTAMP\_NTZ(9) | When this row was last updated. |

### Sample Query

```sql theme={null}
select
  project,
  transaction_hash,
  maker,
  taker,
  price,
  usd_collateral_amount,
  block_timestamp
from bsc.predictions.trades
where block_timestamp >= '2026-09-28'
  and block_timestamp < '2026-09-29'
limit 100;
```
