Feeds and staleness
Session states and stale UI states for Thesalink.
Equity sessions pause. Every read needs a session check.
Rule
Check the session state on every read. If the session is closed, mark the row stale and do not show a fresh price or a fresh total.
if (session === CLOSED) {
state = STALE;
price = none; // show badge, not a number
} else {
state = FRESH;
value = amount * price;
}UI states
- Fresh: price, value, and timestamp shown.
- Stale: badge shown, price blanked, row excluded from fresh totals.
- Basket stale: shown when any constituent is stale.
Off-hours
About half of stock-token trades happen when equity sessions are closed. Treat every off-hours view as stale until the session reopens.
