Adarsh, a seasoned crypto trader and COO at CryptoXpress (@crypto_express), faced challenges in automating processes within his trading group, CryptoSurge. Which I was also a part of. He wanted to streamline communication and enhance accessibility to crucial information to his community members. Understanding the problems, I proposed to develop a series of Discord bots tailored to the needs of his community.
In short, I needed to solve the following problems using Discord bots
- Automate the process of sharing live holdings from multiple exchanges on demand
- Provide real-time Aadarsh's order information
- Provide real-time market information on demand
- Share knowledge and enhance communication within the community and introduce engaging elements to the community
How I did it?
Lets start with automating the process of sharing live holdings from multiple exchanges on demand
To address the need for consolidated and accessible trading information, I developed a Discord bot capable of aggregating holdings from multiple exchanges,
I was able to arrange the data from differnet exchanges where there were assets present using the exchange APIs. We wanted to present this information whenever
a user sends a command in the chat !portfolio
in this case. The cummunity was huge so we had to make sure that the bot responds to the command as fast as possible and also
that it do not spams the exchanges API as in that case we would either hit the rate limit or get banned from using the API.
I solved this by storing the latest data in a cache and creating a webhook that updates the cache whenever the portfolio changes. This helped the bot deliver the latest data to the users in a matter of milliseconds. Instead of presenting raw numbers, the bot utilized percentages to provide a clearer understanding of portfolio composition.
Image: The bot in action
This feature enabled CryptoSurge members to make informed trading decisions based on Adarsh's portfolio
Providing real-time Aadarsh's order information
The requirement was to provide a real-time update whenever an order is palced. None of the exchanges at that time provided a webhook for this that could push data automatically when an order is palced so we had to come up with my own custom solution for this.
Here is what I did, I created a server that checkes with multiple exchanges every X seconds if there is any new order that was placed between the last query and the current query, If there is an order then it sends a message to the Discord channel with the order information. I know, It's not actual really really realtime but its very close to it consiering we are not exhausting the API limits. Here is how the system looked like.
And here is the bot in action
That moves us to providing real-time market information on demand
Basically we nedded a bot that could provide real-time information about the market and the tokens. The bot should be able to provide information about any (limited to known ones) crypto token on demand. First of all this required a query from user about the token information they require. Then the bot should be able to fetch the information from the API and present it to the user.
Fortunately, there are a lot of APIs available which could give you enough details about a token. In this case we used CoinGecko API to fetch the information about the token.
Introducing Cexy, a sophisticated crypto price ticker app designed for Discord. Cexy not only displays real-time market prices but also offers comprehensive details such as price changes over 24 hours and 7 days, trade volume, and dominance percentages.
Here is an image of the query response from the bot.
Share knowledge and enhance communication within the community and introduce engaging elements to the community
Here are some of the additional bots that were developed
-
CryptoSurge TA Helper: A bot that helps users to check if a token is bullish or bearish based on certain technical analysis indicators
-
Gyaani - crypto logo Quiz: A bot that presents users with crypto token logos, challenging them to identify the corresponding tokens. Participants earn points for correct guesses, fostering a lively and interactive environment within the community.
-
Crypto Twitter News: A bot that notifies the Discord channel promptly whenever there is a new tweet from the subscribed accounts, ensuring that CryptoSurge members are always in the loop on relevant industry updates.
-
Discord Welcome DM Bot: A bot that automatically sends private messages to new members. These messages contain essential information about server rules and guidelines, facilitating a smooth integration into the CryptoSurge community.
-
BOGGED - Bitmex Whale Alerts: A bot that notifies the Discord channel whenever there is a large order on Bitmex.
Conclusion
The implementation of these Discord bots not only addressed Adarsh's specific needs but also significantly enhanced the overall trading experience within CryptoSurge. By fostering efficient communication, providing real-time market insights, and introducing engaging elements, my tailored solutions have contributed to the growth and cohesion of this vibrant crypto community. As the crypto landscape continues to evolve, these bots stand as a testament to the power of innovation in streamlining and enhancing digital collaboration within trading groups.