Alpha Evm Dex Bot
🤖 Automated multifunctional DeFi trading bot for the KCC ecosystem. Sniping, Front run, Limit orders, Stop Loss, and more...
Install / Use
npx skills add gweidart/alpha-evm-dex-botInstalls into whichever agent you are using.
README
EVM Dex Bot
<center><a href="https://ibb.co/XFXq7RT"><img src="https://i.ibb.co/XFXq7RT/bot-icon-1.png" alt="bot-icon-1" border="0"></a></center>
-
automated trading bot for the KCC DeFi ecosystem, however it is compatible with several other EVM chains.
-
has the ability to scan multiple trading pairs on a Dex, grab the price in realtime and make automated trading decisions based on user settings.
-
uses web3.py and a custom wrapper to DIRECTLY interact with the smart contracts of the exchange. Thus avoiding slow web interfaces and Metamask, enabling AlphaBot to have the fastest throughput possible.
-
All of this is done LOCALLY on your machine. AlphatBot NEVER has access to read or store your private keys.
-
Private keys are encrypted with a password during initial bot startup.
Features
- Dex Limit Orders
- Dex Stop Loss
- Dex trailing stop loss
- real time trade notifications via Apprise. See below for more info!
- Mempool Sniping (AlphaBot is fast enough to snipe liquidity in the same block)
- Pink Sale Sniping
- Accumulation Mode
- Take profit
- trailing take profit
- multi pair / multi wallet trading
- multi pair monitoring
- Grid trading
- Automated Rug Doc
- Front run
- Liquidity check / monitoring
- Private key encryption
- Supports EIP 1559
- Custom exchange wrappers
- Trade any pair combination
- Supports fully automated strategies (requires advanced configuration)
Supported Dex:
- AlphaSwap
- Kuswap
- PanCake Swap
- Pink Swap
- Bakery Swap
- BiSwap
- Ape Swap
- Trader Joe
- Pangolin
- Spooky Swap
- Spirit Swap
- Quick Swap
- UniSwap
- Various other Dexs on Harmony, Chronos, Metis
Fees:
AlphaBot does **NOT** and will **NEVER** charge its users trading fees.

