This repo includes several real-time alerts for crypto/stock trading, built with CoinGecko, Binance, EODHD, and Financial Modeling Prep APIs. Alerts are sent to Telegram groups/channels.
- Improve test coverage. [In Progress]
- Write examples for each alert.
- Enhance documentation.
- Setup Docker.
- Add a gui for setting up/running alerts.
- pre-requisites:
All coingecko alerts: CoinGecko pro api token, at leastAnalystsubscriptionstock_alert: Financial Modeling Prep api token, starter subscription needed; EODHD api token,All in onesubscriptionAll alerts: telegram bot token;telegram group/channel ids(whole part after the # in https://web.telegram.org/a/#-XXXXXXXX, starting with "-")- Fill in the required tokens in token.json for the alerts you want to run
- Set all the parameters in configs.json for the alerts you want to run
- python3.12 or higher
- Run on server in areas where Binance and CoinGecko apis are not banned.
./scripts/env_init.sh
./scripts/testit.sh
./scripts/env_clean.sh
- Change your API KEY and your Telegram Group ids in
token.json
- Run
./scripts/start.sh <alert_name>alert_names are set inconfigs.json.
- Available
alert_type:market_cap,price_volume,sequential,alts_alert,alert_100,alert_300,alert_500,funding_rate,meme_alert,stock_price_outperformer,price_increase_alert,macd_alert,floating_shares,stock_screener
- python scripts to run those alerts are in
main.py
- alerts are defined in
alerts/, and will be sent to telegram groups/channels defined intoken.json
stock_crypto_api/defines interactions with stock/crypto apis
exception/defines error handling functions andtelegram_api/implements a simplified message queue for telegram bot to accommodate the rate limit of telegram bot api
- coin:
CoingeckoCoin. exchange:BinanceExchange. stock:StockSymbol. All are defined indata_type/
- alerts are set to run daily/bi-hourly/hourly/quarter-hourly, frequencies and timezones are defined in the
configs.json
market_cap:alerts/crypto_alerts/coingecko_market_cap_alert.py: a daily report of newly deleted and newly added top 100/200/300/400/500 market cap coins.price_volume:alerts/crypto_alerts/binance_price_volume_alert.py: real-time alerts for coins with large price and volume changes in 15min/1h timeframe.alts_alert:alerts/crypto_alerts/coingecko_alts_alert.py: daily report of top 500-3000 market cap alts coin with 24H price and volume increase both larger than 50%.alert_100, alert_300, alert_500:alerts/crypto_alerts/coingecko_binance_spot_over_ma_alert.py: daily report of top 100/300/500 market cap coins/exchanges with spot price over 4H SMA200.sequential: sequentially executealert_100, alert_300, alert_500.funding_rate:alerts/crypto_alerts/binance_future_funding_rate_alert.py: bi-hourly alerts for future exchanges with funding rate larger than +-0.2%.meme_alert:alerts/crypto_alerts/coingecko_binance_spot_over_ma_alert.py: daily report of all coins/exchanges on coingecko/binance with daily volume over 3 million USD and with spot price over 1H SMA200.stock_price_outperformer:alerts/stock_alerts/stock_price_top_performer_alert.py: daily report of stocks with highest daily price change.price_increase_alert:alerts/crypto_alerts/coingecko_price_increase_alert.py: daily report of top [start, end] market cap coins with the highest price increase percentage in a give timeframe.macd_alert:alerts/comprehensive_alerts/macd_alert.py: MACD (Moving Average Convergence Divergence) analysis for stocks and crypto pairs across multiple timeframes, with Excel and email reports of MACD crossovers and trends.floating_shares:alerts/stock_alerts/floating_shares_alert.py: daily report of floating shares changes (7-day and 90-day) for specified stock symbols, organized by industry sectors, includes 8-K filings summary.stock_screener:alerts/stock_alerts/stock_screener_alert.py: comprehensive stock screening system applying various financial filters (growth scores, revenue growth, operating margins, valuation metrics) to identify growth stocks.
- Tracking all spot exchanges on Binance, and automatically add new exchanges to the alert list.
- Contains 4 alerts to four different telegram groups/channels:
price_alert_15min,price_alert_1h,volume_alert_1h,volume_alert_15min. - Setting thresholds defined in
settings.json. price_alert_15min: alert for coins with price change larger than15m_price_change_percentagein 15min timeframe.price_alert_1h: alert for coins with price change larger than1h_price_change_percentagein 1h timeframe.volume_alert_15min: alert for coins over amount threshold15m_volume_usdin USD:- if second bar is 10X first bar and third bar is 10X first bar
- if second bar is 50X first bar
- if third bar is 50X first bar
volume_alert_1h: alert for coins over amount threshold1h_volume_usdin USD:- if second bar is 10X first bar
- Every sub alert has a daily counter and monthly counter, which will be reset to 0 at 00:00 UTC everyday and every month.
- In the telegram group/channel, the alert contain 3 parts:
- Coins/exchanges with spot price over SMA 200
- Coins/exchanges newly added this time compared to last time
- Coins/exchanges newly deleted this time compared to last time
- Counts of each captured coin/exchange for how many times it has been sequentially captured
- Star/Watch/Fork this repository.