Atlas LP
  1. Home
  2. Blog
  3. How to Monitor and Respond to Stale Market Data in Crypto Trading

Exchange API

How to Monitor and Respond to Stale Market Data in Crypto Trading

Learn how to detect, monitor, and handle stale or crossed market data to ensure reliable automated crypto trading and market making.

Published

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.

← Back to blog

Frequently asked questions

What is stale market data in crypto trading?

Stale market data is outdated information about prices or order books that no longer reflects the current state of the market. Trading on stale data can lead to poor execution and increased risk.

How does Atlas LP handle stale or crossed data?

Atlas LP checks the freshness and consistency of market data on every tick. If data is stale or crossed, the bot skips trading actions for that tick to avoid acting on unreliable information.

What should I do if my trading bot encounters stale data frequently?

Investigate the cause—such as network issues, exchange API problems, or system lag. Consider switching to more reliable data feeds, increasing monitoring, and setting up alerts for persistent issues.

Why is it important to avoid acting on crossed order books?

Crossed order books indicate a data inconsistency where the best bid is equal to or higher than the best ask. Acting on such data can result in invalid trades or errors.

Can I use Atlas LP on futures or margin markets?

No, Atlas LP supports spot trading only. It does not support futures or margin trading.

Related articles

Run your spot liquidity bot with clear controls

Connect an exchange API key, set your spread band and order levels, and monitor orders, fills and balances from one console.

Create an account
Monitor and Respond to Stale Market Data in Crypto Trading | Atlas LP