Skip to content

khaustova/token_hunter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

Token Hunter – Django web application for custom token trading on Solana and top wallet parsing.

❗ Warning

This application is not a magical money-making machine. It's just a tool.

Using it requires not only an understanding of which tokens you want to trade but also at least a basic proficiency in Python to customize it effectively.

The graphical interface for configuring trading settings is quite limited, so it is highly recommended to manually adjust the settings in the token_hunter/settings.py file within the check_api_data() and check_settings() functions.

The key difference between these functions is that check_api_data() performs an initial validation of data fetched via the DEX Screener API, before parsing details like recent transactions, token holders, and top wallets. The token_hunter/settings.py file also includes formats and examples of the data collected by the application.

Additionally, the file token_hunter/src/utils/preprocessing_data.py contains predefined functions for data preprocessing, such as calculating total trade volumes or counting transactions.

Integrated Services

πŸ’Ž DEX Screener – token and wallet data aggregation
♦️ DEXTools – token and wallet analytics
πŸ›‘οΈ RugCheck – token security assessment
πŸ“Š Getmoni – Twitter/X activity analysis for tokens

Key Features

⚑ Boosted token tracking via DEX Screener API
⏰ Newly listed token monitoring via DEX Screener API
πŸ”Ž Token monitoring with customizable filters via DEX Screener
βš™οΈ Customizable token selection parameters
πŸ›’ Data collection and simulated token purchases
πŸ€– Real token purchases via Telegram’s Maestro Sniper Bot
πŸ•΅οΈ Top wallet parsing with filters
πŸ“ƒ Wallet activity aggregation
πŸ“ˆ Excel export

Setup

  1. Clone the repository:
git clone https://github.com/khaustova/token_hunter.git
  1. Rename .env.example to .env and populate with your credentials.

  2. In the token_hunter folder, rename settings_example.py to settings.py. Add custom checks to:

    • check_api_data() – validates initial token data from API (see example below).
    • check_settings() – pre-trade validation (includes on-page data like top transactions/holders).
    Example API response { "chainId" : "solana", "dexId" : "raydium", "url" : "https://dexscreener.com/solana/dqcj8kcnbdmm7kww4w4w9hvbhb7raellpt3raxsjmgnt", "pairAddress" : "DQcj8kcnBdMm7KWw4w4W9HVbhB7RAeLLPt3rAxsjmgnT", "baseToken" : { "address" : "B7NPUGvxC8BUF5a8BdxurBNxCjV3HwyN6DaRivtqNAjB", "name" : "Pi Network AI", "symbol" : "PiAI" }, "quoteToken" : { "address" : "So11111111111111111111111111111111111111112", "name" : "Wrapped SOL", "symbol" : "SOL" }, "priceNative" : "0.00000000000002174", "priceUsd" : "0.000000000004224", "txns" : { "m5" : { "buys" : 121, "sells" : 73 }, "h1" : { "buys" : 1050, "sells" : 706 }, "h6" : { "buys" : 8176, "sells" : 4854 }, "h24" : { "buys" : 8618, "sells" : 5078 } }, "volume" : { "h24" : 1017521.56, "h6" : 962844.46, "h1" : 120586.98, "m5" : 13581.37 }, "priceChange" : { "m5" : -28.15, "h1" : -40.1, "h6" : -49.48, "h24" : 507 }, "liquidity" : { "usd" : 30492.81, "base" : 3611984589615754, "quote" : 78.4331 }, "fdv" : 180343, "marketCap" : 180343, "pairCreatedAt" : 1739604349000, "info" : { "imageUrl" : "https://dd.dexscreener.com/ds-data/tokens/solana/B7NPUGvxC8BUF5a8BdxurBNxCjV3HwyN6DaRivtqNAjB.png?key=a838fa", "header" : "https://dd.dexscreener.com/ds-data/tokens/solana/B7NPUGvxC8BUF5a8BdxurBNxCjV3HwyN6DaRivtqNAjB/header.png?key=a838fa", "openGraph" : "https://cdn.dexscreener.com/token-images/og/solana/B7NPUGvxC8BUF5a8BdxurBNxCjV3HwyN6DaRivtqNAjB?timestamp=1739638500000", "websites" : [ { "label" : "Website", "url" : "https://pi-network.club" }, { "label" : "CoinMarketCap", "url" : "https://coinmarketcap.com/currencies/pi-network-ai/" } ], "socials" : [ { "type" : "twitter", "url" : "https://x.com/PiAICTO" }, { "type" : "telegram", "url" : "https://t.me/PiNetworkcto" } ] }, "boosts" : { "active" : 500 } }
  3. Launch the app with Docker:

    docker-compose up --build
    

    Note: In the .env file, don’t forget to change REDIS_HOST and POSTGRES_HOST to redis and postgres respectively.

    Or use virtual environment
    • Ensure Redis and PostgreSQL are running.

    • Create venv:

    python3 -m venv .venv
    
    • Activate venv:

      • Linux/MacOS:
      source .venv/bin/activate
      
      • Windows:
      .venv\Scripts\activate
      
    • Install dependencies:

    pip install -r requirements.txt
    
    • Migrate DB:
    python3 manage.py migrate
    
    • Start Celery:
    celery -A core worker -l info
    
    • Run the server:
    python3 manage.py runserver
    
  4. Access at: http://127.0.0.1:8000

Data Source Selection

Token data can be scraped from DEX Screener and DEXTools.

DEX Screener Specifics:

  • Uses nodriver (non-headless browser required due to Cloudflare checks every ~36 hours).
  • May fail to load tables with "Failed connecting to server" errors (common on Beeline ISP).
  • Filter-based monitoring (tokens/wallets) always uses DEX Screener.

DEXTools Specifics

  • Uses Selenium (supports headless mode; no manual Cloudflare checks).
  • Extracts additional trade history (~100 recent transactions).

Token Selection Parameters

Configure via:

  • Admin panel: create Settings model instances.
  • Code: modify check_api_data() and check_settings() in token_hunter/settings.py.

Real Buy/Sell Configuration

Enable Real Purchases

Set IS_REAL_BUY=True in .env.

Telegram Integration

Required for automated trading via Maestro Sniper Bot and Telegram channel data collection.

Obtaining API ID and Hash

  1. Visit https://my.telegram.org/auth.
  2. Log in with the phone number linked to your trading account.
  3. Navigate to API development tools β†’ Create a new app.
  4. Copy App api_id and App api_hash to .env:
TELETHON_API_ID=your_id
TELETHON_API_HASH=your_hash

Telegram Authorization

  1. Set TELEGRAM_PHONE_NUMBER in .env.
  2. Run:
python manage.py authtelegram
  1. Follow on-screen prompts to complete login.

Maestro Sniper Bot Setup

  1. Open @MaestroSniperBot in Telegram.
  2. Send the command /sniper.
  3. In the menu that appears, select Call Channels and choose the SOL network.
  4. Select the Me channel.
  5. Enable Auto Buy.
  6. Set the token purchase amount in the Buy Amount parameter.
  7. Optionally, configure Sell-Hi and Sell-Lo parameters for automatic token selling.

Screenshots

screen 1 screen 2 screen 3 screen 4

About

Django web app for customizable Solana token trading and parsing top wallets.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published