OI Alert Bot is a Discord bot that fetches real-time Open Interest (OI) data for Bitcoin (BTC), Ethereum (ETH), and Altcoins from coinalyze.net, providing market insights and automated alerts to your Discord server.
Open Interest (OI) is the total number of outstanding derivative contracts, such as options or futures, that have not been settled. In the context of cryptocurrency markets, OI reflects the total value of active positions in the market. A rising OI can indicate increasing market activity and liquidity, while a declining OI may suggest positions are being closed and interest is waning. Monitoring OI helps traders gauge market sentiment and potential volatility.
/btc
, /eth
, /alt
) with the current OI values.Initialization:
DISCORD_TOKEN
, CHANNEL_ID
) from the .env
file.Data Fetching:
Bot Commands:
/btc
: Replies with the current Bitcoin OI./eth
: Replies with the current Ethereum OI./alt
: Replies with the current Altcoin OI.Automated Monitoring:
ETH OI + Altcoins OI > BTC OI
, sends an alert embed to the configured Discord channel.audioop
module required by discord.py
is not available in Python 3.13+.)Clone the Repository:
git clone https://github.com/frhanjav/OI.git
cd OI
Create a Virtual Environment:
python3.12 -m venv venv
source venv/bin/activate
Install Dependencies:
pip install -r requirements.txt
Set Up Environment Variables:
.env.example
to .env
and fill in your Discord bot token and channel ID:
DISCORD_TOKEN="your_discord_token_here"
CHANNEL_ID="your_channel_id_here"
Run the Bot:
python oi_alert_bot.py
/btc
— Get current Bitcoin Open Interest./eth
— Get current Ethereum Open Interest./alt
— Get current Altcoin Open Interest.ETH OI + Altcoins OI > BTC OI
.DISCORD_TOKEN
: Your Discord bot token.CHANNEL_ID
: The Discord channel ID where alerts will be sent.discord.py
: Discord API wrapper.undetected-chromedriver
: For headless Chrome automation.chromedriver-autoinstaller
: Automatically installs the correct ChromeDriver.selenium
: Web automation.beautifulsoup4
: HTML parsing.python-dotenv
: Loads environment variables from .env
.