Decoding Crypto Market Data Systems: A Complete Technical Guide from Real-Time Ingestion to Display

    This article explains the engineering pipeline behind a cryptocurrency market data service, from ingesting upstream feeds to displaying prices. It covers the core market data model, precise calculation of price changes and market capitalization, a three-layer real-time architecture, display conventions for the frontend, and safeguards that keep data accurate and latency low.

    A single market data record, such as the GLMUSDT ticker showing a latest price of $0.09139, a 24-hour change of 3.041%, and a market cap of $90,541,500, depends on a full chain of data collection, cleaning, calculation, storage, and push. This article breaks down that chain from an engineering perspective to help developers build stable, accurate, low-latency market data services.

    1. Core Field Model for Market Data

    The first step in designing a market data system is defining a unified data model. A typical market record includes the following field groups:

    • Identifiers: Asset code (such as GLM), trading pair (such as GLMUSDT), and market type (CRYPTO). Identifier fields are the primary key source for market data, so they must be globally unique.
    • Price fields: Latest price, opening price, high price, and low price. These four fields form the basis of candlestick charts and tickers.
    • Change fields: The 24-hour price change and change percentage. Users watch these metrics most closely.
    • Scale fields: Market cap and market cap rank, which allow assets to be compared by size.
    • Metadata fields: Quote currency (USD) and update timestamp.

    A recommended structured definition looks like this:

    1. {
    2. "symbol": "GLM",
    3. "pair": "GLMUSDT",
    4. "market": "CRYPTO",
    5. "currency": "USD",
    6. "price": 0.09139,
    7. "open": 0.08869,
    8. "high": 0.09368,
    9. "low": 0.08759,
    10. "change": 0.002697,
    11. "changePercent": 3.041,
    12. "marketCap": 90541500,
    13. "marketCapRank": 168,
    14. "updatedAt": "2026-11-24T14:32:38Z"
    15. }

    Price fields must use a high-precision decimal type, such as Decimal in most languages. Do not use floating-point numbers directly in calculations. Floating-point values lose precision, which introduces small but unacceptable errors in change percentage calculations.

    2. Standardized Calculation of Change and Market Cap

    Change percentage is the part of market display that is most prone to errors. The standard formulas are:

    1. Change amount = Latest price - Price 24 hours ago (or the opening price of the day, depending on the definition)
    2. Change percentage = Change amount / Base price × 100%

    Checking the sample data: 0.09139 - 0.08869 = 0.0027. This is close to the recorded change of 0.002697, and the small difference comes from decimal truncation. Also, 0.002697 / 0.08869 ≈ 3.041%, which matches the change percentage field. In engineering practice, the definition must be explicit. Teams need to decide whether the base is the opening price of the day or the 24-hour rolling price, and the API documentation should state this clearly so upstream and downstream systems interpret the data the same way.

    Market cap is calculated as Market cap = circulating supply × latest price. Circulating supply changes over time because of events such as on-chain token unlocks and burns. For this reason, market cap is usually recalculated by a scheduled job at fixed intervals, not refreshed with every trade. Market cap rank is an asset’s position when all assets in the market are sorted by market cap. Ranks must be updated in batch after each market cap recalculation.

    3. Data Ingestion and Real-Time Update Architecture

    Market data usually comes from a push feed provided by an upstream exchange or aggregation data source. A common architecture has three layers:

    1. Ingestion layer: Subscribe to the upstream market stream over a long-lived connection, then parse the protocol and normalize the format. This layer must handle reconnection after disconnects, heartbeat keepalive, and message deduplication.
    2. Computation layer: Use stream processing to calculate change percentage, high and low prices, trading statistics, and other metrics. Use a sliding window for 24-hour rolling metrics. Set the window step, such as 1 second or 5 seconds, based on latency requirements.
    3. Distribution layer: Write results to a cache so HTTP endpoints can serve snapshot queries. At the same time, broadcast updates to frontend clients through a message queue or a push channel such as WebSocket.

    A simplified consumer example:

    1. def on_ticker(msg):
    2. ticker = normalize(msg) # normalize fields
    3. ticker["change"] = dec(ticker["price"]) - dec(ticker["open"])
    4. ticker["changePercent"] = round(
    5. ticker["change"] / dec(ticker["open"]) * 100, 3
    6. )
    7. cache.set(ticker["pair"], ticker) # write snapshot to cache
    8. publish("ticker.update", ticker) # broadcast to subscribers

    4. Display Conventions

    Several frontend display details are easy to overlook:

    • Precision and truncation: Low-priced assets, such as those around $0.09, usually need 4 to 6 decimal places. The change amount should use the same number of decimal places as the latest price to avoid visual misalignment.
    • Color conventions: A common convention is red or green for gains, with the opposite color for losses. Color preferences vary by region, so make this a configurable option.
    • Time semantics: Show the time zone of update timestamps, and use relative time where helpful, such as “Updated 3 seconds ago.” Keep the original server timestamp for auditing.
    • Freshness fallback: When the push channel fails, the frontend should show that data may be delayed. Otherwise, users may assume the market has stopped moving.

    5. Stability and Data Quality Safeguards

    Market data systems require very high accuracy. Consider these safeguards:

    • Reconciliation: Periodically pull data from the snapshot API and compare it with streamed updates. Trigger an alert when the two disagree.
    • Plausibility checks: Run volatility anomaly detection on each ticker. For example, if a price moves beyond a set threshold within a short period, send it for manual review so that bad data does not reach users.
    • Degradation strategy: When the upstream feed is interrupted, the last cached snapshot can continue to serve users, but it must be labeled with its freeze time. If the freeze lasts longer than the allowed limit, remove that trading pair from the display.

    Conclusion

    A single market data record reflects the combined work of data modeling, calculation conventions, the real-time pipeline, and display standards. Getting field definitions, precision handling, convention declarations, and stability fallbacks right creates a foundation for a reliable and scalable market data service. Whether you build a market dashboard, a portfolio analysis tool, or higher-level quantitative and risk control applications, these foundational practices are essential.