Why Stale Market Data Matters in Crypto Trading
Automated trading and market making in cryptocurrency markets depend on the accuracy and timeliness of market data. Stale or crossed market data can lead to poor trading decisions, increased risk, and unexpected losses. For trading teams, token projects, and exchanges, understanding how to detect and respond to stale market data is essential for maintaining reliable, fair, and effective trading operations.
This article explores what stale market data is, why it occurs, how it impacts trading, and practical steps for monitoring and responding to data quality issues using exchange APIs.
What Is Stale Market Data?
Stale market data refers to information (such as ticker prices, order book depth, or trade history) that is outdated relative to the current state of the market. In fast-moving crypto markets, even a few seconds of delay can make a significant difference.
Common causes of stale data include:
- Network latency between the exchange and the trading system
- Delays or interruptions in WebSocket or REST API feeds
- Exchange infrastructure issues
- Local system lag or resource constraints
Crossed market data occurs when the best bid price is equal to or higher than the best ask price, which is an abnormal condition indicating data inconsistency.
Why Is Fresh Market Data Critical for Automated Trading?
Automated trading bots, including market making bots, rely on up-to-date market data to:
- Calculate fair prices for placing limit orders
- Adjust spreads and order sizes dynamically
- Monitor open orders and recent fills
- Manage risk and avoid adverse selection
If a bot acts on stale or crossed data, it may place orders at uncompetitive or even loss-making prices, miss trading opportunities, or fail to cancel outdated orders. This can result in increased trading costs, exposure to market moves, and reputational risk for token projects or exchanges.
How Atlas LP Handles Stale and Crossed Data
Atlas LP is multi-tenant software that runs a spot liquidity (market making) bot on the user's own centralized exchange account using their API key. To ensure reliable operation, Atlas LP performs several data quality checks on every tick:
- Reads the latest ticker and order book using WebSocket streams or REST APIs
- Skips the tick if data is stale or crossed, preventing the bot from acting on unreliable information
- Validates API connections and market data freshness before placing or canceling orders
- Records bot events and errors in the console for user review
This approach helps protect users from the risks associated with acting on outdated or inconsistent market data.
Detecting Stale Market Data
1. Timestamp Verification
Most exchange APIs include timestamps with market data. Compare the data timestamp to the current system time. If the difference exceeds a safe threshold (e.g., 1-2 seconds for active markets), treat the data as stale.
2. Sequence Number Checks
Some exchanges provide sequence numbers for order book updates. Skipped or out-of-order sequences may indicate missing or delayed data.
3. Crossed Order Book Detection
Check that the best bid is always lower than the best ask. If not, the order book may be crossed due to a data error.
4. Data Source Redundancy
Combine WebSocket streams with periodic REST API polling to detect and recover from missed updates or dropped connections.
Responding to Stale or Crossed Data
When stale or crossed data is detected, best practices include:
- Skip trading actions for the affected tick: Do not place or cancel orders based on unreliable data.
- Log the event: Record the occurrence for later analysis and troubleshooting.
- Alert the operator: Use notifications (such as Telegram alerts) if the issue persists, so the user can investigate.
- Attempt to refresh the data: Reconnect to the data feed or request a fresh snapshot from the exchange.
- Stop the bot if the issue is persistent: If the bot cannot obtain fresh data for a prolonged period, halt trading to prevent unintended actions.
Atlas LP implements these safeguards by skipping ticks with stale or crossed data and providing users with visibility into bot status and recent events.
Practical Tips for Teams Using Exchange APIs
- Monitor data latency: Track the age of incoming data and set thresholds for acceptable freshness.
- Automate alerts: Configure notifications if data is stale for a set duration or if no trades occur for a specified period.
- Review exchange status: Stay informed about exchange API health and latency, especially during periods of high market volatility.
- Test with multiple exchanges: If possible, compare data feeds from different exchanges to identify anomalies or delays.
- Document your data handling logic: Ensure your team understands how your trading system responds to data quality issues.
Atlas LP’s Approach to Reliable Market Making
Atlas LP’s bot is designed to operate only on fresh, consistent market data. By validating data on every tick and skipping actions when data is stale or crossed, Atlas LP helps users maintain fair and transparent market making activity. This approach aligns with genuine market making principles, where resting limit orders are available for any participant to trade against. Wash trading, self-trading, and volume manipulation are strictly prohibited.
For more details on how Atlas LP works, see /liquidity-bot or review our list of supported exchanges.
Atlas LP does not guarantee returns, prices, trading volume, or listings.
Crypto trading involves risk. Atlas LP is software for placing and managing limit orders; it does not guarantee returns, prices, volume or listings. Follow the rules of each exchange and applicable law.