-
Open the terminal and clone the repo
git clone https://github.com/Deezzir/SolanaBot.git
-
Change the directory to the cloned repo
cd SolanaBot -
Install Node.js and npm if you haven't already, and install the dependencies
A good way to install Node.js and NPM is to use npm DOCS
npm install
-
Create a
.envfile in the root directory and add the followingHELIUS_API_KEY=
-
Build the project
npm run build
-
Run the project
> node dist/bot.js -h Usage: bot [options] [command] Solana Bot CLI Options: -V, --version output the version number -k, --keys <path> Path to the CSV file with the wallets (default: keys.csv) -h, --help display help for command Commands: snipe|sn [options] Start the snipe bot volume|v [options] Generate the volume for a token generate|g [options] <count> <name> Generate the wallets. Optionally, a file with secret keys (separated by newline) can be provided to convert them to keypairs. balance|b Get the balance of the wallets wallet-pnl|pnl <address> Get the PNL of the wallet token-balance|tb <mint> Get the total balance of a token of the wallets warmup|w [options] Warmup the wallets with the tokens collect|c [options] <receiver> Collect all the SOL from the wallets to the provided address buy-token-once|bto [options] <amount> <mint> <buyer_index> Buy the token once with the provided amount sell-token-once|sto [options] <mint> <seller_index> Sell the token once with the provided amount buy-token|bt [options] <mint> Buy the token by the mint from the wallets sell-token|st [options] <mint> Sell all the token by the mint from the wallets transfer|tr <amount> <receiver> <sender_index> Transfer SOL from the specified keypair to the receiver token-collect|tc [options] <mint> <receiver> Collect all the token by the mint from the wallets to the provided address fund|f [options] <amount> <sender_index> Fund the wallets with SOL using the provided wallet create-metadata|cm <json_path> <image_path> Upload the metadata of the token using the provided JSON file and image promote|pr [options] <count> <cid> <creator_index> Create promotion tokens using the provided wallet create-token|ct [options] <cid> <creator_index> Create a token clean|cl Clean the wallets drop|dr [options] <mint> <drop_index> Do the drop benchmark|bh [options] <requests> Benchmark the RPC connection help [command] display help for command
⚠️ Help is available for each command. Usenode dist/bot.js <command> -hto see the options for that command.
The snipe subcommand optionally accepts a JSON config with the following fields:
thread_cnt(number) – Number of threads (≤keys_cnt)spend_limit(number) – Max total spend (>SNIPE_MIN_MCAP)start_buy(number) – Initial buy amount (>SNIPE_MIN_BUY, <spend_limit)- Token must be identified via:
mint(string, valid pubkey) ORtoken_name(string) ANDtoken_ticker(string)
⚠️ mintandtoken_name/token_tickerare mutually exclusive
| Field | Type | Default | Notes |
|---|---|---|---|
buy_interval |
number |
0 |
Required if is_buy_once = false |
mcap_threshold |
number |
Infinity |
Must be ≥ SNIPE_MIN_MCAP |
start_interval |
number |
0 |
Must be ≥ 0 |
is_buy_once |
boolean |
false |
If true, buy_interval must not be set |
sell_slippage |
number |
SNIPE_SELL_SLIPPAGE |
0.0 – TRADE_MAX_SLIPPAGE |
buy_slippage |
number |
SNIPE_BUY_SLIPPAGE |
0.0 – TRADE_MAX_SLIPPAGE |
priority_level |
string |
Default |
See Priority Levels below |
protection_tip |
number |
undefined |
Must be ≥ 0.0 |
export enum PriorityLevel {
MIN = 'Min',
LOW = 'Low',
MEDIUM = 'Medium',
HIGH = 'High',
VERY_HIGH = 'VeryHigh',
UNSAFE_MAX = 'UnsafeMax',
DEFAULT = 'Default'
}Set priority_level to control transaction fees.
{
"thread_cnt": 3,
"spend_limit": 100,
"start_buy": 10,
"mint": "So11111111111111111111111111111111111111112",
"is_buy_once": false,
"buy_interval": 5,
"priority_level": "MEDIUM"
}The create-metadata subcommand accepts a JSON config with the following fields:
{
"name": "string",
"symbol": "string",
"description": "string",
"image": "string | undefined",
"showName": "boolean | undefined",
"createdOn": "string | undefined",
"twitter": "string | undefined",
"telegram": "string | undefined",
"website": "string | undefined",
}name(string) – Name of the tokensymbol(string) – Symbol of the tokendescription(string) – Description of the token
⚠️ imageis optional, because it will be uploaded separately using thecreate-metadatacommand and populated in the metadata JSON file uploaded to IPFS, check theimage_pathargument in the command.