Skip to content
All library documents

Recording Live Tick and Bar Data Through an Event Queue

Article Quant course library

Summary

This document explains a workflow for collecting live market data for selected instruments. After connecting to a market interface and starting the recorder, a user adds tick or bar recording tasks. The recorder subscribes to the required instruments, stores task settings for later startup, and publishes updates so the interface can show the active recording list.

Incoming ticks are matched against configured tasks. Tick records are copied into a queue for asynchronous database writes; bar tasks send ticks through a bar generator and enqueue the resulting bars. A background loop saves queued records using the database layer. Removing a task updates the saved settings and active list, while closing the recorder stops its worker thread. The description also notes support for several database options and configurable database selection. It focuses on application operation and data capture mechanics; it provides no guidance on data validation, loss recovery, timestamp alignment, storage performance, or whether recorded data is suitable for a particular research use.

Key ideas

  • Recording tasks are configured by instrument and can capture ticks or generated bars.
  • The recorder subscribes to market updates for instruments in its saved task settings.
  • A queue separates incoming market events from database writes performed by a worker loop.
  • Bar recording converts incoming ticks into bars before saving them.
  • Removing tasks updates persistent settings, and closing the module stops recording.

Tags

From a private course collection; the original is not published.