solana.predictions.trades table contains all prediction market trades executed on Solana. Covers Jupiter and DFlow prediction markets using Kalshi as the underlying protocol. Trades are decoded from on-chain fill instructions, enriched with order data and token prices.
Table Columns
| Column Name | Data Type | Description |
|---|---|---|
| project | VARCHAR | Project identifier (jupiter or dflow). |
| protocol | VARCHAR | Protocol identifier (kalshi). |
| trade_date | DATE | Date of the trade execution (used for partitioning). |
| timestamp | TIMESTAMP_NTZ(9) | Timestamp when the fill instruction was executed on-chain. |
| trade_id | VARCHAR | Unique identifier for the trade (Kalshi order ID from fill params). |
| ticker | VARCHAR | Kalshi market ticker identifier (e.g., KXFEDDECISION-25DEC-C25). |
| num_contracts | INTEGER | Number of contracts filled in this trade. |
| user_address | VARCHAR | Solana wallet address of the user who placed the order. |
| action | VARCHAR | Trade action (buy or sell) - buy increases position, sell decreases position. |
| 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 | Derived YES price at execution (0-1 scale). Calculated from taker_price using complementary pricing (yes_price + no_price = 1.0). |
| no_price | FLOAT | Derived NO price at execution (0-1 scale). Calculated from taker_price using complementary pricing (yes_price + no_price = 1.0). |
| taker_price | FLOAT | Actual execution price paid by the taker for their side. |
| settlement_token_price | FLOAT | Settlement token USD price at trade time (USDC or CASH depending on project). |
| venue_fee_usd | FLOAT | Kalshi venue fee paid in USD. |
| order_created_time | TIMESTAMP_NTZ(9) | Timestamp when the order was created on-chain (from create_order instruction). |
| order_txn_id | VARCHAR | Transaction signature of the create_order instruction. |
| fill_txn_id | VARCHAR | Transaction signature of the fill instruction (fill_buy_order or fill_sell_order). |
| extras | VARIANT | JSON object containing technical fields (position_pda, order_pda, external_order_id). |
| _created_at | TIMESTAMP_NTZ(9) | Timestamp when the record was created in Allium’s database. |
| _updated_at | TIMESTAMP_NTZ(9) | Timestamp when the record was last updated in Allium’s database. |
Sample Queries
- User Trading Activity
Analyze trading activity for a specific user:
Understanding Price Fields
- taker_price: The actual price paid by the taker for their chosen side (yes or no).
- Price scale: All prices are on a 0-1 scale.