This question evaluates proficiency in distributed system design, integration with external APIs, fault tolerance and reliability, state-machine modeling for order lifecycles, rate-limiting and reconciliation strategies, and scalability within the System Design domain.

You are designing a trading service that accepts client orders (e.g., market and limit) and routes them to third‑party cryptocurrency exchanges. Third‑party exchanges expose nominally synchronous REST/RPC APIs, but may be slow or unreliable. The service must reliably track order state, handle partial fills, and scale under spiky traffic.
Assume:
Login required