Skip to content

KaitouKid1412/wallet-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wallet Tracker Bot

Overview

This is a Rust-based bot that tracks specific Solana wallets for trading activity on the Raydium DEX. The bot monitors transactions, identifies net token purchases, and executes trades when a specified threshold is met.

Features

  • Monitors specified Solana wallets for trading activity
  • Identifies net token purchases/sales based on transaction history
  • Executes trades on Raydium DEX when conditions are met
  • Rate-limited API calls to prevent request throttling

Installation Guide

1. Install Rust

Ensure Rust is installed on your system. If Rust is not installed, use:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then restart your terminal and verify installation:

rustc --version

2. Clone the Repository

git clone https://github.com/your-repo/wallet-tracker.git
cd wallet-tracker

3. Install Dependencies

cargo build

4. Set Up Environment Variables

Copy the .env.sample file and follow the instructions inside to configure your environment.

5. Set Up Wallet Credentials

For the bot to place trades on behalf of a wallet, we have to create a wallet.json file in the root directory with the private key array of the wallet. To create a new Solana wallet using the Solana CLI:

solana-keygen new --outfile wallet.json

If you have an existing private key and want to use it:

  1. Open wallet.json in a text editor.
  2. Replace its content with your private key array (found in solana-keygen output or other Solana wallets).
  3. Ensure wallet.json is stored safely in the root directory (alongside Cargo.toml).

Converting a Private Key from a Web Extension Wallet

If you have copied your private key from a web extension wallet (e.g., Phantom, Solflare), it is usually in a base58 format. To convert it into a valid JSON array for wallet.json, run the following command in a Solana CLI-supported environment:

echo "your_base58_private_key_here" | solana-keygen recover prompt://?keypair=ask

This will generate a valid private key array that you can copy into wallet.json.

6. Configure Wallets to Track

Modify src/config.rs to track specific wallets:

pub static ref WALLET_ADDRESSES: Vec<String> = vec![
    "YourWalletAddress1".to_string(),
    "YourWalletAddress2".to_string(),
];

Running the Bot

Compile the Project

cargo build

Run the Bot

cargo run

How the Bot Works

  1. Fetches recent transactions for the tracked wallets.
  2. Filters transactions related to Raydium DEX.
  3. Determines net buy/sell activity for each token.
  4. If a token's net buy count reaches the threshold (K), the bot executes a buy order.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages