No description
  • Python 65.8%
  • HTML 23.8%
  • Rust 7.2%
  • TypeScript 2.8%
  • Shell 0.4%
Find a file
2026-08-05 09:38:12 +02:00
.claude feat: ledger-reminder hook — mechanical backstop for the write-down protocol 2026-07-03 14:25:39 +02:00
alembic refactor: switch from The Graph to Polymarket Data API 2026-04-27 17:38:11 +02:00
alembic_hltv feat: flash_assists from cache (1.85M rows) + utility verdict + refresh resilience + weekly CLOB timer 2026-07-03 17:04:28 +02:00
dashboard feat(model): RestEdge (player rust, z=-4.6) — fifth trait of the night; program total -0.00189 holdout LL (0.62435->0.62246) 2026-08-05 00:28:04 +02:00
data feat(model): RestEdge (player rust, z=-4.6) — fifth trait of the night; program total -0.00189 holdout LL (0.62435->0.62246) 2026-08-05 00:28:04 +02:00
deploy feat: real-time news pipeline — engine newsmode + HLTV RSS + schedule drift -> news_flags.json; emit_fairs skips flagged matches (10-min timer) 2026-08-02 23:40:27 +02:00
docs research: SoS mechanism revised — silo hypothesis falsified (flat slope vs cross-link density, 43% cross-bucket maps); leading suspect = uniform beta over-trusting noisy-pool margins; core fix registered as 2e 2026-08-05 09:38:12 +02:00
mika-tester research: mika-tester — isolated fundamental-model suite (Elo/Glicko/Kalman/TrueSkill/classifier) 2026-06-11 01:08:39 +02:00
rust/pm-exec fix: GTD expiration from wall clock at POST time, not tick timestamp — kills the stale-tick 'must be in the future' class (48 rejects 08-02 evening) 2026-08-02 23:58:06 +02:00
scripts feat(lol): phase-0 ingest — lol.db with 100k games / 1M player rows (2014-2026) + gptilt series/draft/tournament tables; phase 1 (skill core vs Elo) unblocked 2026-08-05 08:38:58 +02:00
src feat(model): RestEdge (player rust, z=-4.6) — fifth trait of the night; program total -0.00189 holdout LL (0.62435->0.62246) 2026-08-05 00:28:04 +02:00
tests feat(model): RestEdge (player rust, z=-4.6) — fifth trait of the night; program total -0.00189 holdout LL (0.62435->0.62246) 2026-08-05 00:28:04 +02:00
youtube-cs-analysis refactor: reports -> docs/reports{,/archive}, hypotheses -> docs/hypotheses; banners 2026-07-03 14:18:19 +02:00
.env.example chore: drop SCRAPER_CONTACT_EMAIL and contact suffix on UA 2026-04-29 08:55:13 +02:00
.gitignore chore: team_logos.json is a runtime cache — untrack (data/ is runtime-only) 2026-08-02 14:56:27 +02:00
.python-version chore: scaffold project with uv, dependencies, and gitignore 2026-04-27 17:00:22 +02:00
AGENTS.md docs: canon (STATUS/LEDGER/RUNBOOK/EXPERIMENTS/DATA) + CLAUDE.md agent protocol 2026-07-03 14:23:06 +02:00
alembic.ini chore: add alembic config and initial migration 2026-04-27 17:00:30 +02:00
alembic_hltv.ini feat: integrate hltv_scraper as second module under src/ 2026-04-29 08:44:25 +02:00
CLAUDE.md feat(model): SoSEdge shipped — tier-silo/strength-of-schedule trait from the Liquid-9INE post-mortem (coef +0.0293, z=5.7, holdout dLL +0.00025); big-loss autopsy protocol added to CLAUDE.md; explain layer Motståndsklass 2026-08-04 19:50:58 +02:00
pyproject.toml feat: gasless claims via official relayer ($17.04 redeemed live, zero POL) + paper-court fleet per bankroll decade with depth-aware fills 2026-08-01 13:32:02 +02:00
README.md docs: canon (STATUS/LEDGER/RUNBOOK/EXPERIMENTS/DATA) + CLAUDE.md agent protocol 2026-07-03 14:23:06 +02:00
uv.lock feat: gasless claims via official relayer ($17.04 redeemed live, zero POL) + paper-court fleet per bankroll decade with depth-aware fills 2026-08-01 13:32:02 +02:00

cs-data

Start here: current state & results → docs/STATUS.md · findings history → docs/LEDGER.md · operations → docs/RUNBOOK.md · agent protocol → CLAUDE.md · script index → scripts/README.md

Two ingest pipelines into one shared SQLite at data/polymarket.db:

  • polymarket-cs (this README) — Polymarket CS market trades
  • hltv-scraper — HLTV match, map, round, and player data; see src/hltv_scraper/README.md

The hltv pipeline writes only to hltv_* tables and uses a dedicated hltv_alembic_version row, so the two pipelines coexist without fighting each other's migrations.


polymarket-cs

Ingest Polymarket Counter-Strike market trades into a local SQL database.

Setup

uv sync
cp .env.example .env

No API keys required — uses Polymarket's public Gamma and Data APIs.

Usage

1. Discover CS markets

uv run polymarket-cs discover

Fetches esports events from the Gamma API, classifies CS markets by tags and keywords, and upserts them into the database.

Add --report to write a summary to data/discovery_report.md.

2. Backfill trades

uv run polymarket-cs backfill

For every known market, paginates the Polymarket Data API to fetch all trades. Idempotent via ON CONFLICT DO NOTHING on tx_hash. After backfill, flags markets with zero trades for investigation.

3. Incremental sync

uv run polymarket-cs sync

Re-fetches trades for all markets, skipping already-ingested ones.

Data model

Table Primary key Description
markets condition_id CS market metadata (question, slug, exchange type)
outcomes token_id Outcome tokens per market (Yes/No or multi-outcome)
trades id (unique on tx_hash) Individual trades with price, size, side, trader address
needs_investigation condition_id Markets flagged by self-healing (zero trades despite existing)

Key fields on trades

  • price: probability (0-1) at which the trade executed
  • size: number of outcome tokens traded
  • side: BUY or SELL
  • trader: proxy wallet address
  • outcome: outcome label (e.g. "Yes", "NaVi", "FaZe")

Development

uv run ruff check .
uv run mypy --strict src/polymarket_cs/
uv run pytest

Migrations

uv run alembic revision --autogenerate -m "description"   # polymarket
uv run alembic upgrade head

uv run alembic -c alembic_hltv.ini revision --autogenerate -m "description"
uv run alembic -c alembic_hltv.ini upgrade head            # hltv