syntax = "proto3"; package kairos.v1; import "kairos/v1/common.proto"; option go_package = "github.com/kairos/proto/kairos/v1"; // TickRange is one band of a market's valid price grid: prices in [start, end) // move in increments of `step` (the last range's end is inclusive). Decimal // strings ("0.01", "0.001") avoid scaling ambiguity and mirror the // order-executor's authoritative tick logic (Kalshi price_ranges[].step; // Polymarket flat tick = a single [0, 1] range). message TickRange { string start = 1; string end = 2; string step = 3; } // TickSizeUpdate broadcasts a market's CURRENT valid tick grid to consumers. // // - Polymarket: emitted on a `tick_size_change` WS event (price reaches the // 0.96/0.04 extremes and the venue flips the flat tick 0.01 -> 0.001). // - Kalshi: SYNTHESIZED by us (Kalshi pushes no tick-change event) from the // market's `price_ranges`, so consumers still get the tapered grid. // - predict.fun: none — no tick-change event and no per-market dynamic tick // (documented in public docs). message TickSizeUpdate { Provider provider = 1; string contract_id = 2; // Token/asset the grid applies to (Polymarket asset_id). Empty = market-wide // (Kalshi, whose grid is per-market, not per-token). string asset_id = 3; // Event time, microseconds since Unix epoch. int64 timestamp_us = 4; // The market's current valid tick grid: one range for a flat tick // (Polymarket), multiple for a tapered grid (Kalshi). repeated TickRange ranges = 5; // Convenience: the FINEST step across all ranges (Polymarket's new tick). string min_tick = 6; // Polymarket `old_tick_size` for change events; empty for synthetic/initial. string previous_min_tick = 7; // True when WE synthesized this (Kalshi) rather than a venue-pushed change. bool synthetic = 8; }