- 📖 Table of Contents
- 🔗 Links
- 📂 Features
- 📚 Term Definitions
- 🔧 Prerequisites
- ⚙️ Configuration
- 🛠️ Installation
- 📈 Custom Strategies
- 💸 Donations
⚠️ Disclaimer
- Custom strategies: Create your own trading strategies and use them with SolTrade. Customize parameters like
stoploss,trailing_stoploss,takeprofit, etc to fit your needs - Multiple token trading: Instead of waiting for one token to meet trading conditions, you can analyze multiple tokens to increase trade chances
- Primary Mint: The token you want to trade with, usually a stablecoin like USDC
- Secondary Mint: The token you want to trade for, like SOL or any other Solana token
- Trading Intervals: The time interval between each technical analysis (whether current conditions are fit to trade), in minutes
- Price Update Interval: The time interval between each price update, in seconds
- Max Slippage: The maximum percentage difference between the expected price and the executed price when making a trade
- Strategy: The trading strategy you want to use, like
defaultor your own custom strategy
- Sign up for a CryptoCompare API key
- Sign up for a free Jupiter API key (required for Ultra Swap API only)
- Create a new wallet on Jupiter Wallet Phantom or any other Solana wallet solely for SolTrade
- Deposit however much of the primary token you want to trade with into your wallet and at least
~0.2 $SOLto cover transaction fees
- Make a copy of the
config.json.samplefile and rename it toconfig.json - Fill in / edit the following parameters in the
config.jsonfile or leave them default:Parameter Description Default api_keyYour CryptoCompare API key Nulljupiter_api_keyYour Jupiter API key from portal.jup.ag Nullprivate_keyYour Solana wallet private key Nullrpc_httpsHTTPS endpoint of your RPC (for balance checks & token info) https://api.mainnet-beta.solana.comjup_apiJupiter Ultra API endpoint https://api.jup.ag/ultra/v1primary_mintToken address of main currency EPjF..vprimary_mint_symbolToken symbol of main token USDCsecondary_mintsToken adress of each custom token(s) seperated by ,in a list[][So11..2]secondary_mint_symbolsToken symbol of custom token(s) seperated by ,in a list[][SOL]price_update_secondsSecond-based time interval between token price updates 60trading_interval_minutesMinute-based time interval for technical analysis 1max_slippageMaximum slippage % in BPS 50strategyThe strategy you want to trade with default
- Install Microsoft Visual C++ Build Tools from here
- Install TA-Lib from here
- Install UV:
- Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" - Linux / macOS:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Windows:
- Navigate over to the project root directory and run
main.py:uv run main.py
Note
{Your Strategy Name} is just a placeholder for your strategy name. Replace it with your actual strategy name without the {}.
- Create a new Python file in the
strategiesdirectory named{Your Strategy Name}_strategy.py - Create a class named
{Your Strategy Name}Strategy(all one word with the first letter being a capital letter) that inherits from theBaseStrategyclass - Create a
__init__method that takes in the following parameters:def __init__(self, df: pd.DataFrame): self.df = df self.stoploss = self.takeprofit = self.trailing_stoploss = self.trailing_stoploss_target = - Create a
apply_strategymethod that is called by the bot to apply the strategy:def apply_strategy(self): if config().strategy == "{Your Strategy Name}": # Your strategy logic here - Then, change the config
strategyparameter to{Your Strategy Name} - Lastly, feel free to make a pull request to add your strategy to the main project
Similar to the original project, SolTrade does not currently include a platform fee and will remain open-source forever. However, if you would like to support the project, you can donate to the following Solana wallet address:
22gwSXc7mvp6UZwgDouhQuJ5AmHN3oxLNGULkARmT3PV
I am not responsible for any losses you may incur while using this software. Use at your own risk.
