Automated Betfair API Racing Bots: Low Liquidity Thread Limits
Every automated racing bot dies the same quiet death on Betfair: it fires a burst of orders into a thin market, the thread pool saturates, and the next tick arrives before your socket handler has even parsed the previous one. The killer is not your strategy logic. It is the low liquidity thread limit you never instrumented. π€
Here is the brutal truth most bot operators refuse to accept. Betfair's API will happily accept your order requests while silently throttling your connection pool when the market depth collapses. In a low liquidity race β think a class 6 handicap at a minor track with four grand matched across the entire book β the weight of carrion is no longer about finding value. It is about surviving the thread ceiling. Your Automated Betfair API Racing Bots are only as good as their backpressure design, and most of them have none.

The Liquidity-to-Thread Ratio Nobody Computes
Run the numbers yourself. A single market update cycle on a low liquidity runner can return a depth ladder where the best back price holds maybe Β£40 and the lay side is even thinner. Your bot sees a signal, dispatches a bet request, then waits. The response latency under load is not linear β it is exponential once the thread pool queue exceeds roughly two and a half times your core count. I have watched bots with sixteen worker threads stall for over 900 milliseconds on a market with under Β£200 total matched. That is a full tick cycle lost. β‘
The low liquidity thread limits are the real governor here. When matched volume drops below a threshold, the exchange's matching engine processes your order against fragmented opposing interest. Each fragment triggers additional internal state churn. Your API call does not fail β it just hangs in the queue while the price moves. A bot that cannot measure the ratio of available liquidity to its own outstanding thread count is flying blind into a wall.

Hard Thread Caps and Queue Discipline
You need a hard thread cap that scales inversely with market thinness. Concretely: if total matched on the market is under Β£500, cap your concurrent bet submission threads at three. Between Β£500 and Β£2,000, allow six. Above that, you can open the valve. This is not a suggestion β it is survival math. The queue must be bounded, and when it fills, your bot must drop the oldest pending order request rather than block the socket reader. βοΈ
Second rule: decouple the price feed handler from the execution handler entirely. On a low liquidity market, the feed can deliver six or seven updates inside one second while your execution layer is still wrestling with a single hang. If they share a thread pool, the feed starves and your bot operates on stale prices β which is worse than not trading at all. Isolate them, size the execution pool conservatively, and let the feed breathe.
Instrument the Backpressure Before You Deploy
Log the queue depth on every cycle. Log the time from signal generation to bet acknowledgement. If the acknowledgement latency on low liquidity markets exceeds 250 milliseconds for more than five percent of your requests, your thread limit is wrong β full stop. I have seen operators push a bot live on a Saturday with default pool sizes and watch it bleed because the queue silently grew to forty pending requests on a market where the entire book held less than Β£300. π
The Automated Betfair API Racing Bots that actually survive low liquidity conditions are the ones that treat thread count as a function of market depth, not a static config value. They cap hard, they drop requests, and they never let the price feed and the execution engine share a queue.
Build the queue monitor first. If your pending request depth crosses your pre-computed liquidity-adjusted ceiling, throttle the signal generator immediately and flush stale orders. The exchange will not warn you. The matching engine will simply fragment your fill across four partial matches at prices you never intended, and your P&L will reflect a spread you failed to model against a thread pool you failed to bound.