Installation:
You can either simply run the precompiled .exe or run from source.
You will need to have the latest version of Python & Visual Studio installed.
If you would still like to run the bot from source please follow the instructions below 👇
Clone this repo:
git clone https://github.com/cusdt-LINK/alpha-kcc-dex-bot
Install requirements:
pip install -r requirements.txt
this will install all the packages needed to run AlphaBot.
Enable ANSI colors in terminal:
run the "EnableTerminalColors.bat" --> I highly suggest doing this. It makes reading the bot ui 10x easier. Certain bot actions are color coded.
Open Windows Command Prompt or Powershell (or Bash / Terminal on Linux / MacOs)
Navigate to the AlphaBot folder:
cd path\to\alphabot\folder
Run AlphaBot:
python alphabot.py
Configuration
settings.json
[
{
"ALPHAWALLETPRIVATEKEY": "do not enter it manually, open the bot : it will encrypt it",
"ALPHAWALLETADDRESS": "wallet address where you hold your ALPHA tokens",
"WALLETADDRESS": "wallet address you want to trade on : can be different from ALPHA wallet",
"PRIVATEKEY": "do not enter it manually, open the bot : it will encrypt it",
"WALLETADDRESS2": "null",
"PRIVATEKEY2": "null",
"WALLETADDRESS3": "null",
"PRIVATEKEY3": "null",
"WALLETADDRESS4": "null",
"PRIVATEKEY4": "null",
"WALLETADDRESS5": "null",
"PRIVATEKEY5": "null",
"USECUSTOMNODE": "false",
"CUSTOMNODE": "put your own node here",
"EXCHANGE": "kuswap",
"EXCHANGEVERSION": "2",
"PREAPPROVE": "true",
"UNLIMITEDSLIPPAGE": "false",
"PASSWORD_ON_CHANGE": "false",
"VERBOSE_PRICING": "true",
"SLOW_MODE": "false"
}
]
EXCHANGEVERSION:
Only applies to PancakeSwap. Otherwise just leave it alone.
ALPHAWALLETPRIVATEKEY / PRIVATEKEY:
Private key of the wallet holding your ALPHA tokens. & Private key of the wallet the bot will trade to / from.
( not the 12 words seed phrase)
USECUSTOMNODE:
Set to "true" if you want to use a custom node.
CUSTOMNODE:
If you want to use a custom node, enter here your node's address in http, wss, or IPC
example: (https://rpc-mainnet.kcc.network or wss://rpc-mainnet.kcc.network )
PREAPPROVE:
Tells the bot to preapprove tokens on startup or not.
ENCRYPTPRIVATEKEYS:
Will be set automatically when you initialize the bot for the first time.
UNLIMITEDSLIPPAGE:
Whethter or not you want the bot to completely bypass the slippage settings.
If TRUE the bot will buy at any slippage.
This can help avoid the "INSUFFICIENT_AMOUNT" error.
PASSWORD_ON_CHANGE:
Activate this option if you want the bot to ask your private key's password again when you update tokens.json
VERBOSE_PRICING:
Self explanatory.
Default setting is "true". If you set this to "false", the bot will only show lines on the screen when the price updates.
SLOW_MODE:
Changes how often the bot queries for price. If "true" the bot will check every 0.5s.
(If you are using a public node provider, consider using SLOW-MODE if you are getting rate limited).
tokens.json
[
{
"ENABLED": "true",
"SYMBOL": "ALPHA",
"ADDRESS": "0x0490c1076552ed3c91876ead9f6a547b389e69d4",
"KIND_OF_SWAP": "tokens",
"BUYAMOUNTINBASE": "0.5",
"BUYAMOUNTINTOKEN": "10",
"MAX_BASE_AMOUNT_PER_EXACT_TOKENS_TRANSACTION": "0.5",
"BUYPRICEINBASE": "10",
"SELLPRICEINBASE": "15",
"STOPLOSSPRICEINBASE": "8",
"SLIPPAGE": "25",
"MAXTOKENS": "100",
"MOONBAG": "0",
"RUGDOC_CHECK": "false",
"BUYAFTER_XXX_SECONDS": "0",
"WAIT_FOR_OPEN_TRADE": "false",
"MAX_FAILED_TRANSACTIONS_IN_A_ROW": "2",
"MAX_SUCCESS_TRANSACTIONS_IN_A_ROW": "null",
"MULTIPLEBUYS": "false",
"BUYCOUNT": "1",
"ALWAYS_CHECK_BALANCE": "false",
"LIQUIDITYCHECK": "false",
"LIQUIDITYAMOUNT": "100",
"LIQUIDITYINNATIVETOKEN": "true",
"USECUSTOMBASEPAIR": "false",
"BASESYMBOL": "WKCS",
"BASEADDRESS": "0x4446fc4eb47f2f6586f9faab68b3498f86c07521",
"SELLAMOUNTINTOKENS": "ALL",
"HASFEES": "false",
"GAS": "BOOST",
"BOOSTPERCENT": "1",
"GASLIMIT": "1000000",
"GASPRIORITY_FOR_ETH_ONLY": "1.5"
}
]
[========]
ENABLED:
Enable / Disable trading
(if false, the bot won't try to buy tokens)
SYMBOL:
Ticker of the token you want to trade.
(example: ALPHA)
ADDRESS:
Contract address of the token you want to trade.
KIND_OF_SWAP:
1/ "KIND_OF_SWAP": "base" --> you want to swap with an amount of Base tokens
(example : I want to buy 1 KCS of ALPHA token)
2/ "KIND_OF_SWAP": "tokens" --> you want to swap an exact amount of tokens
(example : I want to buy 50 ALPHA tokens)
BUYAMOUNTINBASE:
(used with "KIND_OF_SWAP": "base")
Enter the amount of tokens in the base symbol that you want the bot to place a buy order with.
BUYAMOUNTINTOKEN:
(used with "KIND_OF_SWAP": "tokens")
Enter the amount of tokens that you want the bot to buy
MAX_BASE_AMOUNT_PER_EXACT_TOKENS_TRANSACTION:
(used with "KIND_OF_SWAP": "tokens")
Enter the maximum amount of KCS / ETH / FTM... that you want the bot to use, if you're swapping per tokens.
(This option avoids you spending too much to buy the tokens you're trading for).
BUYPRICEINBASE:
(used with "KIND_OF_SWAP": "base")
Buy price of 1 token in the base symbol. (If the price of 1 token is < or = to this price, the bot will place a buy order.
If you want the bot to never buy, set BUYPRICEINBASE = 0
SELLPRICEINBASE:
Sell price of 1 token in the base symbol : if the price of 1 token is > or = to this price, the bot will sell.
(it will sell at the Market price, not at your price)
If you want the bot to never sell, set SELLPRICEINBASE = 99999999
STOPLOSSPRICEINBASE:
Set your Stop Loss price in the base symbol .
Bot will sell if token price < STOPLOSSPRICEINBASE
SLIPPAGE:
Slippage you want to use (Denominated in %).
USECUSTOMBASEPAIR:
Must be TRUE or FALSE
"false" : the bot uses native token (KCS / ETH / MATIC / BNB / FTM / MATIC) to trade.
You only need to hold this native token
"true" : bot uses the BASE pair you've entered.
Please note:
By using this option, the bot needs to route your transaction through several routes
(Custom base token --> Native token --> Token you're sniping)
and one of these routes could have low liquidity.
BASESYMBOL:
Symbol of the token you want to trade with if you selected USECUSTOMBASEPAIR = True
(in this example : I want to buy ALPHA with the KCS I have in my wallet)
BASEADDRESS:
Contract address of the token you want to trade with if you selected
USECUSTOMBASEPAIR = True
LIQUIDITYINNATIVETOKEN:
Must be TRUE or FALSE.
TRUE: the bot will always route thru the NATIVE TOKEN liquidity pool.
(KCS / ETH / MATIC / BNB / FTM / MATIC)
FALSE: the bot will always use the most direct route.
(MIM / USDT / USDC / BUSD/etc.)
Use this option if you want to trade with liquidity in a stable coin.
(MIM / USDT / USDC / BUSD/etc.)
Please note : When using the LIQUIDITYINNATIVETOKEN option, if you set up the
wrong configuration, the bot will trade the wrong pair.
MAXTOKENS:
This parameter is used to make the bot stop buying once a certain balance is obtained.
The bot ALWAYS checks MAXTOKENS before placing a buy order.
(BALANCE >= MAXTOKENS, the bot will not place
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.7kCommit, push, and open a PR
