Commit Graph

2 Commits

Author SHA1 Message Date
Casey Judice ba533980e4 Positions History: include sold-out / round-tripped markets
Kalshi /portfolio/settlements only lists matured-and-held markets. Anything
the user bought and sold before expiry was invisible. Added a follow-up
query on /portfolio/positions?count_filter=total_traded filtered to
position_fp=0 — captures every round-trip. realized comes straight from
Kalshi's realized_pnl_dollars (exact).

Polymarket history was skipping any conditionId where the CLOB still
reports closed=false. But if the user sold all their shares before the
market resolves, that's still a history row with realized = sell - buy.
Result tag is 'SOLD' to distinguish from resolved-and-won/-lost rows.

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

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 20:44:52 -04:00
Casey Judice 05c0441053 Initial commit: prediction-market arb scanner + GHA alerts
- Monthly + hourly Kalshi/Polymarket arb scanner (stdlib-only Python).
- Live positions tab w/ realized P&L history.
- GitHub Actions cron workflow texts SMS via Apps Script webhook on
  newly-detected arbs. State persisted in alerts_state.json.

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

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-20 19:48:50 -04:00