How deedop/tpscraper works
tpscraper is a local TakeProfit market-data collector and JSON/SSE service. The main workflow is: authorize a user’s account, select instruments, collect quotes and candle/order-flow data, maintain freshness-aware state, then expose it to a local dashboard or client. The graph preserves documented catalog, analytics, history, and browser-renewal capabilities. Some implementation files were not excerpted, so uncertain internal links are omitted; dashed links indicate documented or unverified integrations.
Main entry points: dashboard.py HTTP and SSE service · native_collect.py Native collector · native_state.py Native market state · local_chrome.py Chrome authorization
Components 28
Entry and authorization
- CLI entry
tpscraper/__main__.py - Token authorization
tpscraper/auth.py - Chrome authorization
tpscraper/local_chrome.py - Browser renewal bridge
tpscraper/browser_renew.py - Credential storage
tpscraper/credential_store.py
Collection and decoding
- Instrument selection
tpscraper/instruments.py - Workspace settings
tpscraper/workspace.py - Instrument catalog
tpscraper/catalog.py - Native collector
tpscraper/native_collect.py - Native probe
tpscraper/native_probe.py - gRPC-Web framing
tpscraper/protocol.py - Native message schema
tpscraper/native_schema.py - Quote schema
tpscraper/quote_schema.py - Extended data schema
tpscraper/extended_schema.py - Symbol handling
tpscraper/symbols.py
Market data state
- Native market state
tpscraper/native_state.py - Dashboard state
tpscraper/dashboard_state.py - Order-flow state
tpscraper/flow_state.py - History cache
tpscraper/history_cache.py - Capability tracking
tpscraper/capabilities.py - Market analytics
tpscraper/analytics.py - Feed utilities
tpscraper/feed.py - Flow records
tpscraper/flow_record.py
Local API and clients
- HTTP and SSE service
tpscraper/dashboard.py - Browser dashboard
tpscraper/static/dashboard.html
Other components
- Local user
- Local API client
- TakeProfit
Connections 28
- Local user → CLI entry: starts service
README.md - CLI entry → HTTP and SSE service: dispatches
tpscraper/__main__.py - Local user → Chrome authorization: authorizes account
README.md - Chrome authorization → Credential storage: uses storage
tpscraper/local_chrome.py - Browser renewal bridge → Chrome authorization: extends authorization
tpscraper/browser_renew.py - Token authorization → TakeProfit: renews token
tpscraper/auth.py - HTTP and SSE service → Token authorization: uses authorization
tpscraper/dashboard.py - HTTP and SSE service → Native collector: starts collection
tpscraper/dashboard.py - HTTP and SSE service → Instrument selection: configures instruments
tpscraper/dashboard.py - HTTP and SSE service → Instrument catalog: serves search
tpscraper/dashboard.py - Workspace settings → Instrument selection: loads selections
tpscraper/workspace.py - Native collector → Native message schema: builds subscriptions
tpscraper/native_collect.py - Native collector → Native market state: ingests quotes
tpscraper/native_collect.py - Native collector → TakeProfit: streams market data
README.md - Native probe → Native message schema: decodes requests
tpscraper/native_probe.py - Native probe → gRPC-Web framing: decodes frames
tpscraper/native_probe.py - Native collector → gRPC-Web framing: uses framing
tpscraper/native_collect.py - Native message schema → Quote schema: uses quote types
tpscraper/native_schema.py - Native collector → Extended data schema: requests extended data
tpscraper/native_collect.py - Native market state → Order-flow state: updates flow state
tpscraper/native_state.py - Native market state → Capability tracking: tracks support
tpscraper/native_state.py - Native market state → Market analytics: computes metrics
tpscraper/native_state.py - Native market state → Dashboard state: uses shared state
tpscraper/native_state.py - Dashboard state → History cache: writes candles
tpscraper/dashboard_state.py - HTTP and SSE service → Native market state: reads snapshots
tpscraper/dashboard.py - HTTP and SSE service → History cache: serves retained bars
tpscraper/dashboard.py - Local API client → HTTP and SSE service: requests JSON or SSE
README.md - HTTP and SSE service → Browser dashboard: serves dashboard
tpscraper/dashboard.py