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
Software Engineering Fundamentals
Software Engineer
Yahoo
November 29, 2026
Software Engineer
Technical Screen
Software Engineering Fundamentals
Easy

0

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
API design
idempotency
optimistic concurrency
pagination
HTTP semantics
How to Approach This
  1. Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
  2. Choose data structures based on access patterns, not familiarity.
  3. Prefer immutable data and message passing over shared mutable state for concurrency.
  4. 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 Problems
Sample Answer
Requirements

Routes:

  • POST /v1/users/{uid}/watchlists with Idempotency-Key creates a list (201).
  • PATCH /v1/users/{uid}/watchlists/{wid}/symbols with If-Match: <version> adds symbols (200, or 412 on a st...
High-Level Design
  • Idempotency: store (uid, key) -> response for 24 hours. A retried POST after a mobile timeout returns the same watchlist instead of creating a duplicate.
  • Concurrency: each list has an in...

Submit Your Answer
Markdown supported

Related Questions