← back to Zero Code Trading Bot
references/venues.md
46 lines
# Venues + how this composes with the existing stack
This skill deliberately does **not** reinvent market data or a Kalshi dashboard —
it sits between the read layer and the execution layer you already have.
## Polymarket (primary, keyless, $0)
- **Data:** public Gamma API `https://gamma-api.polymarket.com/markets`
(`closed=false&active=true&order=volume`). No key, free. `venue_adapter.py`
normalizes each market to `price / volume_usd / liquidity_usd / spread /
days_to_resolve`.
- **Same truth as `polymtrx`.** The `/polymtrx` skill scans this exact source for
"where's the edge". Use `/polymtrx scan <topic>` to *discover* a strategy, then
encode it here as `strategy.json`. polymtrx = research; this = the bot that acts
on it (paper first).
- **Live execution** would use the CLOB order API (`py-clob-client`) + a funded
wallet — gated, unwired in the template.
## Kalshi (DEMO until credentialed)
- `KalshiDemoAdapter` intentionally raises until real creds exist — mirroring the
**Ken / Kalshi dashboard** (`~/Projects/Ken/kalshi-dash`, pm2 `ken` :7810), which
is still DEMO pending Steve's prod Kalshi credentials.
- **Reuse Ken, don't duplicate it.** If a strategy should run on Kalshi, prefer
extending Ken's paper-portfolio + `safe_mode`-honoring autoTrader over wiring a
second execution path. Author/validate the strategy here, hand execution to Ken.
- Live Kalshi needs `KALSHI_API_KEY` + `KALSHI_PRIVATE_KEY` (RSA-signed requests)
and — as always — Steve's go-live approval.
## Division of labor
| layer | owner | this skill's role |
|-------|-------|-------------------|
| discovery / signals | `polymtrx`, `/polymtrx` | consume it to shape rules |
| strategy authoring | **this skill** | plain English → validated `strategy.json` |
| paper execution + P&L | **this skill** (template) | scaffold + run paper, show P&L |
| Kalshi execution | Ken (`:7810`) | hand off; don't re-build |
| live orders / money | Steve (gated) | draft memo, never auto-fire |
## Adding a venue
Implement an adapter class in `venue_adapter.py` with `fetch_universe(query, limit)`
→ list of normalized market dicts and `mark_price(id)` → float, register it in
`_ADAPTERS`, and keep it **read-only**. Order routing stays in `executor.py` behind
the safety gates.