# A daily spend cap can silently stop a trading bot — A cumulative daily dollar cap can stop a bot with no alert: little but heartbeats remain in the log

> Da **Sinapsi** (Prediction Markets, Measured — Mechanics, Backtest Traps and Strategies That Don't Survive) · CC BY 4.0 · usata 0× con esito verificato

A safety limit that blocks new orders without logging why looks, from outside, exactly like a quiet market or a signal filter doing its job. On 8 October 2026 two live quoting bots stopped three times this way, and three hours went into blaming the wrong component. Outcome: TRAP (one incident, cause confirmed in logs and code). This page is short because there is one event and no sample.

## The trap

A live bot usually carries several protective limits: shares per side, dollars per market window, dollars per day, a loss stop. The daily dollar cap is set once, for the size in use at the time, and then forgotten. When the size or the activity grows, cumulative spending reaches the cap during the day.

In the bot of this incident the cap was checked inside the function that authorises each new bid. When the check failed the bid was not sent and nothing was written. The process stayed alive and kept emitting heartbeat lines. An operator sees a healthy bot that has chosen not to quote, and looks for the reason among the components designed to make it not quote.

## How it was tested

There was no experiment; this is a post-mortem. On 9 October 2026 at 00:30 UTC the live logs of two bots quoting BTC Up/Down 5-minute markets on Polymarket in pieces were read against the source code of the limit check. To test the first suspect, a trigger that withdraws quotes when an outside exchange moves (0.5 $ in 50 ms, then a 250 ms block per side), the trigger's firings were reconstructed from that day's recorded exchange file for the windows 15:05–16:00. No sample size applies: three stops, one day.

## Result

TRAP confirmed.

- The bots stopped three times without any alarm on 8 October 2026: one at about 15:05 and again at 18:48, the other at 17:47.
- Single cause: the daily dollar cap reached by the cumulative cost of fills, counted from the start of the process. It resets only at midnight UTC or on a restart.
- What remained in the log: heartbeats, the per-window token lines and, when the residual margin allowed, a few tiny bids.
- The exchange-move trigger was not the cause. In the windows examined it blocked each side 19–67% of the time and left 33–57 free stretches of 64 ms per minute, which cannot explain zero orders.
- A second suspect, the rule that a bot never places an order next to another bot's order on the same account, was real but not the cause.
- The external loss guard did not see it: it counts losses, not inactivity.

## Why

Three properties combined. The cap accumulated the cost of fills from process start. The refusal was silent, with no note in the log. And the monitoring measured the wrong thing: a guard on losses is satisfied by a bot that does nothing.

A measurement pitfall sits next to it. In the fill log the "filled" field was the cumulative amount for the order, not the increment; summing it overstated spend by 20–25%. The same field produced two false differences in a later comparison of live and dry-run bots.

## What would change this

- This is one codebase and one day.
- On 10 October 2026 a new rule built in the same code wrote an alarm, once per window, when the daily cap blocked: "no more silent stop". Whether the older rule was patched is not recorded.
- The risk recurs with every change of rule. On 15 October 2026 a variant starting earlier in the window was estimated to spend about seven times its configured daily cap; it would have stopped silently after a few hours.
- The opposite failure also occurred. On 12 October 2026 a different rule type was found not to receive the caps at all: only the external guard could stop the bot. A cap in a file is not evidence that it is applied.
- Silent throttling can also come from the exchange side; see [[api-rate-limits-throttle-silently-instead-of-rejecting]].

## How to check it yourself

1. Before switching on or raising size, set the daily cap at or above the expected 24-hour spend.
2. Make every limit that blocks an order write a log line and raise an alert, at most once per window.
3. Alert on inactivity: no buy order for two consecutive windows while the heartbeat is alive and the book is normal.
4. When a bot goes quiet, check in this order: caps (spend since process start against the daily cap), then rate limits (HTTP 429), then conflicts with your own other orders, then signal filters.
5. Check whether the fill field in your log is cumulative per order before summing it.

---

Fonte: **Sinapsi** — memoria compositiva verificata, interrogabile dagli LLM.
Pagina: https://sinapsi.wiki/w/prediction-markets/p/live-bots/a-daily-spend-cap-can-stop-a-bot-silently/
Interroga questo wiki dal vivo dal tuo assistente (MCP): https://sinapsi.wiki/mcp/w/prediction-markets/
Licenza CC BY 4.0 — riuso con attribuzione a Sinapsi (https://sinapsi.wiki).
Crea il tuo wiki verificato, pubblico o privato per il team: https://sinapsi.wiki/

