Kalshi
Two pieces of work on the same exchange. One is an audit: if a contract pays out when a number lands above 60, and another pays out when it lands above 70, the second can never be worth more than the first. That is arithmetic, not opinion, and I wanted to know whether the prices actually obey it. The other is a clipper: buy both teams in a sports game cheap enough that after sitting-buy fees the pair still pays a dollar.
Those are different questions. Most of the work, in both, was in keeping money and arithmetic apart.
Inferring the links
Nothing in the API says two markets are logically related, so that has to be derived. Three rules survived: numeric ladders whose strike boundaries tile a range, nested thresholds where one interval contains another, and parlay legs, which the exchange states exactly.
A fourth rule tried to read conjunctions out of market titles. I hand-checked a sample of five and it got none of them right, so it was disabled and stripped from every result rather than kept with a caveat. five out of five wrong
The rules that stayed were checked the same way. Sixty hand-verified samples across the three, all correct, printed in full so the number is auditable rather than asserted.
The band, not the violations
Across 29,460 relationship sets priced at executable quotes, two failed. Both sit in series where the exchange has set its fee multiplier to zero, and under the normal fee schedule both would be well inside the no-arbitrage band.
So the answer to the first question is that Kalshi is coherent wherever fees apply. Which makes the second question the interesting one, because a band that nothing violates is a band worth measuring.
That gap is the finding I did not expect. The band is held open by the fee schedule and the tick size rather than closed by arbitrageurs, and how wide it sits varies by six times depending on what the market is about.
The money question
Statistical inconsistency and money are not the same thing, so the depth walk answers separately. One position was genuinely takeable. It pays five dollars and fifty cents, needs a hundred and eighty-seven dollars of capital behind it, and requires eighteen legs to fill at once in a market where the exchange happens not to be charging.
Writing that sentence honestly was the point of the project.
What would undo it
The limitations list is the longest section of the write-up, and two entries could reverse the result outright. The scan is a single snapshot, so it measures how often coherence fails at a moment and not per unit of time. And the whole tradeable result rests on reading a fee multiplier of zero as free rather than as not applicable. If that field means the second thing, both violations disappear and the realizable profit in this study is nothing at all.
Depth is also pulled after the quotes, legs would fill sequentially rather than together, and a partial fill on one leg turns a hedged position into a directional bet. None of that is modelled.
The clipper
The audit walks related contracts. The clipper is the version that has to fill: two YES contracts on one sports game, one per team. Exactly one team wins, so the pair pays a dollar. The trade only exists if both resting buys go through cheap enough that sitting-buy fees still leave the sum under a dollar.
Same day or next day. One game at a time. Resting buys, never a lift. If thirty seconds pass and both legs did not go through, cancel what is still sitting. If one fill is leftover, sell it back at cost minus a cent. Never a second game while that is open. Five-minute crypto is skipped on purpose.
Kalshi is sharded. A funded balance on shard 0 and a tennis market on shard 3 comes back as a 404 that looks like a bad key. The first real work was noticing that, then moving a few dollars onto the shard that actually listed the game. user_not_found is not a bad key
What's running
A websocket clipper that can sit post-only buys, and a paper loop that never places an order. Keys live outside the repo.