Go to file
Llewellyn van der Merwe f86bbd0f41
Added dynamic percentage watcher options
2018-01-01 23:16:43 +02:00
.gitignore Added dynamic percentage watcher options 2018-01-01 23:16:43 +02:00
LICENSE First commit of coin notice 2017-12-27 05:53:53 +02:00
README.md Added the option to send to multiple telegram,sms users 2017-12-31 13:46:10 +02:00
dynamic.txt Added dynamic percentage watcher options 2018-01-01 23:16:43 +02:00
factory.txt Added factory (advanced options) to run multiple currency pair options at once, and send/show a combined result 2017-12-30 02:34:30 +02:00
functions.sh Added dynamic percentage watcher options 2018-01-01 23:16:43 +02:00
getPrice.sh Added dynamic percentage watcher options 2018-01-01 23:16:43 +02:00
main.sh added the percentage option 2018-01-01 15:08:10 +02:00
notify.sh Added the option to send to multiple telegram,sms users 2017-12-31 13:46:10 +02:00
notify.txt First commit of coin notice 2017-12-27 05:53:53 +02:00
sms.sh Added the option to send to multiple telegram,sms users 2017-12-31 13:46:10 +02:00
sms.txt Added SMS option, fixed some typos, and bugs 2017-12-27 16:57:56 +02:00
smsto.txt Added SMS option, fixed some typos, and bugs 2017-12-27 16:57:56 +02:00

README.md

Coin Rate Watcher

The Bash script gets current values for cryptocurrencies from a variety of Exchange APIs, and then calculates if various notifications should be send based on above or below price margins. All dynamically set by command options or file, you can now stay informed of any changes in the market with this coin rate watching script.

The Get Method (getPrice.sh)

..... more info soon

Features

  • hmmm many

Getting started

First, clone the repository using git:

   $git clone https://github.com/vdm-io/CoinRate.git

Then give the execution permission to this file:

   $chmod +x getPrice.sh

Set your sms details (if required):

Read sms.txt for more details.

Set your Telegram details (if required):

Read notify.txt for more details.

Set your Factory details (if you want to do bulk checks):

Read factory.txt for more details.

Usage GET

The syntax is quite simple:

 $./getPrice.sh <PARAMETERS>

<%%>: Required param

Parameters:

API options
======================================================
-I Select the api to query 
	Options:
	1 = [cex] cex.io - (default)
	2 =	[shapeshift] 
-x Hide API name from message

Basic options
======================================================
-c Currency to watch (c:_)
	example: BTC
-C Target Currecy to Display (_:t)
	example: USD
-o How often should the message be send/shown
	0 = once per/day
	1 = once per/hour
	2 = everyTime (default)
	3 = only once
-v Value (above or below) at which to send/send notice
	example: 17000 or 14000,15000
-A Value Above at which to send notice
	example: 17000 or 19000,18000
-B Value Below at which to send notice
	example: 14000 or 14000,15000
-b Send Notice below target value once a day
-a Send Notice above target value once a day (default)

Advance options (factory option)
======================================================
-f Path to file with multiple currency pair options 
	(see example factory.txt file for details)

Message options
======================================================
-q Quiet - Turn off terninal output
-t Send A Telegram Notice
-s Send A SMS Notice
-l Show A Linux Notice via zenity

-h display this help menu

======================================================
		   Vast Development Method (vdm.io)
======================================================

Examples (CEX API):

# Get Linux & SMS & Telegram notice when BTC is above 10000 USD (every time command is run)
    ./getPrice.sh -c BTC -C USD -av 10000 -lst

# Get Telegram notice when BTC is [above 15000,16000,17000 USD] & [below 14000,13000,12000 USD] (every hour - if run in crontab)
    ./getPrice.sh -c BTC -C USD -aA 15000,16000,17000 -bB 14000,13000,12000 -to 1

# Get SMS notice when XRP is [above 2.50,2.60,3 USD] & [below 2.50,2.40,2.30 USD] (only once - if run in crontab)
    ./getPrice.sh -c XRP -C USD -aA 2.50,2.60,3 -bB 2.50,2.40,2.30 -so 3

# Get Telegram notice when any curracy pair in file meets criteria (once a day - if run in crontab)
    ./getPrice.sh -f /home/coin/factory -to 0

To use shapeshift API add the -I 2 command:

# Get Linux notice when BTC is above 16 ETH (every time command is run)
    ./getPrice.sh -c BTC -C ETH -av 16 -l -I 2

Tested Environments

  • GNU Linux

If you have successfully tested this script on others systems or platforms please let me know!

Running as cron job (ubuntu)

First, open crontab:

   $crontab -e

Add the following line at bottom of the file (adapting to your script location!!!):

* * * * * /home/bitnami/coin/getPrice.sh -f /home/bitnami/coin/factory -to 1 -I 2 >> /home/bitnami/coin/coin.log

or

* * * * * /home/bitnami/coin/getPrice.sh -c BTC -C USD -aA 15000,16000,17000 -bB 14000,13000,12000 -to 1 -q
* * * * * /home/bitnami/coin/getPrice.sh -c XRP -C USD -aA 2.50,2.60,3 -bB 2.50,2.40,2.30 -so 3 -q -I 2

BASH, JQ, curl and bc installation

Debian & Ubuntu Linux:

	$sudo apt-get install bash (Probably BASH is already installed on your system)
	$sudo apt-get install bc (Probably bc is already installed on your system)
	$sudo apt-get install curl
	$sudo apt-get install jq

Donations

Come on buy me a coffee :)

  • PayPal: paypal.me/payvdm
  • Bitcoin: 18vURxYpPFjvNk8BnUy1ovCAyQmY3MzkSf
  • Ethereum: 0x9548144662b47327c954f3e214edb96662d51218