Skip to main content
BotBackend DeveloperProduction ReadyPersonal Project

ChainAlphaAI-Crypto Surge Detection and Twitter Bot

An automated cryptocurrency monitoring system that detects significant price surges, performs AI-driven analysis, and publishes informative tweets on Twitter. Built with TypeScript and designed for deployment on Railway.

Built with

  • TypeScript
  • Node.js
  • CoinGecko API
  • GeckoTerminal API
  • OpenAI API
  • Twitter API v2
  • Canvas
  • Winston
  • Nansen API

The problem

Crypto price surges are worth knowing about within minutes, not hours, and they happen across thousands of tokens on many chains simultaneously. Detection alone is not enough to be useful, though — a raw alert saying a token moved 40% tells you nothing about whether it matters. The gap between detection and interpretation is where most alerting bots stop.

How it was built

A monitoring layer polls market data across multiple chains, tracking price and volume to identify statistically significant moves rather than any move above a fixed threshold — which is the difference between surfacing signal and flooding a feed.

Detected surges are passed through an AI analysis step that turns raw movement into a short, readable interpretation, so the published output carries context rather than only a number.

Charts are generated programmatically at publish time, because a price claim without a picture is far less useful in a social feed, and rendering server-side avoids depending on any external charting service.

Publishing runs through the Twitter API on a modular pipeline — detection, analysis, chart generation, and posting are separate stages, so a failure in one does not take down the others and any stage can be swapped independently.

Structured logging throughout, which matters more than usual for an unattended bot: when something posts wrongly at three in the morning, the log is the only reconstruction you get.

Why this stack

  • CoinGecko and GeckoTerminal APIs — broad market coverage plus on-chain DEX pair data for tokens that never reach a centralized listing.
  • Nansen API — on-chain intelligence for wallet-level context behind a move.
  • OpenAI API — the analysis layer that converts a detected move into readable interpretation.
  • Canvas — programmatic chart rendering with no external image service.
  • Winston — structured logging, the difference between debuggable and mysterious for an unattended process.
  • Railway — a long-running process deployment target rather than serverless, which suits continuous polling.

Outcome

  • Production ready and publishing live.
  • Multi-chain coverage with automated analysis and chart generation.

Frequently asked questions

How does the bot avoid alerting on noise?
By treating surge detection as a statistical question rather than a fixed percentage threshold. A 40% move means something very different for a large-cap token than for a thin new pair, and a fixed cutoff produces either constant false positives or missed signals depending on which end of the market you tune it for.

Want something like this built?

I build across Web3, AI, and financial infrastructure — smart contracts, data pipelines, LLM systems, and the interfaces on top.