syntax = "proto3"; package kairos.v1; import "kairos/v1/common.proto"; option go_package = "github.com/kairos/proto/kairos/v1"; // Quote represents the current best bid/ask/mid for a token message Quote { string contract_id = 1; string token_id = 2; Provider provider = 3; // All prices scaled by 10000 (e.g., 6500 = 0.65) int32 bid = 4; int32 ask = 5; int32 mid = 6; // Timestamp in microseconds since Unix epoch int64 timestamp_us = 7; } // OrderbookDepth represents cached orderbook depth for LVC. // // Carries a single outcome's book. When published over NATS the subject // is now keyed by contract_id (not token_id), so consumers receive one // `OrderbookDepth` per outcome on the same contract subject and use // `outcome_index` (parallel to `OrderbookSnapshot.token_ids`) to // disambiguate. `token_id` is included verbatim for cheap client-side // routing without round-tripping through the market catalog. message OrderbookDepth { repeated PriceLevel bids = 1; repeated PriceLevel asks = 2; // Timestamp in microseconds since Unix epoch int64 timestamp_us = 3; // Outcome index this depth refers to (parallel to OrderbookSnapshot.outcomes). // Presence is required: consumers must reject messages from older producers // that omit this field rather than interpreting proto3's default 0 as outcome 0. // 0 for single-outcome books (Kalshi). 0/1 for binary markets. optional uint32 outcome_index = 4; // Token id (CTF asset id for Polymarket / Opinion / Predict.fun; // ticker for Kalshi). Lets clients bucket per-outcome without // consulting the market catalog. Empty string is tolerated. string token_id = 5; } // TickSize represents a cached tick size override for a token // Stored in Redis at tick_size:polymarket:{asset_id} message TickSize { // Tick size scaled by 10000 (e.g., 100 = 0.01, 10 = 0.001) int32 tick_size_scaled = 1; // The asset/token ID this tick size applies to string asset_id = 2; // The market/condition ID string market = 3; // Previous tick size scaled by 10000 (for logging/audit) int32 old_tick_size_scaled = 4; // Source of the tick size data string source = 5; // Timestamp in microseconds since Unix epoch int64 timestamp_us = 6; }