Posts

Showing posts with the label polymarket CLOB API python

Weather Bot — Episode 5: Building a Polymarket Weather Bot in Python — Code Architecture and API Integration

Image
By this point I had a strategy I was reasonably confident in — model maximum, city bias, dynamic exits, confidence filters. But all of that lived in my head and a messy collection of test scripts. Turning it into a bot that could run unattended, scan markets every five minutes, and send me updates on Telegram was a different challenge entirely. This episode walks through what I actually built. Not a tutorial — just the architecture, the key decisions, and the parts that tripped me up. What This Post Covers The full structure of weather_bot.py — a single Python file that handles forecast fetching, market scanning, position tracking, dynamic exits, and Telegram reporting. Plus the APIs that make it all work: Open-Meteo for weather data, Polymarket's Gamma API for market discovery, and the CLOB API for placing orders. One File, Five Jobs I considered splitting the bot into separate modules — one for forecasts, one for trading, one for reporting. But I'm no...