How to connect your bot to an exchange
All guides
Polymarket API Guide: Connect a Trading Bot in 5 StepsPolymarket API basics for a bot: Gamma for markets, CLOB for orders, auth, order book, placing orders, fills and redeeming winnings, in Python.
Predict.fun API Guide: Connect a Trading Bot in 5 StepsPredict.fun API for a bot: auth, listing 5-minute markets, the ladder, taker orders, fills, and the settlement rule that differs from the rest.The three numbers that decide a bot
The fee peaks at 1.75 cents a share
Taker fee by price on Polymarket and Kalshi. Nothing at the extremes, most at 50 cents. Makers pay nothing.
What the fee costsThe book is wrong for 20 seconds
Buying the favourite loses at every second of a 5-minute window except the last 30, and needs a sub-second order path to trade.
The favourite in the last 15 secondsRegion cut the order path by 3.7x
The same bot on three setups. Only the dedicated instance in the exchange's region kept the edge.
Where to put the serverTools
Where the exchanges are
Matching-engine locations as reported or inferred, not CDN edges. Drag to rotate, scroll to zoom, hover a place for the hosting suggestion.
Can you trade from where you are?
Each exchange blocks a different set of countries. This checks the country your connection reports and lists which exchanges will refuse an account from there. Nothing is stored.

How far are you from each exchange?
Times a few small requests from this browser to each exchange's public API. It measures your path to the API edge, so it tells you how a bot on your own machine would fare, not a server in the exchange's region.

Articles
All articles
Polymarket Bot Rules: 5 Things to Do and 5 to AvoidTen rules for a Polymarket or Kalshi trading bot from two months of live testing: five that saved money and five that cost it.Most of the losses came from the same handful of mistakes: trusting derived labels, stopping out, chasing a rebate, sizing up on a paper edge. The five rules that held were cheaper than any of them, and each one is written here with the number that proved it.
Polymarket Historical Data and Kalshi Data: Where to Get ItFree Polymarket historical data, Kalshi candlesticks, on-chain fills and your own logger, plus how to backfill official outcomes and get spot prices.
Best VPS for a Polymarket or Kalshi Bot: Region and LatencyWhich region to host a trading bot in, what latency did to a live result, which VPS providers fit, and the burstable tier to avoid.
Polymarket Fees and Kalshi Fees: What a Trade Really CostsPolymarket fees, Kalshi fees and the other two exchanges compared: the formula, the breakeven win rate at every price, and why rebates do not fix it.
Case studyThe favourite in the last 15 secondsA taker edge found by measuring the book near the close. Positive on seven coins, dead without a fast order path.