Automated trading bot that executes trades based on webhook notifications. Supports multiple chains including Ethereum, BSC, Solana, Tron, and Aptos.
- Features
- Installation
- Configuration
- Usage
- API Reference
- Chain-Specific Documentation
- Development
- Security
- License
- 🔄 Automatic trading execution via webhooks
- ⛓️ Multi-chain support (EVM chains, Solana, Tron & Aptos)
- 🔍 Token address resolution by symbol
- 🔒 Webhook authentication
- 🚫 Slippage protection
npm install
Create a .env
file in the root directory:
# General Settings
API_KEY=your-webhook-api-key
PORT=3000
MAX_SLIPPAGE=1
# Chain-specific Private Keys
PRIVATE_KEY=your-wallet-private-key
TRON_PRIVATE_KEY=your-tron-private-key
APTOS_PRIVATE_KEY=your-aptos-private-key
# Solana Configuration
SOLANA_PRIVATE_KEY=your-solana-wallet-private-key
SOLANA_RPC_URL=your-solana-rpc-url
FEE_ADDRESS=fee-wallet-address
JITO_ENABLED=true
TIP_AMOUNT=0.0005
import SolanaSwapService from "./src/solana";
const swapService = new SolanaSwapService();
const result = await swapService.handleSwap({
inputMint: "So11111111111111111111111111111111111111112", // SOL
outputMint: "targetTokenMint",
amount: 0.001,
amountDecimal: 9,
maxAutoSlippageBps: 100,
});
{
"tokens": [
{
"address": "0x...",
"chain": "ethereum",
"name": "PEPE"
}
]
}
Required Headers:
X-API-KEY: your-api-key
Content-Type: application/json
Solana implementation includes advanced features for optimal trading:
- ⚡ Jupiter DEX integration
- 🚀 Jito MEV protection
- 💰 Automatic fee handling
- 🔄 Versioned transactions
- 📊 Slippage protection
import SolanaSwapService from "./src/solana";
const swapService = new SolanaSwapService();
const swapResult = await swapService.handleSwap({
inputMint: "So11111111111111111111111111111111111111112", // SOL
outputMint: "9PR7nCP9DpcUotnDPVLUBUZKu5WAYkwrCUx9wDnSpump", // Target token
amount: 0.001,
amountDecimal: 9,
maxAutoSlippageBps: 100,
});
- Ethereum: Standard ERC20 token support
- BSC: BEP20 token standard
- Tron: TRC20 token standard, TronLink integration
- Aptos: Move-based contracts, Petra wallet support
Start the development server:
npm run dev
Run tests:
npm test
- Webhook authentication via API key
- Private key encryption
- Slippage protection
- Chain-specific security measures
MIT