Architecture
System Overview
NODO consists of four main layers working together to deliver AI-powered market analysis.
┌─────────────────────────────────────────────┐
│ INTERFACE LAYER │
│ Telegram Bot │ Web API │ Dashboard │
├─────────────────────────────────────────────┤
│ GATEWAY LAYER │
│ Auth │ Rate Limiting │ 402 Payments │
├─────────────────────────────────────────────┤
│ CORE SERVICES │
│ Scanner │ AI Orchestrator │ Consensus │
├─────────────────────────────────────────────┤
│ DATA LAYER │
│ Polymarket API │ AI Providers │ Cache │
└─────────────────────────────────────────────┘Component 1: Market Scanner
The Scanner fetches and filters markets from Polymarket's API.
What It Does
Queries Polymarket's Gamma API for active markets
Parses JSON response into structured objects
Filters by minimum volume, probability, and other criteria
Returns clean list of opportunities
Why It Matters
Raw API data is messy. Prices come as strings, some fields are JSON-encoded within JSON, and many markets have zero liquidity. The Scanner normalizes everything.
Code Example
Key detail: Polymarket returns outcomePrices as a JSON string inside JSON, so we need json.loads() to parse it:
Component 2: AI Orchestrator
The Orchestrator sends market data to multiple AI models in parallel and collects their responses.
What It Does
Builds a standardized prompt from market data
Sends prompt to all configured AI providers simultaneously
Waits for all responses (with timeout handling)
Parses each response into structured format
Why Parallel Matters
Sequential calls to 6 models would take 30+ seconds. Parallel calls take only as long as the slowest model (~5-8 seconds).
Code Example
The prompt is structured to get consistent output from all models:
Component 3: Consensus Engine
The Consensus Engine aggregates multiple AI responses into a single recommendation.
What It Does
Collects all AI responses
Applies weights to each model's vote
Calculates agreement ratio
Adjusts confidence based on consensus level
Identifies and reports dissenting opinions
Why Weights Matter
Not all models are equal. Claude excels at reasoning, GPT-4 at general knowledge, DeepSeek at math. Weights reflect this:
Claude 3.5 Sonnet
1.5x
Best reasoning
GPT-4o
1.2x
Broad knowledge
DeepSeek
1.1x
Strong at math/logic
Others
1.0x
Baseline
Code Example
Confidence calibration is key — high agreement boosts confidence, low agreement reduces it:
Component 4: Payment Gateway
The Payment Gateway handles 402 micropayments.
What It Does
Checks user's prepaid balance before processing
If sufficient, deducts and processes request
If insufficient, returns 402 with payment options
Verifies payments and credits balances
Code Example
Data Flow Summary
Here's how a request flows through the system:
Total latency: 5-10 seconds (mostly waiting for AI models)
Last updated

