โ ะะฐะทะฐะด"""
AlphaPulse Bot โ Configuration & Constants
"""
import os
from telegram import InlineKeyboardButton, InlineKeyboardMarkup
# โโโ Main Config โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
CONFIG = {
'bot_token': os.environ.get('TELEGRAM_BOT_TOKEN', ''),
'channel_id': '@alphapulsexp',
'openrouter_key': os.environ.get('OPENROUTER_API_KEY', ''),
'posting_schedule': [2, 8, 11, 13, 15, 18, 21, 23], # Vancouver hours (13 & 23 = extra news slots)
'enable_polls': True,
'poll_frequency': 4, # every Nth post is a poll
'retention_days': 30,
'health_port': 8090,
'affiliate_binance': os.environ.get(
'BINANCE_AFFILIATE_LINK',
'https://www.binance.com/referral/earn-together/refer2earn-usdc/claim?ref=GRO_28502_B62SR'
),
}
AI_RETRY_COUNT = 3
AI_RETRY_DELAY = 5 # seconds between retries
# โโโ Affiliate Links (rotated in posts) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
AFFILIATE_LINKS = [
{
'name': 'Binance',
'url': CONFIG['affiliate_binance'],
'cta': '๐ผ Trade on Binance',
'weight': 0.5,
},
{
'name': 'Bybit',
'url': os.environ.get('BYBIT_AFFILIATE_LINK', 'https://www.bybit.com/'),
'cta': '๐ผ Trade on Bybit',
'weight': 0.3,
},
{
'name': 'OKX',
'url': os.environ.get('OKX_AFFILIATE_LINK', 'https://www.okx.com/'),
'cta': '๐ผ Trade on OKX',
'weight': 0.2,
},
]
# โโโ Premium Teasers (shown randomly after data posts) โโโโโโโโโโโโโโโโโโโโโโ
PREMIUM_TEASERS = [
"๐ Want real-time alerts? Premium coming soon โ @alphapulsexp",
"๐ Premium: whale alerts, early signals, no noise โ soon",
"๐ Funding spike detected โ premium members get alerts instantly",
"๐ Full analysis with entry/exit levels โ coming to Premium",
"โก Premium members see this data 30 min earlier",
]
# How often to show affiliate (1 = every post, 3 = every 3rd)
AFFILIATE_FREQUENCY = 3
# How often to show premium teaser (1 in N data posts)
PREMIUM_TEASER_FREQUENCY = 5
# โโโ RSS Sources (9 total) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
RSS_SOURCES = {
'CoinDesk': 'https://www.coindesk.com/arc/outboundfeeds/rss/',
'Cointelegraph': 'https://cointelegraph.com/rss',
'Decrypt': 'https://decrypt.co/feed',
'BeInCrypto': 'https://beincrypto.com/feed/',
'BitcoinMag': 'https://bitcoinmagazine.com/.rss/full/',
'TheDefiant': 'https://thedefiant.io/feed',
'CryptoSlate': 'https://cryptoslate.com/feed/',
'Blockworks': 'https://blockworks.co/feed',
'TheBlock': 'https://www.theblock.co/rss.xml',
}
# โโโ Post format weights (8 formats) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
POST_FORMATS = {
'hot': 0.15,
'analysis': 0.20,
'sarcasm': 0.15,
'facts': 0.20,
'signal': 0.10,
'thread': 0.10,
'hot_take': 0.05,
'deep_dive': 0.05,
}
# โโโ Time-based themes โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
TIME_THEMES = {
2: {'emoji': '๐
', 'theme': 'Early Morning'},
8: {'emoji': 'โ', 'theme': 'Morning Digest'},
11: {'emoji': 'โ๏ธ', 'theme': 'Midday Update'},
13: {'emoji': '๐', 'theme': 'Afternoon News'},
15: {'emoji': '๐', 'theme': 'Afternoon Digest'},
18: {'emoji': '๐', 'theme': 'Evening Update'},
21: {'emoji': '๐', 'theme': 'Night Wrap'},
23: {'emoji': '๐ฆ', 'theme': 'Late Night'},
}
BASE_HASHTAGS = '#crypto #bitcoin #altcoins #BTC #trading #cryptonews'
# โโโ Inline keyboard for news posts โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
QUICK_ACTIONS_KEYBOARD = InlineKeyboardMarkup([[
InlineKeyboardButton("๐ Price", callback_data="cb_price"),
InlineKeyboardButton("๐ฑ Fear", callback_data="cb_fear"),
InlineKeyboardButton("๐ฅ Trending", callback_data="cb_trending"),
]])
# โโโ Smart hashtag keywords โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
TOPIC_TAGS = {
'defi': '#DeFi',
'decentralized finance': '#DeFi',
'nft': '#NFT',
'layer 2': '#Layer2',
'layer2': '#Layer2',
'l2': '#Layer2',
'ethereum': '#ETH',
'solana': '#SOL',
'binance': '#BNB',
'xrp': '#XRP',
'ripple': '#XRP',
'cardano': '#ADA',
'regulation': '#Regulation',
'sec': '#SEC',
'etf': '#ETF',
'hack': '#SecurityAlert',
'exploit': '#SecurityAlert',
'breach': '#SecurityAlert',
'airdrop': '#Airdrop',
'staking': '#Staking',
'halving': '#Halving',
'mining': '#Mining',
'ai': '#AI',
'artificial intelligence': '#AI',
'stablecoin': '#Stablecoin',
'cbdc': '#CBDC',
'web3': '#Web3',
'metaverse': '#Metaverse',
}
# โโโ Known tickers โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
KNOWN_TICKERS = {
'btc', 'eth', 'sol', 'bnb', 'xrp', 'ada', 'dot', 'avax',
'matic', 'link', 'uni', 'atom', 'ltc', 'doge', 'shib',
'trx', 'near', 'algo', 'xlm', 'icp', 'apt', 'arb', 'op',
'sui', 'sei', 'inj', 'ton', 'pepe', 'wld', 'rndr',
}
# โโโ News type auto-detection โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
NEWS_TYPE_SIGNALS = {
'hot': [
'breaking', 'hack', 'exploit', 'breach', 'crash', 'surge', 'soars',
'plunges', 'collapses', 'emergency', 'alert', 'warning', 'ban',
'arrested', 'shutdown', 'halted',
],
'analysis': [
'etf', 'regulation', 'sec', 'federal', 'macro', 'inflation',
'interest rate', 'institutional', 'adoption', 'partnership',
'upgrade', 'hard fork', 'roadmap', 'report', 'research',
],
'signal': [
'price target', 'bullish', 'bearish', 'support', 'resistance',
'all-time high', 'ath', 'bottom', 'top', 'rally', 'correction',
'dip', 'pump', 'dump', 'prediction', 'forecast',
],
'sarcasm': [
'meme', 'rug', 'scam', 'celebrity', 'influencer', 'moon',
'lambo', 'laser eyes', 'diamond hands', 'paper hands',
],
'thread': [
'everything you need to know', 'explained', 'breakdown',
'guide', 'how to', 'what is', 'reasons why', 'things to know',
],
}