Advanced Admin Operations¶
Objective¶
Practice advanced exchange-operator controls that are documented but were not
covered in earlier training chapters: KICK, QCANCEL, CANCEL_SYM, and
manual session overrides via SESSION|STATE=....
Prerequisites¶
- Chapters 01-18 completed.
GW_ADMINconfigured withrole: ADMIN.- Engine and at least one trader and one MM gateway connected.
Background¶
Earlier risk-control exercises focused on halt/resume and kill switch. In live operations, admins also need targeted controls for:
- Disconnecting a specific participant (
KICK). - Cancelling one MM quote on one symbol without killing the whole gateway (
QCANCEL). - Clearing one symbol's resting book across all gateways (
CANCEL_SYM). - Forcing session state for controlled drills (
SESSION|STATE=...).
These controls exist in both:
- Interactive admin console (
pm-admin/ ALF commands). - One-shot scripting CLI (
pm-admin-cli).
Exercise 1: Disconnect a Gateway with KICK¶
From admin console:
Or with CLI:
Verification:
- In the
TRADER02terminal, confirm disconnect occurred. - Reconnect:
Checkpoint: gateway is disconnected and can reconnect cleanly.
Exercise 2: Cancel One MM Quote with QCANCEL¶
First ensure an MM has an active quote on AAPL.
From admin console:
Or with CLI:
Verify from MM gateway:
You should see the prior quote legs no longer active.
When to use this instead of manual MM-side QUOTE_CANCEL: use QCANCEL when
the MM process is unresponsive or when operations needs immediate symbol-scoped
intervention without relying on the MM terminal.
Checkpoint: one-symbol MM quote is cancelled without mass-cancelling all gateway orders.
Exercise 3: Clear One Symbol Book with CANCEL_SYM¶
Create a few resting orders on TSLA from multiple gateways, then run:
From admin console:
Or with CLI:
Verify:
Confirm TSLA resting orders were cleared while other symbols remain unchanged.
Checkpoint: symbol-scoped cancel works across gateways.
Exercise 4: Force Session State for Controlled Drills¶
Set session state explicitly:
From admin console:
[GW_ADMIN|ADMIN]> SESSION|STATE=CONTINUOUS
[GW_ADMIN|ADMIN]> SESSION|STATE=CLOSING_AUCTION
[GW_ADMIN|ADMIN]> SESSION|STATE=CLOSED
Or with CLI:
pm-admin-cli --id GW_ADMIN session --state CONTINUOUS
pm-admin-cli --id GW_ADMIN session --state CLOSING_AUCTION
pm-admin-cli --id GW_ADMIN session --state CLOSED
pm-admin-cli --id GW_ADMIN session-status
Use this to reproduce auction and close transitions deterministically in training.
Checkpoint: forced session transitions are visible and verifiable.
Exercise 5: Run an Incident Micro-Runbook¶
Simulate a short incident response sequence:
- Detect suspicious behavior on one gateway.
KICKthe gateway.QCANCELone affected MM quote.CANCEL_SYMfor one stressed symbol.SESSION|STATE=CONTINUOUSto restore normal operation if needed.
Example CLI sequence:
pm-admin-cli --id GW_ADMIN kick --gw TRADER02 --reason "Training incident"
pm-admin-cli --id GW_ADMIN qcancel --gw MM_AAPL_01 --sym AAPL
pm-admin-cli --id GW_ADMIN cancel-sym --sym AAPL
pm-admin-cli --id GW_ADMIN session-status
Checkpoint: you can explain when to use each control and why they are not interchangeable.
Summary¶
You can now operate advanced admin controls beyond halt/resume:
KICKfor participant disconnection.QCANCELfor targeted MM quote cancellation.CANCEL_SYMfor symbol-wide book clearing.SESSION|STATE=...for deterministic phase management.
Reflection¶
Why does CANCEL_SYM clear an entire symbol's book while QCANCEL targets
only quote-based orders? In an incident where a single market maker's bot is
malfunctioning, which of these tools (or KICK, or the Chapter 11 kill
switch) would you reach for first, and why is that the least disruptive
choice available?