diff --git a/app/services/kol_divergence.py b/app/services/kol_divergence.py index 58ef040..5ce763a 100644 --- a/app/services/kol_divergence.py +++ b/app/services/kol_divergence.py @@ -14,9 +14,12 @@ Two outcomes: Logic: - post side → action ∈ {buy, bullish} = LONG intent - {sell, bearish} = SHORT intent - {mention} = skip (no clear view) + post side → action ∈ {buy, bullish} = LONG intent + {sell, bearish, reduce} = SHORT intent + {mention} = skip (no clear view) + (reduce = partial profit-take / trimming a long → a + risk-reducing, short-leaning stance. Counting it lets us + catch "publicly trimming BTC but wallet is adding" divergence.) chain side → change_type ∈ {new_position, increased} = LONG action {decreased, closed} = SHORT action @@ -54,8 +57,11 @@ WINDOW_DAYS = 7 MIN_USD_CHANGE = 10_000 # Post actions that map to a directional view (skip 'mention') +# 'reduce' (kol-v2: partial profit-take / trimming a long) is a short-leaning +# stance — include it so a "trimming publicly while accumulating on-chain" +# mismatch is caught instead of silently dropped. _POST_LONG = {"buy", "bullish"} -_POST_SHORT = {"sell", "bearish"} +_POST_SHORT = {"sell", "bearish", "reduce"} # On-chain actions that map to a direction _CHAIN_LONG = {"new_position", "increased"}