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
Live parser Telegram polling MEXC spot/futures
MEXC Spread Bot @mexc_spread_tracker_bot

Bot status

This chat is subscribed and ready. You will receive spread alerts as soon as the parser detects open, deepen, and close events.

Spread event

LONG #SWARMS spread +1.81% detected

daily peak was +2.00%

Spot
$0.007787
Futures
$0.007928
Spot 24h amount
$926.9K
Futures 24h amount
$1.2M

#SWARMS aligned in 17 sec

OPEN · LONG #ELIZAOS +2.42% DEEPEN · SHORT #GITLAWB -2.85% CLOSE · #NOCK aligned in 20 min OPEN · LONG #SATO +1.61% DEEPEN · LONG #SWARMS +1.81% OPEN · SHORT #UB -2.13%

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.

01

Live spread detection

The parser keeps live spot and futures prices in sync and calculates signed spread percentages in real time.

02

Threaded event lifecycle

Open alerts start the thread, deepen updates reply into it, and close messages finish the narrative cleanly.

03

Comparable 24h amount reporting

Spot and futures lines both show quote-denominated 24h amount in USDT, avoiding unit mismatches between coins and futures contracts.

04

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.

🤑 LONG #SWARMS spread +1.81% detected

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

  1. Create a Python virtual environment.
  2. Install dependencies from requirements.txt.
  3. Generate protobuf bindings with python scripts/generate_proto.py.
  4. Create a local .env from .env.example.
  5. Run python main.py and 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.

Recommendation Keep it local for pet-project use, or move to a paid background worker with persistent storage when you want stable 24/7 uptime.

Built by two contributors

A split ownership model with clear responsibilities.