Summary of CBOE Book Viewer Collector
This document provides a detailed overview of the CBOE Book Viewer Collector, a system designed to continuously monitor and collect market data for the SPY symbol on the EDGX venue. The collector operates 24/7, polling data at specified intervals and storing it in both CSV and JSON formats.
Key Features
- Continuous Operation: The collector runs continuously, polling data every second during market hours (04:00 to 20:00 New York time).
- Data Storage: It writes CSV files every second during live sessions and JSON files every minute, along with immediate JSON snapshots when data quality changes occur.
- Session Management: The system handles different market sessions (Closed, Early, Pre-Market, Regular, After-Hours) and adjusts polling intervals accordingly.
- Error Handling: The collector is designed to recover from browser or page failures by recreating the browser session as needed.
Technical Specifications
The collector is implemented in C# and utilizes the Playwright library for browser automation. Key components include:
- Polling Intervals: 1 second during open sessions and 60 seconds during closed sessions.
- Data Freshness: Data is flagged as stale if it is older than 600 seconds.
- Viewport Settings: The browser is set to a specific viewport size to ensure proper rendering of the CBOE page.
Data Collection Process
The data collection process involves several steps:
- Establish a browser session and navigate to the CBOE Book Viewer URL.
- Dismiss any cookie banners and select the appropriate venue for data collection.
- Capture the market data from the page, including bids, asks, and trades.
- Store the captured data in both CSV and JSON formats for further analysis.
- Monitor the market state and handle any errors or stale connections by reloading the page as necessary.
Data Structure
The captured market data includes:
- Best Bid and Ask: The highest bid and lowest ask prices.
- Trade Prints: Details of the latest trades including time, price, and shares.
- Market Depth: The depth of bids and asks at various levels.
- Data Quality Indicators: Flags indicating the freshness and completeness of the data.
Error Logging
The collector includes a logging mechanism to capture errors and warnings during operation, ensuring that issues can be diagnosed and addressed promptly.
Conclusion
The CBOE Book Viewer Collector is a robust tool for monitoring market data in real-time, providing valuable insights for trading and investment analysis. Its continuous operation and comprehensive data collection capabilities make it an essential component for traders focusing on the SPY symbol.