Skip to the content.

πŸ”—doc

Main Features

Credits

Installation πŸ› οΈ

  1. git clone https://github.com/outsmartchad/solana-trading-cli.git
  2. cd solana-memecoin-cli
  3. nvm install v22.2.0
  4. nvm use v22.2.0
  5. npm install
  6. node help.js (to see commands or read cli_doc.txt file)
  7. also see the command examples in examples/

Prerequisites 🚨

  1. we have added a .env.copy file in src/helpers/.env.copy for you to follow and paste your keys to the code (specify the custom jito fee if you need).
  2. Add your mainnet wallet secret key(must), devnet wallet secret key (optional), RPC endpoint(must) and shyft api key(optional)
  3. rename the .env.copy file to .env

Features βœ…:

Developer CLI:

Trader CLI:

Features in Development 🚧:

Commands </> (Please see the command examples in examples/ to get start~)

payer options is by default use the private key in .env file, but you can also specify the path to the secret key if you want to use another wallet

  1. Specify the token symbol, name, mint keypair(optional, will help u to generate), supply, decimals, path to metadata json file, path to image file, the cluster you want to use, and the file type(png, jpg, jpeg).
node create --payer <PATH_TO_SECRET_KEY> --symbol <TOKEN_SYMBOL> --token_name <TOKEN_NAME> --mint <PATH_TO_MINT_KEYPAIR> --supply <SUPPLY_OF_TOKEN> --decimals <DECIMALS> --metadata <PATH_METADATA_JSON> --image <PATH_TO_IMAGE> --cluster <CLUSTER> --priority-fee <PRIORITY_FEE> --file_type <FILE_TYPE>
  1. Specify the token address, the percentage of the token you want to burn and the cluster you want to use.
node burn --payer <PATH_TO_SECRET_KEY> --token_address <ADDRESS_TOKEN> --percentage <BURN_PERCENTAGE> --cluster <CLUSTER>
  1. Specify the token address and the cluster you want to use.
node revoke_authority --payer <PATH_TO_SECRET_KEY> --mint_address <ADDRESS_TOKEN> --cluster <CLUSTER> --mint --freeze
  1. Specify the token address you want to query and the cluster for boosting the volume of the token.
node boost_volume --token_address <TOKEN_ADDRESS> --payer <PATH_TO_SECRET_KEY> --cluster <CLUSTER> --sol_per_order <SOL_PER_ORDER>

  1. Specify the token address, the amount of Sol you want to swap, and the cluster you want to use.
node buy --payer <PATH_TO_SECRET_KEY> --token_address <ADDRESS_TOKEN> --sol <NUMBER_OF_SOL> --cluster <CLUSTER>
  1. Specify the token address, the percentage of the token you want to sell, and the cluster you want to use.
node sell --payer <PATH_TO_SECRET_KEY> --token_address <ADDRESS_TOKEN> --percentage <SELL_PERCENTAGE> --cluster <CLUSTER>
  1. Specify the token address, the pool id(optional, will help to find the pool with the most liquidity using the given token address), the amount of Sol you want to add, and the cluster you want to use.
node add_pool --payer <PATH_WALLET> --token_address <ADDRESS_TOKEN> --pool_id <POOL_ID> --sol <NUMBER_OF_SOL> --cluster <CLUSTER> --priority_fee <PRIORITY_FEE>
  1. Specify the token address, the percentage of the LP token you want to remove(1=1%), and the cluster you want to use.
node remove_pool --payer <PATH_PAYER> --token_address <TOKEN_ADDRESS> --percentage <LP_TOKEN_PERCENTAGE> --cluster <CLUSTER>
  1. wrap your sol to wsol.
node wrap_sol.js --size <size>
  1. unwrap your wsol to sol.
    node unwrap_sol.js
    

Pump.fun commands

  1. Specify the path to your mint keypair, the amount of Sol you want to buy, the name of the token, the symbol of the token, the description of the token, the telegram link, the twitter link, the website link, and the image file path.
