Inspiration Prediction markets are one of the most honest pricing mechanisms in finance — they aggregate real beliefs about real outcomes. But building automated strategies on Polymarket required writing TypeScript from scratch, understanding the CLOB API, managing risk logic, and wiring everything together. There was no visual layer. We wanted to fix that.
What it does PolyFlow is a no-code visual strategy builder for Polymarket. You drag blocks — triggers, conditions, actions, and risk controls — connect them into a strategy, and the app generates production-ready TypeScript you can run locally with your own keys. No coding required to get started. Just build, test against live market data, and export.
How we built it Designed a BlockParam schema so each block carries typed, configurable parameters (numbers, selects, ranges) Built a live market feed using the Synthesis Trade API with fallback to demo markets Added a Demo / Live network toggle with guard logic to prevent race conditions and 429s Compiled block graphs into executable TypeScript strategy classes extending a base Strategy interface Deployed to Firebase Hosting with SPA rewrites via Vite Position sizing follows:
size=min(S max , K⋅confidence⋅liquidity)
where $K$ is a scaling factor, $S_{max}$ is the max position from the risk block, and confidence is derived from price momentum signals.
Challenges we ran into The biggest was Synthesis API rate limits — hitting 429s when creating wallets on every session. We solved it by fetching existing wallets first and only creating new ones when needed.
Parsing market data was also messy. The CLOB API returns prices in multiple formats depending on the endpoint, so we built a flexible parseMarket normalizer that handles all variants gracefully.
Making the block-to-code compiler output clean, readable TypeScript (not spaghetti) took several iterations on the code generation logic.
Accomplishments that we're proud of A fully working visual builder that generates real, runnable TypeScript Live market data integration with zero auth required for reads Multi-language support (EN / PT-BR) out of the box Clean Firebase deploy with a public live URL on day one What we learned Prediction market microstructure is genuinely fascinating — bid/ask spreads on binary outcomes behave very differently from traditional assets No-code tools are hard to get right: the abstraction has to be powerful enough to be useful but simple enough that non-coders aren't lost Firebase + Vite is a great combo for fast hackathon deploys What's next for PolyFlow Strategy backtesting on historical Polymarket data One-click deploy to run strategies on a server (no local setup) More block types: time-based triggers, portfolio rebalancing, multi-market correlation A strategy marketplace where users can share and fork builds Mobile-friendly builder UI
Built With
- firebase
- lucide-react
- node.js
- polymarket-clob-api
- react
- synthesis-trade-api
- typescript
- vite

Log in or sign up for Devpost to join the conversation.