Codex session ID: 01a19925-560a-7c01-b33c-9eefcc048efb
Inspiration
I'm a CFO, and Twitch chat already behaves like a market: emotes spike, crash, and trend in seconds. I wanted to let viewers "trade" that hype live, with play money only, and give streamers a fun overlay to react to.
What it does
- Connects to any Twitch channel's chat anonymously over Twitch IRC (no token or account needed).
- Treats tracked emotes (KEKW, PogChamp, LUL, Kappa, monkaS, catJAM, GG, configurable) as tickers whose price follows mention frequency in a rolling 30-second window against a moving baseline.
- Viewers start with 1,000 chat coins (virtual, no real money) and trade with
!buy TICKER N,!sell TICKER N,!portfolio,!top. - An OBS browser-source overlay shows a ticker tape, price charts, top-traders leaderboard, latest fills and command results, updated live over WebSocket.
- A streamer dashboard sets the channel and tickers, halts or resets the market, and verifies the trade ledger.
- Every trade is appended to a SHA-256 hash-linked ledger, so tampering is detectable.
- A simulator generates realistic chat for offline demos.
How we built it
Python, FastAPI and WebSockets, with plain HTML/JS/SVG for the overlay. The whole application (IRC client, market engine, simulator, overlay, dashboard and 31 pytest tests) was generated by the OpenAI Codex CLI (codex exec) in a single session from one written spec (PROMPT.md in the repo); Codex also ran the tests and fixed failures until green. Screenshots, a small --tickers CLI flag, the demo video and the submission text were added afterwards outside Codex.
Challenges we ran into
Making prices responsive to chat spikes without being trivially pumpable, and keeping portfolio accounting exact while prices move every tick. Live chat in big channels often doesn't use the default emotes, so tickers are configurable per channel.
Accomplishments that we're proud of
It runs on a real, live Twitch channel (captured on Lirik's chat, where real emote spam moved prices) with zero credentials, the ledger is verifiable, and Codex produced a fully tested app from a single spec.
What we learned
A precise spec gets the most out of Codex; Twitch's anonymous IRC access makes chat-reactive overlays very easy to prototype.
What's next for Emote Exchange
Authenticated bot replies in chat, Channel Points integration via EventSub, per-channel emote auto-discovery, and persistent seasons with end-of-stream "market close" recaps.
Built With
- css
- fastapi
- html
- javascript
- obs
- openai-codex
- pytest
- python
- svg
- twitch-irc
- websockets
