gautierpialat/polymarket-kalshi-arbitrage-bot ? reverse-engineered prompt
Reverse engineered prompt
Build me a TypeScript service that watches a Kalshi market and the matching Polymarket market, compares the prices over and over, and tells me when there’s a good arbitrage chance.
I want it to keep polling on a timer, wait until a configured start time before it starts making decisions, and expose a simple status endpoint so I can see what it’s thinking right now. The main behavior should be, if Kalshi YES is in a certain price range and Polymarket UP is cheaper by at least a set amount, it should signal a buy on Polymarket. If Kalshi is already settled or closed but Polymarket still has liquidity, it should also catch that as a late opportunity.
If trading credentials are set up, go ahead and wire in the ability to place the Polymarket buy order automatically, with a cooldown so it doesn’t repeat the same trade too often. Keep the config in environment variables, make it easy to run locally, and look up current docs online if you need to.
Are you gonna build this?
make sure you review the code using coderabbit