A lightweight native macOS application that tracks global trading sessions directly in your Menu Bar. Keep market information at your fingertips without cluttering your screen.
- Minimalist UI: Displays only in the top menu bar (Status Bar)
- Smart Tracking: Automatically detects the current trading session (Hong Kong, Frankfurt/XETRA, London, NYSE pre/main, CME)
- CME Gap Alert: Indicates volatility risks when markets open (weekends and Monday pre-open)
- BTC/ETH Premium: Spot prices from Coinbase and premium vs Binance in the menu
- US CPI reminders: Upcoming rows from
data/cpi_dates.json(manual; verify against BLS CPI schedule) - Low Resource Usage: Built with Python using native macOS libraries (PyObjC)
The application uses the zoneinfo library (Python 3.9+ standard) for correct handling of daylight saving time transitions. This is critical for trading, as exchange opening times relative to UTC change twice a year.
Main tracked sessions (editable in data/sessions.json; CME uses "venue": "cme"):
- HKEX (Hong Kong) — Asia/Hong_Kong
- XETRA (Frankfurt) — Europe/Berlin
- LSE (London) — Europe/London
- NYSE (New York) — pre-market and main session, America/New_York
- CME (Chicago) — futures session, America/Chicago (with weekend wrap logic)
Note: The application automatically matches your Mac's system time with the configured exchange time zones, ensuring accurate display.
Opening times in data/sessions.json are approximate regular hours for the menu bar. They do not include exchange holidays, early closes, auction-only days, or venue-specific exceptions. Treat this as an at-a-glance guide, not compliance-grade market data.
The CME gap risk banner uses your Mac’s local clock (weekend plus Monday morning through 10:00 local). It is a rough reminder, not tied to the exact Chicago reopen minute in your time zone.
- macOS (Intel or Apple Silicon)
- Python 3.12 (recommended version for stable builds)
# Clone the repository
git clone https://github.com/yourusername/trading-bar.git
cd trading-bar
# Create a virtual environment
python3.12 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Optional: tests and build
pip install -r requirements-dev.txtTo create a standalone application, PyInstaller is used as it most correctly packages dependencies in newer macOS versions (including Sonoma and Sequoia).
If you encounter an "Operation not permitted" error during build, you need to grant Terminal full disk access:
System Settings → Privacy & Security → Full Disk Access → Enable Terminal
From the project root, use the checked-in spec (bundles data/ and sets bundle id):
pip install -r requirements-dev.txt
pyinstaller TradingBar.specAlternatively, a minimal one-off build (you must add --add-data yourself if you rely on JSON under data/):
pip install pyinstaller
pyinstaller --noconsole --windowed --onefile --hidden-import=zoneinfo --name "TradingBar" main.py--noconsoleand--windowed: The application won't open an extra terminal window--onefile: All dependencies are packaged into a single executable file--hidden-import=zoneinfo: Forces inclusion of the timezone database
After the build process completes:
- Navigate to the
dist/folder - Drag
TradingBar.appto yourApplicationsfolder
For distribution outside your own machine, Apple expects a Developer ID signature (and usually notarization). Typical flow (replace identity and paths):
codesign --deep --force --options runtime \
--sign "Developer ID Application: Your Name (TEAMID)" \
dist/TradingBar.app
xcrun notarytool submit dist/TradingBar.zip --apple-id "..." --team-id "..." --password "..." --waitExact steps depend on your Apple Developer account; see Apple’s Notarizing macOS software documentation.
To make the application launch automatically at system startup:
- Go to System Settings → General → Login Items
- In the "Open at Login" section, click the + button
- Select
TradingBar.appfrom your Applications folder
MIT License. Use for any purpose. Happy trading!