![]() ![]() get ( bitcoin_api_url ) > response_json = response. > import requests > bitcoin_api_url = '' > response = requests. IFTTT offers a multitude of actions like sending an email, updating a Google Spreadsheet and even calling your phone. Now, this is the fun part-the action could be almost anything you want. Our Python app will make an HTTP request to the webhook URL which will trigger an action. You can think of webhooks as “user-defined HTTP callbacks” and you can read more about In our case, the trigger will be a webhook service provided by IFTTT. another for regular Telegram updates on the Bitcoin price.īoth will be triggered by our Python app which will consume the data from the Coinmarketcap API.Īn IFTTT applet is composed of two parts: a trigger and an action.One for emergency notification when Bitcoin price falls under a certain threshold and.IFTTT (“if this, then that”) is a web service that bridges the gap between different apps and devices. So, instead of constantly checking various sites for the latest updates, let’s make a Python app to do the work for you.įor this, we’re going to use the popular automation website IFTTT. You never really know where it’s going to be at the end of the day. ![]() So let’s jump right in: Bitcoin Price Notifications With PythonĪs we all know, Bitcoin price is a fickle thing. With relatively little code (~50 lines) you’re going to arrive at a full-fledged Bitcoin price notification service that will be easily extendable to other cryptocurrencies and services. You’re going to learn about webhooks and how you can use them to connect your Python app to external services, such as phone notifications or Telegram messages. In this tutorial we’re going to build a Bitcoin price notification service-ĭuring this project you’ll learn about HTTP requests and how to send them using the (appropriately named) requests package. Welcome to the first article in a series of articles on Python projects for beginners! ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |