"When you can't do the thing, the kind move is to say so clearly — so the client stops knocking on a door that will never open."
A capability the plan doesn't grant
Keep streams live stocks and indices, but there's one thing it deliberately doesn't stream live: forex. The active data plan simply doesn't include a real-time FX entitlement, so a live forex WebSocket would be selling something the backend can't deliver. Rather than fake it or leave a dangling endpoint that errors, Keep does something more thoughtful — it keeps a compatibility route (/ws/forex) that opens no provider connection and immediately sends a terminal daily_rest status. The message means: "FX is daily-REST only here; don't wait for live ticks."
Why the terminal signal matters
Picture an older version of the PWA, still loaded in some tab from before this policy, that expects a live forex socket. If /ws/forex simply didn't exist or errored, that old client would reconnect, fail, back off, reconnect, fail — a quiet retry storm forever, burning battery and hammering the server for a feed that will never come. The terminal daily_rest status ends that loop cleanly: the old client receives a definitive "this is as good as it gets, stop retrying," and settles down to daily REST like a good citizen. A clear "no" is kinder than silence, because silence looks like "try again."
Designing for clients you can't update
The deep lesson here is about the clients you don't control. A PWA can sit loaded in a tab for days; you can't force every instance to update the moment you change a policy. So the server has to be graceful toward its own past — it keeps a route that a stale client still expects, and uses it to guide that client into the new behavior. Deleting the endpoint would have been simpler for the code and worse for the fleet of already-loaded clients. Keeping a compatibility path that emits a terminal signal is the design that respects the clients you've already shipped.