A rust script that interacts with the Pump API to place trades on the Solana blockchain.
cargo run -- --trade_type <buy|sell> --mint <token_mint_address> --amount <amount_in_sol> --slippage <desired_slippage> --priority_fee <value_in_sol> --private_key <wallet_private_key> --interval <seconds_between_trades> --frequency <number_of_trades>
--trade_type
: Buy or sell (required)--mint
: Token mint address (required)--amount
: Amount in SOL, if buying, or of tokens if selling (required)--slippage
: Desired slippage (required)--priority_fee
: Value in SOL (required)--private_key
: Wallet private key (required)--interval
: Interval in seconds between trades (required)--frequency
: Number of times to place the trade (required)
cargo run -- --trade_type buy --mint 1234567890abcdef --amount 1.0 --slippage 10 --priority_fee 0.01 --private_key abcdef1234567890 --interval 60 --frequency 5
This will place 5 buy trades with the specified parameters, waiting 60 seconds between each trade.
This bot uses the pumpapi.fun
API to place trades. You may need to modify the url
variable in the code to point to a different API endpoint.
To build and run the bot, use the following commands:
cargo build
cargo run -- [options]
Replace [options]
with the desired command-line options.