Atlas LP
  1. Home
  2. Blog
  3. How to Evaluate Exchange API Data Consistency for Spot Market Making

Exchange API

How to Evaluate Exchange API Data Consistency for Spot Market Making

Consistent ticker and order book data are crucial for reliable spot market making. Learn how to assess API data quality and why it matters for automated liquidity strategies.

Published

Why Data Consistency Matters in Spot Market Making

Automated spot market making relies on timely and accurate market data from exchange APIs. For a market making bot to place and manage limit orders effectively, it must have access to up-to-date ticker and order book information. Inconsistent or stale data can lead to mispriced orders, missed trading opportunities, and increased risk exposure.

This article explores how to evaluate the consistency of exchange API data and why it is essential for anyone running a spot market making strategy.

Key API Data Types: Ticker and Order Book

Two primary data types drive most spot market making strategies:

  • Ticker Data: Provides the latest traded price, best bid/ask, and sometimes 24-hour statistics.
  • Order Book Data: Shows the current resting buy (bid) and sell (ask) orders, typically at multiple price levels.

Bots use this information to determine where to place new limit orders and which existing orders may need adjustment or cancellation.

What is Data Consistency?

Data consistency, in the context of exchange APIs, means that the information provided (such as ticker prices and order book snapshots) accurately reflects the current state of the market and aligns across different API endpoints. Inconsistent data can manifest as:

  • Stale Data: Updates lag behind real market activity.
  • Crossed Order Books: Best bid is higher than best ask, which should not occur in a healthy market.
  • Mismatched Ticker and Order Book: Ticker prices do not align with the top of the order book.
  • Missing or Incomplete Levels: Order book snapshots omit levels or quantities.

How Inconsistent Data Impacts Market Making Bots

A market making bot that acts on inconsistent data can:

  • Place orders at uncompetitive or risky prices.
  • Miss opportunities to adjust to market moves.
  • Leave stale orders resting, increasing the chance of adverse selection.
  • Fail to maintain a balanced presence on both sides of the book.

For example, if a bot receives an order book snapshot where the best ask is below the best bid, it may attempt to place orders at nonsensical prices or halt activity altogether. Similarly, if ticker data is not synchronized with the order book, the bot may misjudge the fair price and set spreads incorrectly.

Evaluating Exchange API Data Consistency

To ensure reliable operation, market makers should regularly evaluate the consistency of exchange API data. Here are practical steps:

1. Compare Ticker and Order Book Data

  • Check Alignment: The ticker's best bid/ask should match the top levels of the order book.
  • Monitor for Crossed Books: If the best bid is greater than or equal to the best ask, flag this as a data issue.

2. Assess Data Freshness

  • Timestamps: Use the exchange-provided timestamps to check how recent the data is.
  • Update Frequency: Monitor how often the API updates. High latency or infrequent updates can result in stale data.

3. Validate Order Book Structure

  • Depth and Completeness: Ensure the order book contains enough levels and that quantities are non-zero.
  • No Negative or Zero Prices: All price levels should be positive and sensible.

4. Test with Real-Time Streams and Snapshots

  • WebSocket vs. REST: Compare the data from WebSocket streams (real-time) and REST API snapshots. Significant discrepancies may indicate issues.
  • Reconcile Fills and Balances: After trades, verify that fills and balances reported by the API match expected outcomes.

5. Automated Verification

Platforms like Atlas LP include built-in API verification steps:

  • Ticker, order book, symbol rules, balances, open orders, and trades are checked before a bot starts.
  • Optionally, the bot can place a limit order far from the market and cancel it immediately to test order placement and cancellation.
  • Each tick, the bot reads the latest ticker and order book, skipping the tick if data is stale or crossed.

Example: Spot Market Making Workflow with Data Checks

Below is a simplified illustration of how a market making bot like Atlas LP evaluates data consistency during operation:

StepData CheckAction if Inconsistent
API Key VerificationCredentials, permissions, symbol rulesStop bot, report error
Tick StartLatest ticker and order book fetchedSkip tick if data is stale/crossed
Ladder CalculationCompare ticker to order book top levelsAdjust base price if misaligned
Order ManagementPlace/cancel orders based on desired ladderOnly adjust mispriced/excess orders

By integrating these checks into each tick, the bot minimizes the risk of acting on faulty data.

Best Practices for Market Makers

  • Monitor API Status: Stay informed about exchange API health and maintenance windows.
  • Set Reasonable Tick Intervals: Avoid overwhelming the API or missing updates by tuning tick intervals (Atlas LP supports intervals from 0.5 seconds).
  • Use Telegram Alerts: Get notified if your bot has no fills for a set period, which may indicate data or market issues.
  • Review Console Logs: Regularly check open orders, fills, and balance snapshots for anomalies.

Why Genuine Market Making Requires Data Integrity

Genuine market making means placing resting limit orders that any participant can trade against. This approach supports fair and transparent markets, but only if the underlying data is accurate and current. Wash trading, self-trading, and volume manipulation are not only prohibited—they often rely on exploiting inconsistent or fabricated data, which undermines market integrity.

Conclusion

Evaluating and ensuring exchange API data consistency is a foundational task for any spot market maker. By systematically checking ticker and order book alignment, monitoring data freshness, and leveraging automated verification steps, you can improve the reliability and safety of your market making operations.

Atlas LP includes robust API verification, tick-by-tick data checks, and secure handling of API keys to support genuine, transparent spot market making. To learn more about how Atlas LP approaches secure and reliable market making, visit [/liquidity-bot].

Atlas LP does not guarantee returns, prices, 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 data consistency in exchange APIs?

Data consistency means that ticker and order book data from the exchange API accurately reflect the current market and are synchronized across endpoints. Inconsistent data can lead to mispriced orders and trading errors.

How does Atlas LP handle inconsistent or stale API data?

Atlas LP checks the freshness and alignment of ticker and order book data on each tick. If data is stale or the order book is crossed, the bot skips that tick to avoid acting on unreliable information.

Why is it important to compare ticker and order book data?

Comparing ticker and order book data helps ensure that the bot is using accurate price references for placing orders, reducing the risk of mispricing and unintended trades.

What should I do if I notice frequent API data issues on an exchange?

Monitor the exchange's API status, consider adjusting tick intervals, and contact exchange support if problems persist. Consistent data issues may require choosing a more reliable venue for market making.

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