Puha Analytics · Process Overview

Puha Analytics

Structural Overview

The pipeline read as seven stages, top to bottom — from the ten external providers down to execution & exit. No wiring detail, no animation to trigger: just the shape of the system and which modules are live, dormant, or superseded. For the full trace-level board see The Instrument; for a guided single-proposal walk see The Focus.

← back to all views
10
Providers
7
Stages
34
Edges
30+
Modules
2
Dormant
2
Superseded
§0 Providers Sources · what each yields

Ten external feeds. Real-time trade streams, authoritative REST fills, market discovery, on-chain tx metadata, LLM news scoring, and the historical / funding backfills loaded at startup.

P1 · CLOB WebSocket
P2 · Data API (REST)
P3 · Gamma API (REST)
P4 · Provider A Smart WS
P5 · Provider A eth_getLogs
P6 · Polygon RPC
P7 · Google Gemini
P8 · Google News RSS
P9 · DuckDB V3 (hist.)
P10 · Postgres Funding
§1 Ingest Merge · dedup

Streams are merged and de-duplicated (UNIQUE tx_hash), markets discovered, tx metadata cached, and OrderFilled logs captured as the source of truth.

ws_trade_stream.py
trade_ingestor.py
market_discovery.py
alchemy_ws.py · TxMetaCache
order_filled_listener.py
TakerTracker
onchain_monitor.py
§2 Stores Canonical · persisted state

Postgres holds canonical trades and the monitored-market set; SQLite holds OrderFilled truth, wallet nonces/profiles, and the unified signals.db that every detector writes to.

live_trades (PG)
monitored_markets (PG)
shadow_trades.db
wallet_tx_nonces / profiles
funding_traces
signals.db · ALL signals
§3 Detection Signal · scored by quick_observer

The central heartbeat (quick_observer, 30–50s fan-out) drives the inline cluster scorer plus fresh-wallet, behavioral, news, edge, event-slug and SAID market-selection producers. Two legacy detectors are superseded.

quick_observer.py · HEARTBEAT
detect_clusters()
fresh_wallet_monitor.py
behavioral_matcher.py
news_scorer.py
esa.py
edge_tracker.py
market_selection (SAID)
cluster_detector.py
market_anomaly.py
§4 Decision Vote → TradeProposal

All signals converge for vote aggregation. The confluence engine emits a TradeProposal with an edge rating (0–5★), sizing, and direction.

confluence_engine.py · ★0–5
§5 Execution Order · dry-run

Proposals evaluate to CLOB orders behind a Telegram APPROVE / REJECT gate — currently DRY-RUN.

execution_bot.py · DRY-RUN
Telegram · operator channel
§6 Exit Immune system · P&L

Open positions run under the immune system — hard-stops, cluster-flip and volatility exits, and realized P&L, with alerts back to the operator.

pnl_monitor.py · hard-stop
Live Dormant · offline reconcilers Superseded · no consumer