Handling Partial Fills on Kalshi: The Danger of Unhedged Exposure
TL;DR / Key Takeaways
- Partial fills are a real execution risk in thin Kalshi markets.
- The bot should accept a smaller profitable position rather than chase size by crossing the spread.
- Cancel-and-reprice logic protects expected value when liquidity disappears.
- Exposure tracking must account for what actually filled, not what the bot intended to buy.
The Reality of Thin Liquidity
When testing trading algorithms in a sandbox environment, orders fill perfectly. In the live market, liquidity is fractured. If your algorithm calculates an edge and submits a buy order for 500 weather contracts, but the current ask side only holds 200 contracts at your limit price, you will receive a partial fill.
Many amateur bots crash or freeze when the exchange returns a partial fill response. The bot assumes the position is fully sized, but the actual account holds less than half the expected exposure.
The Loop and the Cancel
To build a resilient trading engine, your execution logic must handle the remaining balance dynamically.
The Predict & Profit framework uses a strict evaluation loop. When an order is placed, the script pauses and queries the exchange for the exact fill amount. If the order is partially filled, the system evaluates the order book a second time. If the price has moved unfavorably, the bot instantly cancels the remaining resting order. It does not chase the price.
An algorithm must accept a smaller, profitable position rather than aggressively crossing the spread to fill an arbitrary size requirement.
Managing the Risk
If your bot relies on executing complex multi-leg strategies, a partial fill on one leg leaves you exposed to massive directional risk. You must build asynchronous fill-or-kill logic or implement strict time-in-force parameters. Never leave an open limit order resting on a volatile weather contract without a kill switch monitoring the clock.
Frequently Asked Questions
Q: Why are partial fills dangerous for a Kalshi bot?
A: Partial fills leave the bot with less exposure than intended while still tying up capital and risk. If the bot assumes the full order filled, downstream position sizing becomes wrong.
Q: Why not cross the spread to complete the order?
A: Crossing the spread can turn a positive expected-value trade into a negative one. The safer behavior is to accept the partial fill or cancel the remainder when the price moves away.
Q: What state should be logged after a partial fill?
A: The bot should log intended size, filled size, remaining quantity, average fill price, cancellation status, and updated exposure. Risk controls must use actual filled quantity.