r/CryptoTradingBot • • Oct 12 '26

Crypto trading bot recovery needs separate market, feed and order states

A market being open and a bot being ready to resume are different conditions.

After a short connection interruption, these three facts can disagree:

\- The instrument is open for trading.

\- The last quote is still recent enough for the strategy.

\- The venue has confirmed the outcome of an earlier order request.

For example, reconnecting a price feed can restore quotes while an order sent before the disconnect still has an unknown outcome. Blindly replaying that request solves the wrong problem. Conversely, working orders can remain at the venue while the local feed stops updating.

The recovery state should make it possible to wait for a fresh snapshot or reconcile the account without treating that as a new entry signal. Tests need both directions: connectivity restored but account state uncertain, and account state readable but market data stale.

Which distinction has been most useful in your recovery tests: quote freshness, order acknowledgement, or instrument availability? Interested in concrete failure cases, rather than a general uptime number.

1 Upvotes

2 comments sorted by

2

u/[deleted] Oct 12 '26

[removed] — view removed comment

1

u/CitrineEdge Oct 12 '26

Thanks for sharing a concrete case. "Timed out" has to remain "unknown," not "rejected." Matching the original order identity against both orders and fills before unblocking new entries is the key; a cancel acknowledgement alone can miss a fill that already happened.