Help you build your own crypto currency price alert system using @Totoval and Pushover
Alert me by Pushover if btcusdt's price is higher/lower than 5min ago's price of 1%
tee ./.env.json <<- "EOF"
{
"APP_NAME": "CryptoAlert",
"APP_ENV": "develop",
"APP_DEBUG": true,
"APP_PORT": 8080,
"APP_LOCALE": "en",
"APP_KEY": "xxx",
"CACHE_DRIVER": "memory",
"ALERT_PROXY": "",
"ALERT_SCHEDULE_DURATION": 30,
"ALERT_SCHEDULE_PAIR": "btcusdt",
"ALERT_SCHEDULE_DIFFERENCE": "0.01",
"ALERT_SCHEDULE_INTERVAL": 1,
"PUSHOVER_TOKEN": "{YOUR-PUSHOVER-TOKEN}",
"PUSHOVER_USER": "{YOUR-PUSHOVER-USER}",
"PUSHOVER_DEVICE": ""
}
EOF- Set a
pairlikebtcusdtreferred at here - Set an interval about which the price of time will be used to be compared with current ticker, for example:
set
5means will let the program compare the price ofnowand5min ago - Set a difference rate, for example: if price is higher/lower than
5min ago's price of1%, then set the difference to0.01
- You could configure it in command line with
go run artisan.go crypto:alert btcusdt 5 0.01 - For using
.env.json, just copy.env.example.jsonto.env.json, set your env, then rock!
For loop:
go run artisan.go schedule:runOr for once:
go run artisan.go crypto:alert btcusdt 5 0.01Or you could build a binary~, as you wish!
For linux:
./artisan_linux schedule:run
For Mac:
./artisan_mac schedule:run
Just follow the link to subscribe a huobi.pro-30-min-btcusdt-1%UP/DOWN alert!
By implement the Fetcher Or Notifier, you could build your own Crypto-Alert
Fetcher:app/logics/alert/fetchersNotifier:app/logics/alert/notifiers
Thanks for @Totoval

