FloatMarket is a floating macOS market board focused on fast-glance monitoring.
浮市的目标是做一个适合快速扫盘的 macOS 悬浮行情看板。
Core priorities:
- Fast read at a glance
- Stable runtime with fallback engines
- Easy source replacement
- Practical controls for proxy, theme, and watchlist order
核心优先级:
- 一眼可读
- 运行稳定且有回退引擎
- 数据源方便替换
- 代理、主题、监控顺序可直接调
FloatMarket.swift: app entryMainScene.swift: floating window, control center window, menu bar extraMainView.swift: floating window UI
Menu Bar Button/MenuBarButton.swiftMarketStore- settings persistence
- quote merging
- proxy testing
- stream state tracking
Export/MyExportDocument.swift- app models
- settings models
- scheduling models
Export/ExportCommands.swift- HTTP fallback engine
- WebSocket streaming engine
- proxy-aware session creation
Settings/Panes/Sidebar/About Window/
- Source: Baidu Gushitong public endpoints
- Strategy:
- use cached values when market is closed
- skip unnecessary refreshes after close
- promote indices opening within 30 minutes
- Primary engine: WebSocket
- Backup engine: HTTP
- Manual refresh: poll snapshot-only feeds only
- Auto refresh:
- global indices and snapshot-only feeds are checked by interval
- WebSocket feeds do not use timer-based refresh
- OKX/Gate/Binance stream feeds trigger a one-off HTTP sync after disconnects or reconnects
- Supported proxy types:
- HTTP
- SOCKS5
- Current implementation uses
URLSessionConfiguration.connectionProxyDictionary - Proxy affects:
- REST requests
- WebSocket requests
- Current bilingual support is implemented in-app, not through
.stringsresources - App language options:
- Follow System
- Chinese
- English
MarketStore.text(zh, en)is used for lightweight UI translation
Recommended future upgrade:
- move strings to dedicated localization resources when the text surface becomes much larger
Build:
xcodebuild -project FloatMarket.xcodeproj -scheme FloatMarket -configuration Debug buildRun built app:
open ~/Library/Developer/Xcode/DerivedData/FloatMarket-*/Build/Products/Debug/FloatMarket.app- Replace temporary exchange badges with official logo assets
- Add drag-reorder interaction in watchlist editor
- Add exchange-specific symbol templates and validation
- Add market holiday calendars for more accurate index scheduling
- Add test coverage for schedule sorting and proxy session generation