The check token util script is a tool to detect the balance of assets in BscScan accounts. Alert will be sent via Telegram if asset balance is found to be less than the threshold balance.
- Golang is required (tested on go1.21.5)
- Telegram Bots API Key and Chat Id
git clone [email protected]:proximax-foundry/go-bsc-check-token-util.git
cd go-bsc-check-token-util
Configurations can be made to the script by changing the values to the fields in config.json.
{
"botApiKey": "1111111111:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"chatID": 111111111,
"sleep": 60,
"alarmInterval": 1,
"walletAddress": [
"0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
],
"tokenList": {
"bnb": {
"defaultCurrency": true,
"tokenContractAddress": "",
"thresholdBalance": 9999999
},
"xpx": {
"defaultCurrency": false,
"tokenContractAddress": "0x6F3AAf802F57D045efDD2AC9c06d8879305542aF",
"thresholdBalance": 9999999999
}
}
}
botApiKey
: Telegram Bot API Key (in String format)chatID
: Telegram Chat ID (in numeric format)sleep
: The time interval (in seconds) of checking the assets' balancealarmInterval
: The time interval (in hours) to send alert to TelegramwalletAddress
: BscScan wallet addresstokenList
: List of tokens to be checkeddefaultCurrency
: Set asfalse
except BNBtokenContractAddress
: Token contract addressthresholdBalance
: The amount where if the asset’s balance falls lower than that, an alert will be sent
Note that the default values in config.json are presented solely as examples.
go run main.go