Axiom Copy Trader is a simple Python bot that enables copy trading of wallets using the Axiom.trade WebSocket. It listens for buy/sell signals and automatically trades Solana memecoins/tokens accordingly.
- This project is not affiliated with Axiom.trade, and they do not endorse or support it in any way.
- This is not an official product of Axiom.trade.
- The bot has not been extensively tested, and I do not take responsibility for any losses incurred while using it.
- I do not recommend putting money on it. Use it at your own risk.
- The Raydium BUY transaction is disabled by default because it has not been tested yet. See below for enabling it.
If you wish to create an account on Axiom.trade, you can use my referral link: Sign up on Axiom.trade
-
Clone this repository:
git clone https://github.com/calvet/axiom_copy_trader.git cd axiom_copy_trader
-
Install required dependencies:
pip install -r requirements.txt
-
Set up your environment variables by creating a
.env
file with the following format:RPC_URL_PUMP_FUN=https://api.mainnet-beta.solana.com RPC_URL_RAYDIUM=https://api.mainnet-beta.solana.com WALLET_PUBLIC_KEY=your_public_key_here WALLET_PRIVATE_KEY=your_private_key_here TRACK_WALLETS=4ugZWiyAYH7auVajf3axVykxTLsc13cx9oHCzETUjc21 SOL_IN=0.01 MAX_SOL_SPEND=0.1 MAX_SLIPPAGE=35 ALLOW_REBUY=false MAX_BUY_ATTEMPTS=1 DEBUG=false # Discord Bot Konfiguration DISCORD_TOKEN=your_discord_bot_token_here DISCORD_CHANNEL_ID=your_channel_id_here DISCORD_NOTIFICATIONS=true # Telegram Bot Konfiguration TELEGRAM_TOKEN=your_telegram_bot_token_here TELEGRAM_CHAT_ID=your_chat_id_here TELEGRAM_NOTIFICATIONS=false
- RPC_URL_PUMP_FUN: The RPC URL used for transactions on Pump.fun.
- RPC_URL_RAYDIUM: The RPC URL used for transactions on Raydium.
- WALLET_PUBLIC_KEY: Your Solana wallet public key.
- WALLET_PRIVATE_KEY: Your private key in Base58 format (can be extracted from Phantom Wallet - Guide).
- TRACK_WALLETS: Wallets to track for copy trading. Multiple wallets can be separated using
|
(e.g.,wallet1|wallet2|wallet3
). - SOL_IN: The fixed amount of SOL to use for each buy order.
- MAX_SOL_SPEND: The maximum amount of SOL that can be spent while the bot is running. If set to
0
, there is no limit. - MAX_SLIPPAGE: The maximum slippage allowed for transactions before they fail.
- ALLOW_REBUY: Defines whether the bot is allowed to rebuy the same token (
true
orfalse
). - MAX_BUY_ATTEMPTS: The maximum number of times the bot will retry a failed buy transaction before giving up.
- DEBUG: If set to
true
, it enables detailed logs, including packet logs from WebSockets, for debugging purposes. - DISCORD_TOKEN: Your Discord Bot Token (see Discord Bot Setup section).
- DISCORD_CHANNEL_ID: The ID of the Discord channel where notifications will be sent.
- DISCORD_NOTIFICATIONS: Set to
true
to enable Discord notifications,false
to disable them. - TELEGRAM_TOKEN: Your Telegram Bot Token (see Telegram Bot Setup section).
- TELEGRAM_CHAT_ID: Your Telegram Chat ID where notifications will be sent.
- TELEGRAM_NOTIFICATIONS: Set to
true
to enable Telegram notifications,false
to disable them.
-
Obtain your authentication token: You can obtain the authentication token by opening the Axiom.trade website in Google Chrome, going to the Network tab in Developer Tools (F12 or Ctrl+Shift+I), and finding the first request that returns the token.
-
Add your authentication token to
cookie.txt
:auth-refresh-token=your_refresh_token_here; auth-access-token=your_access_token_here;
-
Create a Discord Bot:
- Go to the Discord Developer Portal
- Click "New Application" and give it a name
- Go to the "Bot" tab and click "Add Bot"
- Under the bot settings, enable "Message Content Intent"
- Copy the bot token and add it to your
.env
file asDISCORD_TOKEN
-
Invite the Bot to Your Server:
- Go to the "OAuth2" tab in the Developer Portal
- Select "bot" under "Scopes"
- Select the permissions you want to give the bot (at minimum: "Send Messages", "Read Message History")
- Copy the generated URL and open it in your browser to invite the bot to your server
-
Get the Channel ID:
- Enable Developer Mode in Discord (User Settings > Advanced > Developer Mode)
- Right-click on the channel where you want to receive notifications and select "Copy ID"
- Add this ID to your
.env
file asDISCORD_CHANNEL_ID
-
Create a Telegram Bot:
- Open Telegram and search for @BotFather
- Start a chat with BotFather and send the command
/newbot
- Follow the instructions to create your bot
- BotFather will give you a token - add this to your
.env
file asTELEGRAM_TOKEN
-
Get Your Chat ID:
- Start a chat with your new bot
- Send a message to the bot
- Open this URL in your browser (replace
YOUR_BOT_TOKEN
with your actual token):https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates
- Look for the "chat" object in the response and find the "id" field
- Add this ID to your
.env
file asTELEGRAM_CHAT_ID
-
Enable Telegram Notifications:
- Set
TELEGRAM_NOTIFICATIONS=true
in your.env
file
- Set
You can choose to use Discord, Telegram, or both for notifications:
- Discord Only: Set
DISCORD_NOTIFICATIONS=true
andTELEGRAM_NOTIFICATIONS=false
- Telegram Only: Set
DISCORD_NOTIFICATIONS=false
andTELEGRAM_NOTIFICATIONS=true
- Both: Set both to
true
By default, buy transactions for tokens on Raydium are disabled because they have not been tested deeply. If you want to enable it, uncomment the following line in the code at line 433:
# 'buy': lambda: sell_token('ra', token_name, token_address, max_slippage),
Run the bot with:
python main.py
-
Transfer all project files to your VPS.
-
Make the installation script executable:
chmod +x install_service.sh
-
Run the installation script as root:
sudo ./install_service.sh
-
The script will:
- Configure the service with your current user and directory
- Install the service to start automatically on boot
- Start the service immediately
-
Useful service management commands:
# Check service status sudo systemctl status axiom_trade_bot.service # Stop the service sudo systemctl stop axiom_trade_bot.service # Start the service sudo systemctl start axiom_trade_bot.service # Restart the service sudo systemctl restart axiom_trade_bot.service # View logs sudo journalctl -u axiom_trade_bot.service
This project was made possible thanks to:
These libraries provide the necessary contract functionality for Pump.fun and Raydium.
If you find this project useful and want to support future development, feel free to donate to my Solana wallet:
4ugZWiyAYH7auVajf3axVykxTLsc13cx9oHCzETUjc21
Any contribution is greatly appreciated!