Crypto token average dashboard
Filed under Coinbase
Free read 2 of 3Clarify the average definition (simple, volume-weighted), freshness, accuracy, history needs and the number of viewers.
The question
Token price updates arrive every 2 seconds from multiple exchanges. Design a system that displays the average price per token on a dashboard, refreshed every 10 seconds.
Constraints
- Assume hundreds of tokens and tens of exchanges, each publishing a price per token every 2 seconds.
- Dashboard refresh every 10 seconds for many concurrent viewers.
- Handle late, duplicate and out-of-order updates, and exchanges that go silent.
- Average definition (simple vs volume-weighted) should be clarified.
Approach
Clarify the average definition (simple, volume-weighted), freshness, accuracy, history needs and the number of viewers.
Event schema (token, exchange, price, timestamp); dashboard API returning latest averages and optionally history.
Exchange connectors -> message queue (Kafka) partitioned by token -> stream processor with 10-second tumbling windows that keeps the latest price per exchange and computes the average -> store results in a cache/DB -> serve via API or WebSocket push.
Partition by token, handle late events with watermarks, drop stale exchanges after a TTL, filter outliers, make processing idempotent, add monitoring and failover.
Tips
- What they are testing: Streaming data pipeline thinking: ingestion, windowed aggregation, handling late or missing data, and serving to many dashboard clients efficiently.
- Common mistake: Ignoring data quality issues (stale exchanges, outliers, out-of-order events) and computing the average at read time from raw events for every viewer.
Collected from public candidate posts and coding forums. Updated Nov 2026.