Distinguish NO POLY / NO KALSHI from generic NO DATA

calc.evaluate now reports NO POLY when the Kalshi side has data but the
Polymarket slug doesn't resolve (the common case: Polymarket renamed/
dropped a market while Kalshi still trades it). NO KALSHI is the reverse,
NO DATA only when both are missing. User caught this looking at BTC <70k
May: 20 of 118 pairs were silently NO-DATA when the real cause was Poly-
side absence — now visible as a dedicated NO POLY chip + filter button.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Casey Judice
2026-05-29 17:06:42 -04:00
parent 75352215ba
commit 757d0cb55d
8 changed files with 131 additions and 56 deletions
+12 -1
View File
@@ -114,9 +114,20 @@ def evaluate(pair, kq, pq, settings, today=None):
if not pair.get("poly_slug"):
row["status"] = "NO PAIR"
return row
if not kq or not pq or not ks or not ps:
# Surface which side is missing — bare "NO DATA" hid the real cause
# (commonly: Kalshi side liquid but the Polymarket slug doesn't resolve).
if not ks or not ps:
row["status"] = "NO DATA"
return row
if not kq and not pq:
row["status"] = "NO DATA"
return row
if not pq:
row["status"] = "NO POLY"
return row
if not kq:
row["status"] = "NO KALSHI"
return row
kfee_rate = settings["kalshi_fee_rate"]
pfee_rate = settings["poly_fee_rate"]
+1 -1
View File
@@ -87,7 +87,7 @@ def run_scan(force=False):
summary = {"total": len(rows), "fetch_ms": fetch_ms}
for st in ("ARB", "NO ARB", "BAD BASIS", "LOW SIZE",
"NO DATA", "NO PAIR"):
"NO DATA", "NO POLY", "NO KALSHI", "NO PAIR"):
summary[st] = sum(1 for r in rows if r["status"] == st)
payload = {