clickhouse: commit exit-leg/reconstruction/maras DDLs + UV/violet DDLs (M1 vendor reconcile, upstream-first)

This commit is contained in:
Codex
2026-07-12 19:13:25 +02:00
parent d763f77516
commit dc90f6d77e
46 changed files with 1167 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
-- UV shadow stop-watcher events — C11 overshoot ledger
-- READ-ONLY wrt BLUE sources. INSERT only via StopWatcher.
-- Namespace: dolphin_uv ONLY.
CREATE TABLE IF NOT EXISTS dolphin_uv.stop_watch_events
(
`ts` DateTime64(3, 'UTC'),
`trade_id` String,
`asset` LowCardinality(String),
`side` LowCardinality(String),
`entry_price` Float64,
`breach_price` Float64,
`adverse_pct` Float32,
`spread_bps` Float32,
`depth_1pct_usd` Float64,
`obf_lag_ms` Float32,
`kind` LowCardinality(String),
`escalation_step` UInt16 DEFAULT 0,
`resolved_exit_adverse_pct` Float32 DEFAULT 0,
`resolved_excess_vs_contract` Float32 DEFAULT 0
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(ts)
ORDER BY (ts, trade_id)
SETTINGS index_granularity = 8192;