A cryptocurrency trading bot for Binance that supports multiple trading strategies and asset management.
- Multi-Strategy Trading: Run multiple trading strategies on different pairs simultaneously
- Asset Management: Automatically detect and manage assets in your account
- Optimal Trading: Convert assets to a common trading pair (e.g., USDT) for optimal trading
- Position Tracking: Track positions, P&L, and account balance
- Order Management: Create, track, and cancel orders
The bot includes a powerful asset management system that:
- Detects Assets: Automatically detects all assets in your account and their values
- Converts Assets: Converts assets to a common trading pair (e.g., USDT) for optimal trading
- Finds Conversion Paths: Determines the best path to convert between assets with minimal fees
- Tracks Balances: Keeps track of your balances and positions
When the bot starts with asset management enabled:
- It detects all assets in your account
- Converts all non-stablecoin assets to your chosen common trading asset (e.g., USDT)
- Uses the common trading asset to execute trades based on strategy signals
- When selling, it converts the proceeds back to the common trading asset
This approach allows the bot to:
- Take advantage of trading opportunities regardless of your current asset allocation
- Minimize the number of assets you need to manage
- Optimize for trading fees by using the most liquid pairs
You can configure the bot in src/main.ts
:
// Multi-coin configuration
export const multiCoinConfig = {
pairs: ["BTCUSDT", "ETHUSDT", "BNBUSDT", "DOGEUSDT", "SOLUSDT"] as Pairs[],
strategyConfig: strategyConfig,
candleSize: env.candleInterval as CandleInterval,
maxActivePairs: 3,
updateInterval: 60000, // 1 minute
startPosition: "EMPTY" as const,
test: true,
initialBalance: 1000, // 1000 USDT initial balance
useAssetManager: true, // Enable asset manager
commonTradingAsset: "USDT" // Use USDT as the common trading asset
};
- Clone the repository
- Install dependencies:
npm install
- Configure your Binance API keys in
.env
- Run the bot:
npm start
MIT