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

> Historical Kalshi prediction market trades including price, volume, and trade metadata.

The `common.predictions.kalshi_trades` table provides comprehensive trade data from Kalshi prediction markets. Each row represents a single trade with details about the market ticker, contract quantity, pricing, and trade sides.

Use this table to analyze trading patterns, market volumes, price discovery, and participant behavior across Kalshi prediction markets.

### Table Columns

**Data Precision Notes:**

* Prices are stored as floats on a 0-1 scale (e.g., 0.65 = \$0.65)
* Each contract is worth \$1 at settlement

Unique Key: `trade_id`

| Column Name    | Data Type         | Description                                           |
| -------------- | ----------------- | ----------------------------------------------------- |
| project        | VARCHAR           | Project identifier, always 'kalshi'.                  |
| protocol       | VARCHAR           | Protocol identifier, always 'kalshi'.                 |
| trade\_date    | DATE              | Date of the trade (used for partitioning).            |
| created\_time  | TIMESTAMP\_NTZ(9) | Timestamp when the trade was created.                 |
| trade\_id      | VARCHAR           | Unique identifier for the trade.                      |
| ticker         | VARCHAR           | Market ticker identifier for this trade.              |
| num\_contracts | NUMBER            | Number of contracts traded in this trade.             |
| taker\_side    | VARCHAR           | Side taken by the taker (yes or no).                  |
| maker\_side    | VARCHAR           | Side taken by the maker (opposite of taker\_side).    |
| yes\_price     | FLOAT             | Price for "yes" outcome as a float (0-1 scale).       |
| no\_price      | FLOAT             | Price for "no" outcome as a float (0-1 scale).        |
| taker\_price   | FLOAT             | Price paid by the taker based on taker\_side.         |
| \_created\_at  | TIMESTAMP\_NTZ(9) | Timestamp of the entry creation on Allium's database. |
| \_updated\_at  | TIMESTAMP\_NTZ(9) | Timestamp of the entry update on Allium's database.   |

***

### Sample Queries

<Tabs>
  <Tab title="Recent Trades">
    Query recent Kalshi trades with market details:

    ```sql theme={null}
    select
      trade_id,
      ticker,
      num_contracts,
      taker_side,
      yes_price,
      no_price,
      taker_price,
      trade_date
    from common.predictions.kalshi_trades
    where trade_date >= current_timestamp - interval '7 days'
    order by trade_date desc
    limit 100
    ```
  </Tab>

  <Tab title="Daily Volume">
    Calculate daily trading volume for the past month:

    ```sql theme={null}
    select
      trade_date as day,
      count(*) as total_trades,
      sum(num_contracts) as total_notional_volume,
      sum(num_contracts * taker_price) as total_trade_volume
    from common.predictions.kalshi_trades
    where trade_date >= current_timestamp - interval '30 days'
    group by day
    order by day desc
    ```
  </Tab>
</Tabs>

### Understanding Trade Sides

* **taker\_side**: The outcome the taker is buying (yes or no)
* **maker\_side**: The opposite outcome (if taker buys yes, maker sells yes / buys no)
* **yes\_price** + **no\_price** = 1.0 (they should sum to 1)
* **taker\_price**: The price paid by the taker, equal to either yes\_price or no\_price depending on taker\_side
* **notional volume**: The full USD volume moved due to the trade. Sum of the face value of contracts at redemption
