Implementing Whale Alert Using Tokenview Transaction Tracking
Implementing Whale Alert Using Tokenview Transaction Tracking
Overview
In the context of blockchain and cryptocurrency, a "whale" refers to an individual or entity that holds a significant amount of digital assets. These assets can include cryptocurrencies such as Bitcoin, Ethereum, or other tokens native to specific blockchain networks.
BTC Whales: These are individuals or entities that possess a large amount of Bitcoin. Bitcoin whales often hold thousands or even tens of thousands of Bitcoins in their wallets.
ETH Whales: Similar to Bitcoin whales, Ethereum whales hold significant amounts of Ethereum (ETH) tokens. They may accumulate large holdings through mining/staking, early investments, or strategic acquisitions.
Token Whales: In addition to Bitcoin and Ethereum, whales can also hold substantial amounts of various tokens issued on blockchain platforms. These tokens may represent ownership in decentralized applications (DApps), governance rights, or utility within specific ecosystems.
Whales often attract attention and speculation within the cryptocurrency community due to their influence on market dynamics.
ETH (Native token on Ethereum) Whale Alerts
We will track the ETH value of Ethereum transactions. What we will do is:
- Set the Tracking Token to be ETH
- Set the Tracking Value as the expected range, min<=value<=max.
curl --location 'https://services.tokenview.io/vipapi/txmonitor/addTrackingItem?apikey={apikey}' \
--header 'Content-Type: application/json' \
--data '{
"currency": "ETH",
"trackType": "tokentransfervolume",
"token": "ETH",
"min": 10000,
"max": 20000
}'
ERC-20 Token Whale Alerts
Once the ERC-20 token is transfered, event "Transfer (index_topic_1 address from, index_topic_2 address to, uint256 value)" will be emitted by the smart contract. We will track the token and the value as following.
- The ERC-20 token - To track the transfer of a particular token we will need the smart contract address of that token (e.g. USDT).
- The value of token being transferred - We will track transactions where more than 100,000 USDT, and less than 200,000 USDT are transferred, so we will set the min as 100,0000 and max as 200,000.
curl --location 'https://services.tokenview.io/vipapi/txmonitor/addTrackingItem?apikey={apikey}' \
--header 'Content-Type: application/json' \
--data '{
"currency": "ETH",
"trackType": "tokentransfervolume",
"token": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"min": 1000000,
"max": 2000000
}'