Simple volume bot for SPL token on Solana DEx — How to use the tool
Introduction
This tool serves as a platform for creating a swap API, allowing seamless execution of swaps on the Solana DEx using the Jupiter SDK. Users can then automate this API through scheduling (cron-job), effectively managing the volume for their token. For instance, setting up an API to execute a transaction worth $100 and scheduling it to run every 10 minutes (6 times hourly) can result in significant daily volume for your token. Assuming an 80% success rate, the total volume generated daily would be calculated as follows: $100 x 6 x 24 x 80% = $11,520
It’s essential to set up the API scheduling on your own server or leverage a cronjob service for efficient operation.
Utilize the tool to set up your API
Step 1: Connect your Solana wallet
Visit https://jupiter-swap-api.vercel.app/ and connect your Solana wallet.
Step 2: Create an entry
Click on “Create entry”.
Step 3: Fill the Pool Detail
- Entry name: Choose a descriptive name for your entry, including information like token pair, volume, and swap mode (for example: “LMF/USDC | $100 | sell only”)
- Base Token Mint Address: This refers to the data of your base token. In the context of a token pair like LMF/USDC, LMF is the base token and USDC is the quote token. Fill out the mint address and decimal for the base token. You can find this information on Solscan.
For example:
- Token: LMF
- Mint Address: LMFzmYL6y1FX8HsEmZ6yNKNzercBmtmpg2ZoLwuUboU
- Decimal: 9
- Quote Token Mint Address: This refers to the data of your quote token. Fill out the mint address and decimal for the quote token.
For example:
- Token: USDC
- Mint Address: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
- Decimal: 6
- Volume Each Order (Min — Max): This parameter dictates the range of volume for each transaction, represented in the quote value. For instance, if you select the pair LMF/USDC with a minimum and maximum value of 50 and 100 respectively, each transaction will randomly select a volume between 50 USDC and 100 USDC.
- Mode: There are three available options
Buy: In this mode, the API will exclusively execute buy orders.
Sell: Similarly, this mode restricts the API to only execute sell orders.
Random: When selected, each transaction could be either a sell or buy order, randomly chosen with equal probability.
- Custom RPC: By default, this option is disabled, meaning the API will utilize the default Solana RPC to execute transactions. However, if you wish to use your custom API, you can enable this option and input your RPC data. This can be particularly useful if you experience issues with default RPC or prefer to use a specific RPC provider for transaction execution.
Step 4: Fill the Wallet List
- Upon each API call, a wallet from the list will be randomly selected to execute the transaction. It’s necessary to import at least one wallet into the list to create your swap entry. Import your wallets by inputting their private keys.
- It’s crucial to consider security implications when importing wallets. Please use wallets that are not of critical importance for executing transactions. There are potential risks associated with exposing private keys when using this tool, as it has not undergone auditing.
Step 5: Click “Create” to Finish the Process
After clicking “Create,” you’ll observe a new entry in your entry list. Each entry will be accompanied by an API endpoint (URL). To execute a swap, simply call this endpoint.
The easiest method to utilize the API is by copying the URL and pasting it into your browser. However, for a more comprehensive volume bot setup, you’ll require a cron-job tool to schedule API calls at regular intervals. This ensures consistent execution of transactions over time.
Cronjob Tool to Schedule the API Calling
Once you have obtained the swap API endpoint, there are several options available to schedule its execution:
- Build Your Own Cron-Job Service: This is considered best practice, although it requires significant effort and time to set up.
- Utilize a Third-Party Service: Alternatively, you can opt for a third-party service to schedule API calls. One such service is cron-job.org.
Here’s a step-by-step guide on how to schedule your swap API on cron-job.org:
Step 1: Sign up for an account at https://console.cron-job.org/signup and remember to verify your email.
Step 2: Log in to the site using your newly created account credentials.
Step 3: Navigate to the dashboard (https://console.cron-job.org/dashboard) and click on “CREATE CRONJOB”.
Step 4: In the “Common” section, fill out the following information:
- Title: Provide an informative title for your cronjob.
- URL: Input your API endpoint (copy it from your swap entry and paste it here).
- Execution Schedule: Set the frequency of API calls. You can start with scheduling it to run every 15 minutes. For more complex strategies, explore other scheduling options.
- Click “CREATE” to finalize the setup.
Step 5: Verify that your cronjob is enabled in your Jobs list (https://console.cron-job.org/jobs).
Tips & Conclusion
If you wish to increase the volume further, here are some additional tips:
- Increase Volume per Swap: Modify the swap API to increase the volume per transaction.
- Increase Frequency of Swaps: Reduce the gap time between two consecutive API calls. For instance, calling the API every minute can maximize volume generation.
- Create Multiple Cronjobs: Utilize the same API or integrate another API to create multiple cronjobs, thereby enhancing volume throughput.
By following these steps and tips, you can effectively schedule your swap API calls and optimize volume generation for your token on the Solana DEx.