node createAndBuy --pathToMintKeypair <PATH_TO_MINT_KEYPAIR> --sol <NUMBER_OF_SOL> --name <TOKEN_NAME> --symbol <TOKEN_SYMBOL> --description <TOKEN_DESCRIPTION> --telegram <TELEGRAM_LINK> --twitter <TWITTER_LINK> --website <WEBSITE_LINK> --file <IMAGE_FILE_PATH>
  1. Specify the token address, the sol you want to buy
node buy --token_address <ADDRESS_TOKEN> --sol <NUMBER_OF_SOL>
  1. Specify the token address, the percentage of the token you want to sell
node sell --token_address <ADDRESS_TOKEN> --percentage <SELL_PERCENTAGE>

Code Usage </>

Token:

Trading:

Transactions:

Pool:

Helper methods:

Project Structure

.solana-memecoin-cli
β”œβ”€β”€ data
|   β”œβ”€β”€ Image_file                     # store image file (jpeg, jpg,...)
|   β”œβ”€β”€ metadata_file                  # store .json file about the token metadata
|   β”œβ”€β”€ payer_keypair                  # store wallet keypair .json
|   └── token_keypair                  # store token keypair .json
β”œβ”€β”€ examples (Screenshots of Commands) # all screenshot to show how we use the command line tool
|   β”œβ”€β”€ add_liquidity                  # see how to add liquidity to a pool on Raydium
|   β”œβ”€β”€ burn_token                     # see how to burn a token with WSOL using Raydium swap
|   β”œβ”€β”€ create_token                   # see how to create a SPL token on mainnet or devnet
|   β”œβ”€β”€ buy_token                      # buy a token using raydium with both jito bundles and priority fees
|   β”œβ”€β”€ create_token                   # create a token with 0% extra fees on solana (mainnet or devnet)
|   β”œβ”€β”€ remove_liquidity               # remove some liquidity from a pool on Raydium
|   β”œβ”€β”€ boost_volume                   # boost the volume of a token on raydium
|   β”œβ”€β”€ pump_createAndInitialBuy       # create and initial buy token on pump.fun
|   β”œβ”€β”€ pump_buy                       # buy token on pump.fun
|   β”œβ”€β”€ pump_sell                      # sell token on pump.fun
|   └── sell_token                     # sell the token with a percentage using Raydium swap
└── src
    β”œβ”€β”€ helpers
    β”‚   β”œβ”€β”€ .env
    β”‚   β”œβ”€β”€ .env.copy
    β”‚   β”œβ”€β”€ check_balance.js
    β”‚   β”œβ”€β”€ config.js
    β”‚   β”œβ”€β”€ unwrap_sol.js
    β”‚   β”œβ”€β”€ util.js
    β”‚   └── wrap_sol.js
    β”œβ”€β”€ Trading_dev
    β”‚   β”œβ”€β”€ dex
    β”‚   β”‚   β”œβ”€β”€ meteora
    β”‚   β”‚   β”‚   β”œβ”€β”€ swap.js
    β”‚   β”‚   β”‚   β”œβ”€β”€ buy.js
    β”‚   β”‚   β”‚   β”œβ”€β”€ sell.js
    β”‚   β”‚   β”‚   β”œβ”€β”€ constants.js
    β”‚   β”‚   β”‚   β”œβ”€β”€ fetch-pool.js
    β”‚   β”‚   β”‚   β”œβ”€β”€ fetch-price.js
    β”‚   β”‚   β”‚   └── idl.js
    β”‚   β”‚   └── orca
    β”‚   β”‚       └── #same as meteora/raydium
    β”‚   └── memecoin_trading_strategies/
    β”‚       β”œβ”€β”€ copy-trading/
    β”‚       β”‚   β”œβ”€β”€ copy-buy.js
    β”‚       β”‚   β”œβ”€β”€ copy-sell.js
    β”‚       β”‚   β”œβ”€β”€ copy-trade.js
    β”‚       β”‚   └── grpc-copy-bot/
    β”‚       └── tp_sl
    β”‚           β”œβ”€β”€ stop-loss.js
    β”‚           └── take-profit.js
    β”œβ”€β”€ Memecoin_dev
    β”‚   β”œβ”€β”€ bundled_launcher
    β”‚   β”œβ”€β”€ market-making_dev/
    β”‚   β”‚   └── boost_volume.js
    β”‚   └── sniping_dev
    β”‚       β”œβ”€β”€ grpc_pump_sniper/
    β”‚       └── grpc_raydium_sniper/
    β”œβ”€β”€ Transactions
    β”‚   β”œβ”€β”€ bloXroute_tips_tx_executor.js
    β”‚   β”œβ”€β”€ jito_tips_tx_executor.js
    β”‚   └── simple_tx_executor.js
    β”œβ”€β”€ Token
    β”‚   β”œβ”€β”€ zk-compression/
    β”‚   β”œβ”€β”€ burn.js
    β”‚   β”œβ”€β”€ create.js
    β”‚   └── revoke_authority.js
    β”œβ”€β”€ raydium
    β”‚   β”œβ”€β”€ Pool/
    β”‚   β”‚   β”œβ”€β”€ add_pool.js
    β”‚   β”‚   β”œβ”€β”€ create_pool.js
    β”‚   β”‚   β”œβ”€β”€ fetch_pool.js
    β”‚   β”‚   β”œβ”€β”€ formatAmmKeysById.js
    β”‚   β”‚   β”œβ”€β”€ query_pool.js
    β”‚   β”‚   β”œβ”€β”€ remove_pool.js
    β”‚   β”‚   └── swap.js
    β”‚   β”œβ”€β”€ token-filters
    β”‚   β”‚   β”œβ”€β”€ lp-burn.js
    β”‚   β”‚   β”œβ”€β”€ maker-count.js
    β”‚   β”‚   β”œβ”€β”€ marketcap.js
    β”‚   β”‚   β”œβ”€β”€ pool-sol.js
    β”‚   β”‚   β”œβ”€β”€ tx-count.js
    β”‚   β”‚   └── volume.js
    β”‚   β”œβ”€β”€ buy.js
    β”‚   β”œβ”€β”€ constants.js
    β”‚   β”œβ”€β”€ fetch-price.js
    β”‚   β”œβ”€β”€ raydium_config.js
    β”‚   └── sell.js
    β”œβ”€β”€ jupiter
    β”‚   β”œβ”€β”€ swap/
    β”‚   β”‚   β”œβ”€β”€ buy-helper.js
    β”‚   β”‚   β”œβ”€β”€ sell-helper.js
    β”‚   β”‚   └── swap-helper.js
    β”‚   β”œβ”€β”€ dca.js
    β”‚   └── limit-order.js
    └── pumpfunsdk
        β”œβ”€β”€ pump-keypair/
        └── pumpdotfun-sdk
            β”œβ”€β”€ images/
            └── src
                β”œβ”€β”€ IDL/
                β”œβ”€β”€ pump-events-listener/
                β”‚   └── listeners.js
                β”œβ”€β”€ amm.js
                β”œβ”€β”€ buy.js
                β”œβ”€β”€ createAndBuy.js
                β”œβ”€β”€ pumpfun.js
                β”œβ”€β”€ sell.js
                β”œβ”€β”€ tools.js
                └── util.js

Contributing

Apply Latest Changes from remote repo

If you think this project is useful, please give us a star🌟, it will help us a lot.

Discord channel: https://discord.gg/hFhQeBCqWX

It is a work in progress, if you have any suggestions or any problems, please let us know!

Stay tuned for the updates.πŸ€–_**