The Syra Trading Agent Bot operates through a streamlined pipeline that transforms raw market data into intelligent, actionable trading insights — all delivered instantly to your Telegram chat.
🔍 Overview
Syra combines real-time data analysis, technical computation, and automation workflows using n8n, market APIs, and Telegram integration.
The process follows four main stages:
Data Collection → Fetch market data
Analysis Engine → Process indicators
Signal Generation → Build structured output
Delivery → Send formatted reports to Telegram
🧮 1. Data Sources
Syra retrieves live and historical data from trusted market APIs such as:
Binance Market Data API — price, volume, and candlestick information
CoinGecko / CryptoCompare (optional) — price indexes and asset metadata
Each signal query (e.g., /signal bitcoin) triggers Syra to fetch:
Latest OHLCV (Open, High, Low, Close, Volume) data
Previous 20–50 candles for technical indicator computation
🧩 The data is normalized before analysis to ensure accuracy across exchanges.
⚙️ 2. Analysis Engine
Once the data is collected, Syra’s engine runs a sequence of indicator calculations inside the n8n workflow.
Indicators Calculated:
RSI (Relative Strength Index)
MACD (Moving Average Convergence Divergence)
SMA 20 & 50
EMA 12 & 26
Bollinger Bands
ATR % (Average True Range Percentage)
These indicators are compared against dynamic thresholds to detect:
Momentum direction
Volatility level
Overbought / Oversold zones
Trend confirmations (crossovers, divergences)
💡 3. Signal Logic & Trend Evaluation
The core logic of Syra assigns a trend score based on combined signals.
For example:
Condition
Score Impact
Meaning
Price above SMA20
+1
Short-term bullish trend
Price above SMA50
+1
Mid-term confirmation
RSI above 60
+1
Positive momentum
MACD histogram positive
+1
Bullish momentum
MACD crossover bearish
−1
Momentum weakening
The total score determines the trend label:
5 → STRONG BULLISH
3–4 → BULLISH
0–2 → NEUTRAL / MIXED
−3 to −5 → BEARISH
🧠 4. AI Confidence Layer
The bot uses a rule-based AI layer to analyze conflicting signals.
For instance:
RSI bullish but MACD bearish → Confidence = Medium
All indicators aligned → Confidence = High
Mixed volatility and volume → Confidence = Low
This confidence rating helps traders gauge trust level in each recommendation.
🧾 5. Signal Generation
Once analysis is complete, Syra constructs a structured message object like this:
This data is then converted into a formatted HTML message ready for Telegram output.
💬 6. Telegram Message Formatting
Using the n8n Telegram Send Message node, Syra sends structured text using HTML parse mode for bold titles, emojis, and easy readability.
Example output:
🎨 Every section is modular — you can add or remove fields from the workflow without breaking formatting.
⚡ 7. Automation via n8n
The n8n workflow powers the bot’s entire process.
Typical structure:
Trigger Node: Telegram command received (/signal bitcoin)
HTTP Request Node: Fetch market data from Binance
Function Node: Calculate indicators and logic
Switch Node: Route by command type
Telegram Node: Send formatted response back to user
🧩 This modular approach allows easy customization and scaling.