Constructors

Accessors

Methods

  • Enter reconciliation: the connection dropped or a gap was seen, so our picture may be behind. Nothing is concluded here; call onReconnect with the fresh book to conclude anything. An AMBIGUOUS row is left alone, since only the broker can take it out of that state.

    Returns void

  • 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.

    Parameters

    • clientId: string

    Returns undefined | OrderStatus

  • Force-send any pending modify (e.g. on drag end).

    Parameters

    • clientId: string

    Returns Promise<void>

  • Link two orders as OCO: when one fills/cancels, the other is cancelled.

    Parameters

    • clientIdA: string
    • clientIdB: string

    Returns void

  • 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.

    Parameters

    Returns void

  • Broker fill event (by broker id). Advances state and triggers OCO.

    Parameters

    • brokerId: string
    • full: boolean

    Returns void

  • 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.)

    Parameters

    • presentBrokerIds: ReadonlySet<string>

    Returns void

  • 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.

    Parameters

    Returns void