Skip to content

Dealing Center

Dealing Center receives trade operations whose routing plan starts with MANUAL_DEALER. The server reserves an order for a deferred opening, creates a persistent dealer request, and stops normal execution until a dealer accepts, rejects, releases, or times out the request.

Routes can also use VIRTUAL_DEALER. This built-in policy engine evaluates the operation synchronously and returns ACCEPT, REJECT, or NEXT_STEP without creating a manual request.

Dealer pools and active requests are served from immutable RAM snapshots. SQLite databases are persistence storage and are updated through serial workers.

Flow

OPEN / CLOSE / PARTIAL_CLOSE
    → routing match
    ├─ VIRTUAL_DEALER
    │   ├─ ACCEPT → Core execution
    │   ├─ REJECT → rejected
    │   └─ NEXT_STEP
    └─ MANUAL_DEALER
        → PENDING → CLAIMED
        ├─ ACCEPT → EXECUTING → EXECUTED / EXECUTION_FAILED
        ├─ REJECT → REJECTED
        ├─ RELEASE → PENDING
        └─ timeout → EXPIRED → next routing step

For an opening request, order is reserved before the dealer request is created and acts as its stable execution identity. Accepting a request revalidates the trade and resumes Core execution without running routing a second time.

Access

Dealer pool configuration requires SESSION_ADMIN. Dealer request commands accept SESSION_MANAGER, SESSION_ADMIN, and SESSION_DEALER, but the acting staff id must belong to the request's dealer pool.

Documentation