Reduce live feed lag with consumer reset controls

- Add API JetStream deliver policy and reset env flags
- Reset stale API consumers on startup when needed
- Move synthetic trade emission after NBBO to reduce lag
This commit is contained in:
dirtydishes 2026-04-29 00:12:29 -04:00
parent da942079f3
commit d3ff19b5c0
5 changed files with 157 additions and 34 deletions

View file

@ -481,8 +481,6 @@ export const createSyntheticOptionsAdapter = (
conditions: burst.conditions
};
void handlers.onTrade(print);
if (handlers.onNBBO) {
nbboSeq += 1;
const sizeBase = Math.max(1, Math.round(burst.baseSize * 0.4));
@ -503,6 +501,8 @@ export const createSyntheticOptionsAdapter = (
void handlers.onNBBO(nbbo);
}
void handlers.onTrade(print);
}
remainingRuns -= 1;