SyncReportService

Service for logging signal synchronization events to JSONL report files.

Captures all signal lifecycle sync events (signal-open, signal-close) emitted by syncSubject and stores them in the Report database for external order management audit trails.

Features:

  • Listens to sync events via syncSubject
  • Logs signal-open events (scheduled limit order filled) with full signal details
  • Logs signal-close events (position exited) with PNL and close reason
  • Stores events in Report.writeData() for persistence
  • Protected against multiple subscriptions using singleshot
constructor();
loggerService: any

Logger service for debug output

tick: any

Processes signal sync events and logs them to the database. Handles both signal-open and signal-close action types.

subscribe: (() => () => void) & ISingleshotClearable

Subscribes to syncSubject to receive signal sync events. Protected against multiple subscriptions. Returns an unsubscribe function to stop receiving events.

unsubscribe: () => Promise<void>

Unsubscribes from syncSubject to stop receiving sync events. Calls the unsubscribe function returned by subscribe(). If not subscribed, does nothing.