PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/System Design/Coinbase

Design a Cryptocurrency Trading System with Third-Party Exchanges

Last updated: Jun 15, 2026

Quick Overview

This interview question evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer for Design a Cryptocurrency Trading System with Third-Party Exchanges states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

  • hard
  • Coinbase
  • System Design
  • Software Engineer

Design a Cryptocurrency Trading System with Third-Party Exchanges

Company: Coinbase

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Onsite

##### Question Design a cryptocurrency trading platform that routes client orders to one or more third-party exchanges that expose a (nominally) **synchronous** HTTP order/cancel API. Even though the venue API looks synchronous, fills and cancellations are effectively **asynchronous** and arrive later via polling, webhooks, or streams. Address the following: 1. **Overall architecture.** Lay out the services, databases, messaging/event bus, and per-exchange connectors. Explain why you offer the client a fast synchronous "accepted" response while real execution happens asynchronously behind the scenes, and how you decouple order submission from fills/cancellations. 2. **Order lifecycle / state machine.** Define the full state-transition diagram for an order (e.g., `NEW → PENDING_SUBMISSION/PARTIALLY_FILLED → FILLED / CANCELED / EXPIRED / REJECTED`, plus an explicit "unknown outcome" state). Specify the allowed transitions, how you persist and recover state, and how you keep transitions idempotent. 3. **Timeouts, partial failures, and exactly-once effects.** Explain how the system detects and recovers from third-party exchange timeouts or failures using retries, idempotency keys / client order IDs, deduplication, circuit breakers, dead-letter queues, and reconciliation. Describe how you avoid double execution and approximate exactly-once external effects. 4. **Spiky traffic.** Propose strategies (rate limiting, queueing, backpressure, autoscaling, batching, circuit breakers, hot-shard mitigation) to absorb bursty load and protect both your own services and the downstream exchanges' published rate limits. 5. **Data consistency & durability.** Specify the consistency and durability guarantees for orders, trades/fills, and user balances (e.g., a double-entry ledger with reserve → settle/release), and how internal strong consistency coexists with eventual consistency against the exchange's truth. 6. **Multi-exchange routing (optional).** If a single parent order can be split across venues, describe the smart order router (SOR), parent/child order modeling, and how child fills aggregate into the parent state. 7. **Client APIs, SLAs, and observability.** Define the client-facing REST/streaming APIs, target SLAs/SLOs, and the metrics, tracing, logging, and alerting needed to operate the system.

Quick Answer: This interview question evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer for Design a Cryptocurrency Trading System with Third-Party Exchanges states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

Related Interview Questions

  • Design Crypto Order Routing - Coinbase (hard)
  • Design a crypto trading web frontend - Coinbase (hard)
  • Design query pagination for large datasets - Coinbase (medium)
  • Design real-time crypto prices homepage - Coinbase (hard)
  • Design a food delivery system - Coinbase (medium)
|Home/System Design/Coinbase

Design a Cryptocurrency Trading System with Third-Party Exchanges

Coinbase logo
Coinbase
Aug 4, 2025, 10:55 AM
hardSoftware EngineerOnsiteSystem Design
17
0

Design a Cryptocurrency Trading System with Third-Party Exchanges

Design a cryptocurrency trading platform that routes client orders to one or more third-party exchanges that expose a (nominally) synchronous HTTP order/cancel API. Even though the venue API looks synchronous, fills and cancellations are effectively asynchronous and arrive later via polling, webhooks, or streams.

Address the following:

  1. Overall architecture. Lay out the services, databases, messaging/event bus, and per-exchange connectors. Explain why you offer the client a fast synchronous "accepted" response while real execution happens asynchronously behind the scenes, and how you decouple order submission from fills/cancellations.
  2. Order lifecycle / state machine. Define the full state-transition diagram for an order (e.g., NEW → PENDING_SUBMISSION/PARTIALLY_FILLED → FILLED / CANCELED / EXPIRED / REJECTED , plus an explicit "unknown outcome" state). Specify the allowed transitions, how you persist and recover state, and how you keep transitions idempotent.
  3. Timeouts, partial failures, and exactly-once effects. Explain how the system detects and recovers from third-party exchange timeouts or failures using retries, idempotency keys / client order IDs, deduplication, circuit breakers, dead-letter queues, and reconciliation. Describe how you avoid double execution and approximate exactly-once external effects.
  4. Spiky traffic. Propose strategies (rate limiting, queueing, backpressure, autoscaling, batching, circuit breakers, hot-shard mitigation) to absorb bursty load and protect both your own services and the downstream exchanges' published rate limits.
  5. Data consistency & durability. Specify the consistency and durability guarantees for orders, trades/fills, and user balances (e.g., a double-entry ledger with reserve → settle/release), and how internal strong consistency coexists with eventual consistency against the exchange's truth.
  6. Multi-exchange routing (optional). If a single parent order can be split across venues, describe the smart order router (SOR), parent/child order modeling, and how child fills aggregate into the parent state.
  7. Client APIs, SLAs, and observability. Define the client-facing REST/streaming APIs, target SLAs/SLOs, and the metrics, tracing, logging, and alerting needed to operate the system.

Constraints & Assumptions

  • Preserve the scope, facts, inputs, and requested outputs from the prompt above.
  • If the prompt leaves a detail unspecified, state a reasonable assumption before relying on it.
  • Keep the answer interview-ready: concise enough to present, but concrete enough to implement or evaluate.

Clarifying Questions to Ask

  • Clarify users, core use cases, read/write patterns, scale, latency, availability, and data retention.
  • State explicit assumptions before making sizing or architecture decisions.
  • Prioritize the functional path first, then address reliability, security, observability, and rollout.

What a Strong Answer Covers

  • A scoped requirements summary with concrete non-goals and success metrics.
  • API, data model, architecture, consistency, capacity, and operations.
  • Reasoned trade-offs among simple and scalable designs, including bottlenecks and failure modes.
  • A validation, monitoring, migration, and launch plan appropriate for the risk level.

Follow-up Questions

  • What breaks first at 10x traffic or data volume?
  • How would you degrade gracefully during dependency failures?
  • What metrics and alerts would prove the design is healthy after launch?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Coinbase•More Software Engineer•Coinbase Software Engineer•Coinbase System Design•Software Engineer System Design

Your design canvas — auto-saved

PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.