- Python 85.6%
- HTML 9.8%
- Rust 2.9%
- Shell 1%
- TypeScript 0.7%
The owner set 20% of the bankroll as the most one bet may take on the anchored policy; the default stays 5%. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012NTmUzKB8Kq2hARrVLPqWZ |
||
|---|---|---|
| .claude | ||
| alembic | ||
| alembic_hltv | ||
| dashboard | ||
| data | ||
| data_tmp | ||
| deploy | ||
| docs | ||
| logs | ||
| mika-tester | ||
| recon_b | ||
| rust | ||
| scratchpad | ||
| scripts | ||
| src | ||
| tests | ||
| tmp | ||
| tmp_adj | ||
| tmp_arch | ||
| tmp_feas | ||
| tmp_judge | ||
| tmp_mapaff | ||
| tmp_recon_a | ||
| tmp_recon_a2 | ||
| tmp_vetoclock | ||
| tmp_vetoclock2 | ||
| youtube-cs-analysis | ||
| .env.example | ||
| .gitignore | ||
| .python-version | ||
| _amp_test.py | ||
| _amp_test2.py | ||
| _ban_signal.py | ||
| _chk_fairs.py | ||
| _map1_b.py | ||
| _map1_ll.py | ||
| _map1_ll2.py | ||
| _map1_test.py | ||
| _pick_premium.py | ||
| _recon_books.pkl | ||
| _recon_clean.pkl | ||
| _rev_q1.py | ||
| _rev_q3.py | ||
| _rev_q4.py | ||
| AGENTS.md | ||
| alembic.ini | ||
| alembic_hltv.ini | ||
| CLAUDE.md | ||
| probe_veto.py | ||
| probe_veto2.py | ||
| probe_veto3.py | ||
| probe_veto4.py | ||
| probe_veto5.py | ||
| probe_veto6.py | ||
| probe_veto7.py | ||
| probe_veto8.py | ||
| pyproject.toml | ||
| README.md | ||
| scratch_recon_a_db.py | ||
| scratch_recon_a_npz.py | ||
| tmp_order_pred.py | ||
| tmp_order_shape.py | ||
| tmp_pickprem_era.py | ||
| tmp_pickprem_probe.py | ||
| tmp_ppv_out.txt | ||
| tmp_review_bulkbench.py | ||
| tmp_review_cadence.py | ||
| tmp_review_rowcounts.py | ||
| tmp_review_sim.py | ||
| tmp_review_solvecost.py | ||
| tmp_review_solves.py | ||
| tmp_review_stamp.py | ||
| uv.lock | ||
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 tradeshltv-scraper— HLTV match, map, round, and player data; seesrc/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:
BUYorSELL - 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