WhaleAlert is a service that notifies about large crypto transactions.
In this article, we will learn how you can build a crypto alert service like WhaleAlert using Bitquery APIs within a few minutes.
Our crypto alert service will notify users whenever there is a transaction with more than 2 million USDT in value.
The hardest part of building a crypto alert service to get the relevant blockchain data. Let’s say we want our alert service should “give all Bitcoin transactions with more than 1000 BTC.”
Commonly, to build a crypto alert service from scratch, you need to do the following steps:
- Run a Bitcoin node
2. Get transaction data continuously and index them
3. Then query on that data to get the desired results
However, Bitquery solves the first and second steps for you. Therefore, you just need to call our APIs to the desired results across multiple blockchains.
Yes, multiple blockchains. We expose unified APIs for more than 20 blockchains. Therefore integrating with multiple blockchains becomes very easy.
Table of Contents
To build a crypto alert service, you need to have programming knowledge and the ability to write GraphQL queries. If you don’t know about GraphQL check here and don’t worry, we provide a lot of example queries which help you to get started.
- Programming knowledge
Tether (USDT) alert service
Let’s say we want an alert for every USDT(Tether) transaction with more than $2 million in value. As we want very specific results, we need to write a GraphQL query for this and test it on the Bitquery GraphQL interface.
Just copy-paste the query and the parameters as shown below and run the query to test it. You will see the desired result in the middle panel of the page.
The query mentioned above is a standard GraphQL query. GraphQL has a little bit of learning curve, but you can find a lot of tutorials online.
Understanding Query and Results
Let’s understand our query and parameters before moving forward. As you can see, we are using passing a few parameters in the query and then retrieving details we need for our alert.
Because we want constant alerts; therefore, we will run our query every 10 minutes to see if there is any transaction USDT transaction with more than $2 million in value.
- token — Here, we are passing USDT token contract address. To get a similar result of any other token on Ethereum, you can pass the contract address for that token.
- from: starting time
- till: end time
- limit: how many results we want
- network — Ethereum
- amount — 2000000 (2 million)
The important notice in the results is annotations. We have built an in-house address classification technology to identify blockchain addresses, and we provide them in query results.
Therefore, the above query is telling us that one Bittrex exchange wallet transferred 2499990 USDT to another Bittrex exchange wallet. You can also verify this transaction on Bitquery explorer.
Building Alert Service
Getting the data was the hardest part, which we made easy for you. Now you can Tweet these alerts or create a notification tool for traders.
If you plan to build a twitter bot, just google a Twitter library in your favorite programming language. For brevity, we are not making the Twitter bot.
More Crypto alerts
We have shown an example of USDT Tether alert. However, you can check Bitquery explorer to see more query examples.
For example, to build Bitcoin alerts, you can check the query here (Click on the “GraphQL” on the bottom right corner). You just need to manipulate the query a little bit to get the desired result.
Our tools help you to query blockchains in the simplest manner possible. At Bitquery, we are passionate about blockchain data and enabling developers to utilize this data to build useful tools. If you have any particular use case of blockchain data in your mind or you stuck anywhere while following the tutorial, let us know on our Telegram channel.
Bitquery is a set of software tools that parse, index, access, search, and use information across blockchain networks in a unified way. Our products are:
- Coinpath® APIs provide blockchain money flow analysis for more than 24 blockchains. With Coinpath’s APIs, you can monitor blockchain transactions, investigate crypto crimes such as bitcoin money laundering, and create crypto forensics tools. Read this to get started with Coinpath®.
- Digital Assets API provides index information related to all major cryptocurrencies, coins, and tokens.
- DEX API provides real-time deposits and transactions, trades, and other related data on different DEX protocols like Uniswap, Kyber Network, Airswap, Matching Network, etc.
If you have any questions about our products, ask them on our Telegram channel or email us at firstname.lastname@example.org. Also, subscribe to our newsletter below, we will keep you updated with the latest in the cryptocurrency world.