A data collection pipeline for Solana token discovery and trading analysis. Monitors new token launches on Pump.fun, tracks trade activity and market cap, and optionally correlates with Twitter sentiment.
| Script | Description |
|---|---|
import_coins.py |
Streams new token creation events from PumpPortal WebSocket and saves the 10 most recent to CSV |
check_market_cap.py |
Tracks buy/sell trades and market cap for a specific token |
check_tweets.py |
Monitors Twitter accounts for new tweets and extracts subjects using NLP |
git clone <your-repo-url>
cd Solana_bot
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activatepip install -r requirements.txt
python -m spacy download en_core_web_smcp .env.example .envEdit .env and fill in your values:
TWITTER_BEARER_TOKEN=your_actual_token_here
TWITTER_USERS=elonmusk,anotheruser
TOKEN_ADDRESS=YourSolanaTokenMintAddressHere
Then load the env file before running:
export $(cat .env | xargs)Discover new tokens:
python import_coins.pyTrack market cap for a specific token:
export TOKEN_ADDRESS=<mint_address>
python check_market_cap.pyMonitor Twitter sentiment:
export TWITTER_BEARER_TOKEN=<your_token>
export TWITTER_USERS=elonmusk,username2
python check_tweets.py- Go to Twitter Developer Portal
- Create a project and app
- Copy the Bearer Token from the "Keys and Tokens" section
recent_tokens.csv— 10 most recently created tokens (overwritten each run)token_trade_data.csv— Trade history for the tracked tokentweet_subjects.csv— Extracted subjects from monitored tweets
These files are excluded from git via .gitignore.
- Python 3.9+
- Twitter Developer account (for
check_tweets.py) - No Solana RPC node required — uses PumpPortal public WebSocket API