Test hook: set to a reason to make the next place() throw it once, as a
plain error. That is an answer lost on its way back, not a refusal: the
engine settles the order as ambiguous and keeps its token, since it may
have reached the broker. For a broker's refusal, construct with
accounts and call failNext('place', 'reject', reason).
What this simulated provider declares. Undefined without accounts.
Make the next call of operation fail as described (test hook).
Optionalreason: stringOptional_signal: AbortSignalOptional_signal: AbortSignalOptional_signal: AbortSignalOptional_signal: AbortSignalThe order stream: every status change of every order, with the account and client token behind it.
legClientTokens are the client tokens the engine gives the stop and
target legs. A provider that echoes them on the legs' rows lets a bracket
whose answer was lost be reconciled leg by leg.
Read-only: what the order would cost. Must not place anything.
Push readings as they change. onError reports a dead stream; the returned function stops it.
OptionalonError: (e: unknown) => voidStaticmakeBuild a deterministic N-level synthetic book around ltp (demo/test helper).
The minimal broker write interface the
OrderEnginedrives: place / modify / cancel.OpenAlgoTradeFeedimplements this. Distinct from the base-tierTradeFeed(a higher-level place + subscribe shape inopenalgo-charts): implementOrderFeedfor the engine's write path.