Crypto Market Data Fields Explained: Indicator Definitions and Calculation Methods

    This article explains the core fields in crypto asset market data: last price, price change, open, high, and low prices, market capitalization, and update time. It shows how to calculate change percentage and market cap, lists the consistency checks to run before storing quote data, and includes a Python example for validating those fields. It also covers common mistakes and engineering practices for handling market data reliably.

    1. Why Understanding Market Data Fields Matters

    Market pages pack a lot of numbers into one table. Developers who feed this data into dashboards, alerts, or reports must understand what each field means. If the definitions are unclear, the same number can be read in very different ways, which leads to display errors or skewed statistics.

    2. Meaning of Core Fields

    2.1 Last Price

    The last price is the price of the most recent trade executed by the matching engine. It reflects the outcome of the latest trade, not the average level of all open orders. In low-liquidity markets, a single large trade can noticeably move the last price, so monitoring should also track order book depth and trading volume.

    2.2 Price Change and Change Percentage

    Price change is the difference between the current price and a reference price from an earlier point in time. Change percentage is the price change divided by the reference price. When the statistics window is the past 24 hours, the reference price is the price 24 hours ago, which can be derived from “last price minus price change.”

    The formulas are:

    • Reference price = Last price − Price change
    • Change percentage = Price change ÷ Reference price × 100%

    2.3 Open, High, and Low Prices

    These three fields describe the price range within the statistics window. The open price is the price at the start of the window. The high and low prices are the upper and lower bounds of traded prices within the window. In normal data, the low is not higher than the high, and both the last price and the open price fall between the low and the high.

    2.4 Market Capitalization and Market Cap Rank

    Market capitalization is usually estimated as:

    Market cap = Circulating supply × Unit price

    Circulating supply and total supply are different measures. A figure labeled “total market cap” may be based on total supply, while “circulating market cap” uses circulating supply. Always label which basis is used when displaying these values. Market cap rank changes as each project’s market cap changes. It works as a relative reference, not as an absolute measure of a project’s quality or security.

    2.5 Update Time

    Market data is time-sensitive. The update time field should include time zone information. Store timestamps in Coordinated Universal Time (UTC), and convert them to the user’s local time zone when displaying them.

    3. Field Consistency Checks

    Market data passes through several stages before it reaches your system. Cache misalignment, precision truncation, or field mapping errors can distort the displayed results. Before storing data, check the following three points:

    1. Price range: the low is not higher than the high, and the last price and open price fall within that range.
    2. Change and change percentage: they must match. The allowed tolerance depends on the number of decimal places used for the change percentage.
    3. Market cap: it must be non-negative and consistent with the product of circulating supply and unit price, within a reasonable tolerance.

    When a check fails, the system should log the raw data and flag it as abnormal rather than correcting the values directly. The upstream reference time may differ from your local assumption, and direct correction would hide the real problem.

    4. Example Code

    The example below uses the Decimal type to avoid floating-point errors and cross-checks the price change against the change percentage. All values are fictional and for demonstration only.

    1. from decimal import Decimal, getcontext
    2. getcontext().prec = 28 # Low-priced assets often have many decimal places, so enough precision is required
    3. def check_quote(last, change, change_pct, low, high, open_price, pct_decimals=3):
    4. """Check the consistency of quote fields and return a list of error messages.
    5. All price parameters are Decimal values. change_pct is a percentage, for example 2.041 means 2.041%.
    6. """
    7. errors = []
    8. if low > high:
    9. errors.append("Low price is higher than high price")
    10. if not (low <= last <= high):
    11. errors.append("Last price is outside the low-high range")
    12. if not (low <= open_price <= high):
    13. errors.append("Open price is outside the low-high range")
    14. reference = last - change # Reference price = last price - price change
    15. if reference <= 0:
    16. errors.append("Reference price is not positive, so the change percentage cannot be calculated")
    17. else:
    18. quantum = Decimal(10) ** -pct_decimals
    19. calc_pct = (change / reference * 100).quantize(quantum)
    20. if calc_pct != change_pct:
    21. errors.append(f"Change percentage mismatch: calculated {calc_pct}, raw {change_pct}")
    22. return errors
    23. # Demo data
    24. result = check_quote(
    25. last=Decimal("0.10"),
    26. change=Decimal("0.002"),
    27. change_pct=Decimal("2.041"),
    28. low=Decimal("0.095"),
    29. high=Decimal("0.104"),
    30. open_price=Decimal("0.098"),
    31. )
    32. print(result or "Validation passed")

    The output is “Validation passed.” If the upstream data keeps the change percentage to two decimal places but the check compares it at three decimal places, the check will raise false alarms. Set pct_decimals to match the actual precision of your data source.

    5. Common Mistakes

    • Treating the last price as the asset’s true value. It only reflects the price of the most recent trade.
    • Ignoring basis differences and comparing market caps from different sources or calculated on different bases.
    • Using market cap rank to judge a project’s quality or security.
    • Calculating monetary amounts with floating-point numbers, which lets rounding errors accumulate.
    • Mixing up cache time and data generation time, so stale data looks current.

    6. Engineering Recommendations

    1. Store raw data separately from display data, and keep the original fields so you can trace and debug issues.
    2. Store prices and quantities as fixed-point numbers or Decimal values. Do not use floating-point numbers for monetary data.
    3. Set a data freshness threshold. When data exceeds it, show a “data may be outdated” label in the interface.
    4. Set alerts for abnormal price moves. For example, notify the on-call team when a single change percentage exceeds a preset threshold.
    5. Configure rate limiting, retries, and fallback strategies for market data API calls so upstream fluctuations do not overwhelm your local service.

    7. Summary and Risk Notice

    Market data fields look simple, but their definitions, precision, and timeliness determine whether the displayed results are reliable. Developers should define each field clearly before implementing validation and display logic.

    Crypto asset prices can be highly volatile. Market data only reflects past and current trading activity. It cannot predict future price movements and does not constitute investment advice.