This chat is subscribed and ready. You will receive spread alerts as soon as the parser detects open, deepen, and close events.
Live market signal bot for Telegram
Track real MEXC spot/futures spreads without babysitting charts.
MEXC Spread Bot watches live spot and perpetual futures feeds, detects spread openings, deepens, and closes, then delivers structured alerts with market links, 24h amount context, and threaded updates right in Telegram.
- Real-time MEXC spot + futures websockets
- 3 event types Open, deepen, close lifecycle
- Telegram-native Inline buttons and threaded updates
Why it is useful
Built to turn noisy market movement into readable trading context.
The project is not just a websocket reader. It is a complete alert workflow: feed ingestion, spread state management, Telegram delivery, symbol blacklist, persistence, and operator-friendly commands.
Live spread detection
The parser keeps live spot and futures prices in sync and calculates signed spread percentages in real time.
Threaded event lifecycle
Open alerts start the thread, deepen updates reply into it, and close messages finish the narrative cleanly.
Comparable 24h amount reporting
Spot and futures lines both show quote-denominated 24h amount in USDT, avoiding unit mismatches between coins and futures contracts.
Operator controls
Admin commands expose a lightweight blacklist, so noisy symbols can be muted without redeploying anything.
Pipeline
One process, clear responsibilities, minimal operational overhead.
1. MEXC market feeds
Spot mini-tickers arrive over protobuf, futures tickers arrive as JSON, and both are normalized into a shared market data queue.
2. Spread state manager
Thresholds, debounce logic, daily peaks, and spread lifecycles are handled in one dedicated parser stage.
3. Telegram delivery
The bot consumes `SpreadEvent` objects, formats them, remembers thread message IDs, and posts readable market alerts.
MEXC Spot WS ----\
> market_data_queue -> state_manager -> spread_event_queue -> Telegram bot
MEXC Futures WS -/
Alert simulator
Toggle the event type and see how the bot communicates the state.
A new spread crossed the open threshold and started a new Telegram thread.
Operational surface
Simple commands, low ceremony, enough control for a real operator.
/start
Subscribe the current chat and activate spread notifications.
/stop
Unsubscribe the current chat without touching parser state.
/help
Show the command list and explain how threaded alerts behave.
/about
Summarize the project, purpose, and market-link behavior.
/ban_token SYMBOL
Admin-only control to suppress noisy symbols from alert delivery.
/banned_tokens
Inspect the current blacklist stored in the bot persistence layer.
Launch guide
Designed to be easy to run locally, honest about hosting tradeoffs.
Local first
- Create a Python virtual environment.
- Install dependencies from
requirements.txt. - Generate protobuf bindings with
python scripts/generate_proto.py. - Create a local
.envfrom.env.example. - Run
python main.pyand subscribe via/start.
Hosting posture
The current architecture is strongest as a local or paid-worker deployment. Free Render web services are a poor fit because the bot depends on continuous polling, live websocket connections, and file-backed persistence.
Built by two contributors
A split ownership model with clear responsibilities.
Tenyokj
Focused on Telegram bot logic, message formatting, operator commands, and the end-user interaction layer.
likeastyro
Focused on the parser pipeline, MEXC API integration, websocket feeds, spread calculations, and market-data processing.