The broker's own last word. Undefined means the broker has said nothing
about this order yet, however far state has advanced on transport results.
Close a whole position, or part of it when qty is given, through the provider's own close.
Client-owned intent: what we did, as opposed to what the broker confirmed.
An order row from the broker's stream or book, matched by broker id or, failing that, by the client token the broker echoes. The token is the only handle on a write whose answer was lost: it is how an AMBIGUOUS row learns its broker id and its outcome from the broker rather than from a guess. Rows may come in any order: a bracket leg that names an entry not yet bound is held, and applied when the entry binds.
Authoritative state from the broker: an order-stream push or a poll of the
book. This is the ONLY input that writes brokerStatus; place, modify and
cancel resolving never do.
Apply a fresh order-book snapshot. Absence is not death: state still goes
to stale for existing consumers, but the intent becomes AMBIGUOUS, because
an order missing from one snapshot means our picture is incomplete, not that
the broker cancelled it. Such a row is never pruned. (v2 drops stale
entirely; that removal has to wait for the contract bump.)
Place an entry whose stop and target legs the provider places and links itself. The legs are never linked client-side: one-cancels-other is the provider's job here, and a second, client-side link would race it.
One-click market order. Omitting opts is exactly the previous behaviour.
Optionalopts: MarketOrderOptionsAsk the provider what an order would cost. Read-only: it claims no token,
runs no confirmation and never calls place. The same checks as placing
apply, so a preview is never shown for an order that would be refused here.
Drop an AMBIGUOUS row and free its token, after the host has established from the broker's complete book that the request never arrived. Nothing here can decide that on its own, which is why it is a separate call. Any other row is left alone and the call returns false.
Rate-limited modify (drag): coalesces to the latest, sends at most every
minModifyMs. An invalid price (tick/band/freeze) is NOT enqueued or sent:
it surfaces via onValidationError so the UI can snap the line back.
Optionalopts: ModifyOptionsReverse a position through the provider's own reverse.
Enter reconciliation: the connection dropped or a gap was seen, so our picture may be behind. Nothing is concluded here; call
onReconnectwith the fresh book to conclude anything. An AMBIGUOUS row is left alone, since only the broker can take it out of that state.