This project is a Python script that identifies arbitrage opportunities between the Nobitex and Bitpin exchanges for the USDT/IRR trading pair. It compares Nobitex sell orders (asks) with Bitpin sell orders and Nobitex buy orders (bids) with Bitpin buy orders to find profitable opportunities. If an arbitrage opportunity with a price difference greater than 5000 IRR is found, a notification is sent via Telegram.
Clone the Repository:
git clone https://github.com/salamzadeh/BitEx.git
cd BitEx
Create a Virtual Environment (optional):
python -m venv venv
source venv/bin/activate # On Linux/Mac
venv\Scripts\activate # On Windows
Install Dependencies:
pip install python-telegram-bot==20.7 requests
Set Up a Telegram Bot:
@GetIDsBot).Configure the Script:
Open Arbitrage.py and update the following:
TELEGRAM_BOT_TOKEN = "YOUR_BOT_TOKEN_HERE" # Your Telegram bot token
TELEGRAM_CHAT_ID = "YOUR_CHAT_ID_HERE" # Your Telegram chat ID
Run the Script:
python Arbitrage.py
Expected Output:
Nobitex API read successfully at ...Debug: Aggregated 2 orders: [(873000.0, 127.87), ...], Total Volume: 500.00, Avg Price: 873081.9Error at 2025-07-16 14:02:23: Error fetching Nobitex data: ...Max Nobitex Ask - Bitpin Sell Difference: 5218.1 IRRTelegram Notification: If an arbitrage opportunity with price difference > 5000 IRR is found:
β
Arbitrage Opportunity Found π
πΈ Buy on Nobitex: 873000 IRR, Nobitex Volume: 127.87 USDT
π° Sell on Bitpin: 879000 IRR, Volume: 100.00 USDT
π Average Buy Price: 873081 IRR
π Average Sell Price: 878566 IRR
π Average Volume: 500.00 USDT
π Price Difference: 5485 IRR
Stop the Script:
Ctrl+C in the terminal to stop.MIN_SELL_VOLUME (default: 500 USDT) in the script.check_arbitrage functionβs condition best_ask_sell_diff > 5000.FPS (default: every 60 seconds) in the main function.pip show python-telegram-bot requests).python-telegram-bot (<20.0) may require changing from telegram import Bot to from telegram.bot import Bot.This project is licensed under the MIT License.
For questions or support, reach out via [email or GitHub Issues].