oracleId, strike) the UI has marked hot (someone subscribed via WS or hit /v1/quotes/… in the last HOT_TTL_S, default 60s).
Loop
Hot set maintenance
- WS
sub→ mark(oracle, strike)hot, setHOT_TTL_Sexpiry. - WS
unsub→ leave the TTL to expire; rapid re-sub avoids a re-quote round-trip. - REST
GET /v1/quotes/:oracle/:strikecache miss → mark hot + immediate inline quote.
File
packages/server/src/workers/quote-poller.ts.
Tuning
| Env var | Default | Effect |
|---|---|---|
QUOTE_POLL_MS | 2000 | Poll interval per hot strike |
HOT_TTL_S | 60 | Strike stays hot for this many seconds after last subscriber |
QUOTE_CACHE_TTL_S | 300 | How long a cached quote is served stale before forcing a re-quote |