- Use Cases
The blockchain is constantly emitting powerful information. Receiving data quickly is crucial to staying informed and automating trading strategies, especially when dealing with whales, or high net-worth individuals or organizations that hold large amounts of crypto. Amberdata’s on-chain data allows you to query, analyze, and build tools for “whale watching.”
A simple monitoring system allows any trader or market maker to react quickly to important asset changes. For example, let’s say we want to monitor the blockchain for “whale” transfers of over $1,000,000 in DAI. When our network identifies a transaction that is at least $1,000,000 it will trigger a text message to send us an alert.
But how do we build this alert system? By connecting to the Amberdata Blockchain Websocket feed we can begin to listen for events emitted from our contract of interest. In this case, we are watching for DAI transfers emitted from this contract: 0x6B175474E89094C44Da98b954EedeAC495271d0F.
When we see a transfer occur, we would check for the sender’s ENS and send a text message to alert us of the asset movement. To build this, the required information and Python code can be found here.
For the sake of a simple example, we are only having the network send ourselves a text message. However, this code can be more complex and perform actions such as liquidity events for a pool, place a put order on a trade, or even liquidate positions in DeFi protocols after specific events are observed on the blockchain.