In this circuit, we are highlighting a feature requested by some of our users: What if you could be automatically notified when new listings of coins- many coins, on many different exchanges- occur? For us, CoinGecko was a natural place to look for this kind of vast coin and exchange data.
Now, let's take a look at our circuit. This one took me about 10 minutes to build. 5 of those minutes were about making sure I didn't share private information when I shared the circuit.
QUICK NOTE: THIS CIRCUIT WILL ONLY WORK IN CIRCUITBUILDER VERSION 1.0.3 AND LATER.
Find this Circuit here: CoinGecko New Listings Circuit. (Note that for this circuit to open in CircuitBuilder, you need to have CircuitBuilder installed and opened at least once, and you will need to have version 1.0.3 or above).
Let's take a look at how we built this.
First, we dropped a Trigger. This is the way we can manually trigger the circuit to test it while we develop it.
Next, we dropped a CoinGecko Get Status Updates component. This component has 2 drop-down lists in it: Category and Project Type. We chose New Listings as the Category, and Market as the Project type (Exchanges announce their new coin listings). Note that at first, we tried Coin as the Project type, and noticed that it had no results, so we tried Market.
Initially, we dropped a Debug after the Get Status Updates so that we could check the output once we ran it to see what happened. When we had Coin as the Project type, this is what the response looked like:
And then when we changed the Project Type to Market, THIS is what it looked like (It's cut off for presentation purposes).
There we go. That's looking better. There are new listings in there from 02/07 -- 6 days ago, and then another one on 02/07. Okay, looking through the data that we didn't include in that picture, we see dates like 02/05, 02/02, 01/15 ... Okay, so it looks like there are not new listing announcements, say, multiple times a day. Now we have a feel for how often they are created.
We would want a circuit like this to run regularly. Now that we know about how often we want it to run, let's throw a Timer component there at the beginning of the circuit. In this one, we have it set to run once a day == 1000ms/s x 60s/m x 60m/h x 24h/day = 86400000 milliseconds.
Also, looking through the entire list, it goes all the way back to 2019. Okay, so ... how can we handle that? Well, the first thing that came to our mind was to check for when it changed (it seems logical that when this list changes, there is a new listing).
How do we check for that? Well, we have a Modified component, that grabs data on the first execution, and then only sends info to downstream components if the data it receives changes. This sounds like it will meet our needs. So we dropped a Modified component.
In this case, we did something you may not know about: WE TURNED OFF THE INPUT FOR THAT COMPONENT. To do that, hover your mouse pointer over the input bubble and click once. That turns it off. Click it again and that turns it back on. So for this circuit, if you want an email sent to you, re-activate that input and fill in your email provider information.
Are you asking yourself how you can make sure that it runs every day? If you are using our freely available CircuitBuilder, you can run it while you have the app open. In the Premium version of CircuitBuilder (COMING SOON!!!), you will be able to publish a circuit (terminology subject to change), where it will run in the cloud without the need for a UI, running as often as you configure, or watching for specific events and then firing.
Contact us if you want to learn more now!