Summary of CBOE Book Viewer Collector
The article discusses a software program designed to continuously collect and analyze order flow data from the CBOE (Chicago Board Options Exchange) for the SPY (S&P 500 ETF) trading symbol. The program operates 24/7, polling data from the CBOE's book viewer at specified intervals, and outputs the data in both CSV and JSON formats.
Key Features
- Continuous Operation: The program runs continuously, polling data every second during market hours (from 04:00 to 20:00 New York time) and once per minute during closed sessions.
- Data Output: It writes a complete top-five book to a CSV file every second and a full JSON snapshot every minute, along with immediate snapshots when data quality changes occur.
- Session Management: The program distinguishes between different market sessions (closed, early, pre-market, regular, and after-hours) and adjusts its polling frequency accordingly.
- Error Handling: It includes robust error handling and recovery mechanisms, such as recreating the browser session in case of failures.
Technical Details
The program is built using C# and utilizes the Playwright library for browser automation. It captures data from the CBOE's web interface, processes it, and stores it in a structured format. The program also implements various checks to ensure data freshness and quality, flagging stale data as necessary.
Data Collection Process
The data collection process involves:
- Opening the CBOE book viewer page and preparing it for data extraction.
- Polling the page for updates and capturing the current state of the order book.
- Parsing the captured data to extract relevant information such as best bids, asks, and trade prints.
- Writing the parsed data to CSV and JSON files for further analysis.
Conclusion
The CBOE Book Viewer Collector is a sophisticated tool for traders and analysts looking to monitor and analyze order flow data in real-time. Its continuous operation, combined with robust error handling and data management features, makes it a valuable asset for anyone involved in trading the SPY ETF.