Designing Real-Time Crypto Quote Systems from Market Data APIs
This article uses a sample crypto ticker (GLM/USDT) to explain quote fields, how change and market-cap metrics are derived, and practical design for ingest, storage, display, and data quality in a real-time quoting system.
Designing Real-Time Crypto Quote Systems from Market Data APIs
Why market data matters
In digital assets, market data is the base input for trading decisions, quantitative strategies, and research. Retail users watching price moves and enterprise systems running automated trading both depend on a clear reading of ticker fields and a sound data pipeline.
This article starts from a typical crypto quote: symbol GLM, pair GLMUSDT, last price 0.09359 USD, 24-hour change about 0.0001 USD (0.107%), open 0.09349, high 0.09539, low 0.09119, market cap about $93.7331 million, rank 164. Around this snapshot we unpack field meanings, how indicators are computed, and engineering points for a real-time quoting system.
Field-level breakdown
Identity fields
Quotes usually carry three identifiers: asset code, trading pair, and market type. The code (GLM) is the project symbol; the pair (GLMUSDT) states the quote currency (GLM priced in USDT); market type (CRYPTO) separates digital assets from traditional securities. In the data model, treat these as part of a composite key so quotes do not mix across markets or pairs.
Price fields
- Last price: most recent trade; the core display field.
- Open: typically the price at the start of the 24-hour window; the baseline for change.
- High / low: bounds of traded prices in the window; they describe the range. In the sample, high 0.09539 minus low 0.09119 is about 0.0042, or roughly 4.5% vs last price—moderate volatility.
Note that “24 hours” may be a rolling window or a calendar day. That mismatch often explains cross-venue differences; persist the window definition explicitly.
Change amount and percent
Change amount = last − open; change percent = amount ÷ open × 100%. Check: 0.09359 − 0.09349 = 0.0001, close to the given 0.00009989 (rounding); 0.0001 ÷ 0.09349 ≈ 0.107%, matching the given percent. The source therefore uses the price 24 hours ago, not a calendar-day open. Align implementation with the vendor’s documented definition.
Market cap: use and limits
Market cap = circulating supply × last price. The sample’s ~$93.7331 million and rank 164 locate the asset by size. Rank is often used to filter universes (e.g. only top-N names for liquidity).
Caveats: circulating-supply definitions differ; some sources rely on self-reported figures. Rank is dynamic; store the snapshot timestamp with the quote or historical comparisons lose meaning.
Engineering a real-time quote stack
Ingest
A typical stack has ingest, clean, store, and present. Ingest usually consumes incremental ticks from a push API:
on_message(tick):if tick.price <= 0: reject() # drop invalid pricesif abs(tick.price - last.price) / last.price > THRESHOLD:markSuspicious(tick) # flag extreme movesupdate_in_memory_cache(tick)async_write_to_timeseries_db(tick)
Filtering matters. Occasional exchange spikes (flash crashes) will pollute high/low and distort change if left untreated.
Storage and query
Quotes are time series. A common pattern is in-memory cache plus a time-series database:
- Cache holds the latest quote for high-frequency UI reads, with a very short TTL.
- The TSDB stores aggregated bars (minute/hour) for charts and backtests.
- Aggregates such as market-cap rank should be computed by a scheduled job and written with a version, not coupled to every price tick.
Front-end display
Dashboards must absorb high-frequency updates. Common practices: throttle/merge pushes (e.g. once per 200 ms); color up/down with brief transitions; format precision so values like 0.00009989 are not shown raw.
function fmtPrice(p, quoteDecimals) {return p.toFixed(Math.max(quoteDecimals, sigDigits(p)));}
Quality and presentation
Monitor update rate, jump size, and missing fields. If source lag exceeds a threshold, show the timestamp so users do not treat stale data as live. For compliance, present quotes as information only—do not imply investment advice—and honor third-party licensing and attribution.
Summary
Using one real crypto ticker, this article mapped field semantics, change-window pitfalls, market-cap limits, and ingest/store/display practice. Three takeaways: (1) simple-looking fields hide definition mismatches that break analysis; (2) real-time systems need anomaly filters at ingest and throttle/formatting at the UI; (3) every aggregate should carry snapshot time and window notes so results stay traceable and reproducible. Those principles are enough to build a quote board or analytics pipeline and to support more complex quantitative work later.
