This repository contains a Python script designed to monitor and update the token balances of top trader wallets, including tracking token changes, querying token data from Vybe Network, and integrating with Telegram for notifications.
The script retrieves token balance information for a list of top trader wallets, calculates token balance changes (additions and subtractions), and updates a local database. Additionally, it fetches token details from DexScreener and analyzes trends related to tokens using Google Trends.
- Queries Vybe Network's API for token balances of specified wallet addresses.
- Tracks changes in token balances (both additions and subtractions).
- Saves the updated token balances and tracked changes in a local JSON file.
- Filters tokens based on market capitalization (with a minimum threshold).
- Retrieves additional token details from DexScreener.
- Integrates with Google Trends to analyze the interest in tokens.
- Sends Telegram notifications with detailed information about token balance updates.
- Clone the repository:
git clone https://github.com/yourusername/token-balance-tracker.git
- Install the required dependencies:
pip install -r requirements.txt
In the config.py
file, configure the following:
VYBE_NETWORK_X_API_KEYS
: List of API keys for accessing Vybe Network's API.VYBE_NETWORK_QUERY_LIMIT
: The limit for the number of token balances to query per request.MAX_RETRIES
: Maximum number of retries in case of API failures.RETRY_AFTER
: Delay in seconds before retrying a failed request.MIN_MARKETCAP
: Minimum market cap for filtering tokens to be included in updates.TELEGRAM_BOT_TOKEN
: Your Telegram bot token.USER_ID
: Your Telegram user ID to receive notifications.TEST_TG_CHAT_ID
: A test chat ID for Telegram notifications.MIN_BUY_AMOUNT_USD
: Minimum USD value for token buys to trigger a notification.MIN_SELL_AMOUNT_USD
: Minimum USD value for token sells to trigger a notification.RECENT_N_DAYS_INTEREST
: The number of days for recent trends to consider in Google Trends.
- Rename the
private_temp.ini
file toprivate.ini
. - Fill in the following details in the
private.ini
file:
[bitquery]
BITQUERY_CLIENT_ID =
BITQUERY_CLIENT_SECRET =
BITQUERY_V1_API_KEY =
[vybe_network]
VYBE_NETWORK_X_API_KEYS = <Key 1>, \
<Key 2>, \
...
[telegram]
TELEGRAM_BOT_TOKEN =
TEST_TG_CHAT_ID =
USER_ID =
[vercel]
VERCEL_APP_URL =
Run the script with the desired mode (NEW
or UPDATE
) to either track new token balance changes or update existing data.
python token_balance_tracker.py --mode NEW
--mode
: Specifies the mode of operation. Options areNEW
(to output only new tokens) orUPDATE
(to output all changes).
The script integrates with Telegram, sending notifications to your Telegram bot with details on token balance updates. Ensure your bot is correctly set up and the bot token is provided in the configuration.