Triangular arbitrage is the result of a discrepancy between three foreign currencies that occurs when the currency's exchange rates do not exactly match up. These opportunities are rare and traders who take advantage of them usually have advanced computer equipment and/or programs to automate the process.

This is a triangular arbitrage bot made entirely in python using the ccxt libraries to handle the binance api, It's an endless loop that scans opportunity for binance and executes the operations if found, multi-threaded and with a simple log that it save in a file.
The base money for this bot is ETH, while the exchange currency is BTC, as a result, there are two types of arbitrage:
- Forward: passing first from ETH through the ALT to then be changed to BTC and back to ETH
- Backward: passing first from ETH through BTC to then be changed to the selected ALT and back to ETH
YES! This enhanced version includes multiple improvements to increase profitability:
- Optimized fee calculations: Uses maker fees (0.05%) instead of taker fees (0.1%) for better margins
- Smart profit thresholds: Only executes trades with minimum $5 USD profit
- Risk management: Position sizing limits (max 50% per trade)
- Better profit estimation: USD-based calculations with real-time price data
- Profit tracking: Automatic tracking and analytics
This bot now includes monetization capabilities:
- Telegram Notifications: Real-time alerts for opportunities and trades
- REST API: Access bot statistics and trade history via API
- Advanced Analytics: Profit tracking, success rates, and performance metrics
- Subscription System: Tiered access (Free, Basic, Premium, Enterprise)
See MONETIZATION.md for detailed monetization guide.
Install all dependencies:
pip install -r requirements.txtRequired packages:
- ccxt (cryptocurrency exchange library)
- flask (for API server)
- flask-restful (for REST API)
- requests (for Telegram notifications)
- Binance account with API keys
- (Optional) Telegram bot token for notifications (get from @BotFather)
-
Configure API keys:
# Edit data/secrets.py BINANCE_KEY = "your_binance_api_key" BINANCE_SECRET = "your_binance_secret"
-
Optional: Setup Telegram (for premium features):
# Edit data/secrets.py TELEGRAM_BOT_TOKEN = "your_bot_token" TELEGRAM_CHAT_ID = "your_chat_id"
-
Activate license (for premium features):
python activate_license.py
-
Run the bot:
python ini.py
-
Start API server (if premium tier):
python src/api_server.py
- ✅ Implement Telegram Bot notifications
- ✅ Add subscription/licensing system
- ✅ Create REST API for monetization
- ✅ Improve profitability with better fee calculations
- ⏳ Make the base currency eligible
- ⏳ Add more exchanges
- ⏳ Make base currency selectable