Do you know what's the best part of being a Freelancer? I get to meet all kinds of people with all sorts of different problems on their hand.
Have you ever thought of making money in crypto-trading, "by reading Medium Articles"?
Recently I met an interesting crypto-trader, from Bulgaria, who wanted me to build a Telegram Bot, to notify him about latest blogposts containing certain "keywords".
Because earlier he used to monitor crypto-related Medium stories, constantly, in search for investment opportunities in upcoming tokens and coins.
Wait a second ... What???
Why scan Medium for crypto-trading opportunities?
Because, "Today, almost all of the new crypto-project owners write a Medium Article about their ‘revolutionary' technology before launching their token or coin. And it makes it a great hub for gathering information on such projects before market catches on."
To be honest, I was totally amazed by this information arbitrage when I first heard about this. I never thought so many blockchain developers and executives would be first writing on Medium about their new tokens, features and launches.
But this incredible guy was willing to spend his money on it, and take the risks in crypto-market. And more importantly, he wanted to automate this repetitive task for good.
So I opened up my IDE and began my work!
Trading is a game where timing is everything. And in the fluctuating world of cryptocurrencies, where a week equals to a couple of months, it becomes even more crucial.
The speed at which blockchain technologies are evolving right now, is absolutely phenomenal. Hence, getting information quickly and efficiently is so much important here.
My primary objective was to track the upcoming Medium blogs for a list of tags (like Blockchain, DeFi, tokenomics) and filter them based on whether they contain my target keywords or not (like introducing, launching, discover).
So at every hour, the bot scrapes the Medium to look for such articles and sends the filtered posts to my telegram bot chat.
This file contains a single function called
run() which takes the configuration parameters as arguments (defined in
config.py). It then initialized the Medium API Object and sets the maximum number of articles to be stored within memory = 1000 (So we don't notify the same article multiple times).
Then it runs an infinite loop which executes the code at the given
FREQUENCY. It fetches the top feeds from the Medium, for the given
TAGS, compares it from the existing articles (to remove redundancies) and filters them for the given
After the filtering process, new articles are sent to the telegram bot and added to the list of existing articles.
This file only contains the following variables: -
RAPIDAPI_KEY (an alphanumeric string got from rapidapi.com)
TAGS (for the articles to monitor)
TELEGRAM_BOT_TOKEN (see this)
TELEGRAM_CHAT_ID (see this)
Some other articles that you might enjoy -