StephanAkkerman / fintwit-bot

FinTwit-Bot is a Discord bot designed to track and analyze financial markets by pulling data from platforms like Twitter, Reddit, and Binance. It features customizable tools for sentiment analysis, market trends, and portfolio tracking to help traders stay informed and make data-driven decisions.
http://akkerman.ai/fintwit-bot/
MIT License
75 stars 15 forks source link
binance ccxt coingecko crypto cryptocurrency cryptocurrency-prices discord discord-bot financial-analysis forex nft options reddit sentiment-analysis sentiment-classification stocks stocktwits tradingview twitter twitter-sentiment-analysis

FinTwit-Bot: Comprehensive Financial Markets Overview via Discord

FinTwit-Bot Banner


Supported versions License Code style: black Discord Shield

This is a Discord bot written in Python, this bot aims to provide an overview of the financial markets discussed on X / Twitter. Not only data from Twitter is gathered, but other sources are used too, such as Reddit, Binance, Yahoo-Finance, TradingView, and many other related websites. This bot was written with flexibility in mind, meaning that you can toggle on and off certain features without issues by using the config.yaml file.

Key Features ⚙️

For a detailed guide on all commands and functionalities, refer to the documentation included in the repo.

Machine Learning Models 🤖

Currently, we use two machine learning models to help get better insights from the data collected by the bot. The following models are trained and developed by us with the purpose of being integrated with this Discord bot:

Both models are very lightweight and are automatically downloaded and setup if you run main.py.

Tweet Example

In the image above you can see what the bot does with the data it receives from Twitter. The green color of the embed shows that the sentiment of this tweet is positive. The tickers mentioned in the tweet and the quoted tweet are shown below, both with the exchanges they are available on and the 4-hour and 1-day technical analysis (TA) from TradingView.

Installation 🛠

# Clone this repository
git clone https://github.com/StephanAkkerman/fintwit-bot
# Install required packages
pip install -r requirements.txt

Twitter Credentials 🐦

To access data from Twitter you need to follow these steps:

Setup .env 📝

If you open example.env you will find the lines that need to be filled in. Start by renaming example.env to .env so the bot will use this file for you credentials.

Creating a Discord bot

For the first part, you can watch this video (watch until 2:20).

Or follow these written instructions:

At last fill in the lines in the example.env file:

Adding custom emojis (Optional)

The bot uses custom emojis to recognize on which cryptocurrency exchange things can be bought. If you wish to use it, follow these steps:

Reddit API Credentials (Optional) 👽

If you do not want to track data from Reddit, feel free to skip this step. I suggest creating a new account for this too, if you feel uncomfortable leaving your username and password.

Discord Category and Channel Creation

Since there are multiple channels that are about the same topic, we need to put them in different categories so the bot knows where to find this channel. The categories are specified in the config file, feel free to change the names. Below you can find an example showing how we set up our Discord channel.

Example of Discord Categories and Channels

━━ 🔑 Information ━━ This is an optional category, where the github channel tracks the commits of this repo using the [GitHub webhook for Discord](https://gist.github.com/jagrosh/5b1761213e33fc5b54ec7f6379034a22). - 🌐┃general - 💻┃github - ⌨┃commands
━━━ 🐦Twitter ━━━ - 📰┃news - 📷┃images - ❓┃other - 💸┃highlights
━━━ 🎰 Crypto ━━━ - 📈┃charts - 💬┃text - 📊┃index - 💡┃ideas - 🔥┃trending - 🚀┃gainers - 💩┃losers - 🏦┃funding - 🆕┃listings - 📰┃news - 💸┃liquidations - 🏆┃overview
━━━ 🐒 NFTs ━━━ - 🏆┃top - 🔥┃trending - 🌠┃upcoming - 🎮┃p2e
━━━ 💵 Stocks ━━━ - 📈┃charts - 💬┃text - 📊┃index - 💡┃ideas - 🔥┃trending - 🚀┃gainers - 💩┃losers - 📅┃earnings - 🎤┃stocktwits - 🏆┃overview
━━━🎯 Options ━━━ - 🏆┃overview - 💣┃volume - 💰┃spacs - 📉┃shorts
━━━ 💱 Forex ━━━ - 📈┃charts - 💬┃text - 📊┃index - 📣┃events - 🏢┃yield
━━━ 👨 Users ━━━ - 💲┃trades
━━━ 👽 Reddit ━━━ - 🤑┃wallstreetbets
━━ Selected Traders ━━ These channels are also optional, but these are some of my favorite traders on Twitter. - 🐺┃hsakatrades - 🦁┃anbessa100 - 🔫┃cryptobullet1

Contributing

Contributions are welcome! If you have a feature request, bug report, or proposal for code refactoring, please feel free to open an issue on GitHub. We appreciate your help in improving this project.\ https://github.com/StephanAkkerman/FinTwit_Bot/graphs/contributors

License

This project is licensed under the MIT License. See the [LICENSE] file for details.