classifyQuoteNotificationAction
Classify a notification’s lastSeenAction into the quote flow it belongs to. Consumers use the result to scope cache invalidation to the reads a notification can actually affect — an open-anchor event never changes the pending-instant-close feed, and vice versa.
Open-side actions (anchoring an open, or the InstantRFQ price fill) classify as "open"; close-request/fill actions classify as "close"; anything else (including failures and unknown actions) is "other".
import { classifyQuoteNotificationAction } from "@symmio/trading-core";
if (classifyQuoteNotificationAction(n.lastSeenAction) === "close") invalidateCloses();Parameters
actionstring | null | undefinedrequiredThe notification’s lastSeenAction (may be null/absent).
Returns
The quote flow the action belongs to — "open", "close", or "other".
Related
- QuoteNotificationActionKind — the union this returns.
- applyNotificationToQuotes — advances a row’s lifecycle from the same notifications.
- Notifications stream — the frames whose
lastSeenActionis classified.
Last updated on