syntax = "proto3"; package kairos.v1; import "kairos/v1/common.proto"; option go_package = "github.com/kairos/proto/kairos/v1"; // Trade represents a single executed trade message Trade { string trade_id = 1; uint32 outcome_index = 2; string outcome = 3; // Price scaled by 10000 (e.g., 6500 = 0.65) int32 price = 4; // Size scaled for precision int64 size_scaled = 5; TradeSide side = 6; // Taker side as string for provider compatibility string taker_side = 7; // Timestamp in seconds since Unix epoch int64 timestamp_sec = 8; // Outcome 0 price at trade time (scaled by 10000) int32 outcome_0_price = 9; // Outcome 1 price at trade time (scaled by 10000) int32 outcome_1_price = 10; // Token ID for this specific trade string token_id = 11; // All token IDs for the contract repeated string token_ids = 12; // All outcome names for the contract repeated string outcome_names = 13; // On-chain trade ordering key: (block_number, log_index) uint64 block_number = 14; uint32 log_index = 15; string tx_hash = 16; string taker_address = 17; string maker_address = 18; } // TradeBatch represents a batch of trades for efficient publishing message TradeBatch { Provider provider = 1; string contract_id = 2; // Timestamp in microseconds since Unix epoch int64 timestamp_us = 3; repeated Trade trades = 4; uint32 count = 5; // Whether this batch is from historical backfill bool backfilled = 6; }