This is a runnable skeleton that:
- Pulls markets from Gamma (HTTP)
- Gamma events = Polymarket 的“市场元数据 API”里的「事件(Event)」对象
- 市场就是sports / politics 之类的事件下的「市场(Market)」对象
- Pulls YES/NO order books via py-clob-client (batch /books)
- Applies risk filters
- 主做策略是 Tail-end(85–97¢,<48h,高确定性,等结算)
- Generates Tail-end (YES/NO) intents (no execution by default:
dry_run: true) - Stores snapshots + intents in SQLite
- Create venv + install deps:
pip install -r requirements.txt- Copy env template and fill:
cp .env.example .env
# fill PM_PRIVATE_KEY, (optional) PM_FUNDER, PM_SIGNATURE_TYPE- Initialize DB:
python -m bot.init_db- Run (dry_run default):
python -m bot.main- This repo is intentionally conservative and "dry-run" first.
- To enable trading, set
execution.dry_run: falseinconfig/config.yamlafter you validate outputs. - You can inspect SQLite at
db_data/bot.sqlite3.