Design a REST API for Yahoo Finance Watchlists With Safe Retries
Last updated: November 29, 2026
Quick Overview
Design the HTTP API for creating Yahoo Finance watchlists and adding or listing their symbols. Show how clients can safely retry creates, how concurrent edits from phone and laptop avoid lost updates, and how listing pages through large lists.
Yahoo
November 29, 20260
0
0 solved
Design the HTTP API for creating Yahoo Finance watchlists and adding or listing their symbols. Show how clients can safely retry creates, how concurrent edits from phone and laptop avoid lost updates, and how listing pages through large lists.
Watchlists are one of the most used features of Yahoo Finance and are edited from web and mobile apps at the same time. This fundamentals question checks resource modeling, idempotency, optimistic concurrency, and pagination, with a small working core to show you mean it.
What the Interviewer Expects
- Model resources and routes with correct HTTP verbs and status codes
- Use an Idempotency-Key header for POST retries
- Use version numbers or ETags with If-Match to prevent lost updates
- Return opaque cursors for pagination
- Validate and normalize input like ticker symbols
- Discuss versioning the API path
Key Topics to Cover
How to Approach This
- Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
- Choose data structures based on access patterns, not familiarity.
- Prefer immutable data and message passing over shared mutable state for concurrency.
- Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
- What status code should a version conflict return, and what should the client do next?
- Why is an opaque cursor better than page numbers here?
- How long should idempotency keys be retained?
- How would you support reordering symbols in a list?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Routes:
POST /v1/users/{uid}/watchlistswithIdempotency-Keycreates a list (201).PATCH /v1/users/{uid}/watchlists/{wid}/symbolswithIf-Match: <version>adds symbols (200, or 412 on a st...
High-Level Design
- Idempotency: store
(uid, key) -> responsefor 24 hours. A retried POST after a mobile timeout returns the same watchlist instead of creating a duplicate. - Concurrency: each list has an in...