added luno API option

This commit is contained in:
Llewellyn van der Merwe 2018-01-17 12:48:42 +02:00
parent 5e921fbbac
commit 6716e5113f
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
4 changed files with 13 additions and 0 deletions

View File

@ -57,6 +57,7 @@ API options
2 = [shapeshift] shapeshift.io
3 = [bitfinex] bitfinex.com
4 = [gate] gate.io
5 = [luno] luno.com
-x Hide API name from message
Basic options

View File

@ -542,6 +542,9 @@ function getURL () {
elif [ "${API_target}" == "gate" ]; then
# gate
echo "${API_gate}${Currency}_${Target}"
elif [ "${API_target}" == "luno" ]; then
# luno
echo "${API_luno}${Currency}${Target}"
fi
}

View File

@ -55,6 +55,7 @@ Getting Coin Value in Fiat Currency at set price
2 = [shapeshift] shapeshift.io
3 = [bitfinex] bitfinex.com
4 = [gate] gate.io
5 = [luno] luno.com
-x Hide API name from message
Basic options
@ -122,6 +123,9 @@ while getopts hc:C:o:v:B:A:baqtT:sS:M:lf:I:kp:P: opt; do
elif (( "$OPTARG" == 4 )); then
API_target="gate"
API_urlname="gate.io"
elif (( "$OPTARG" == 5 )); then
API_target="luno"
API_urlname="luno.com"
fi
;;
x)

View File

@ -93,6 +93,11 @@ API_gate="https://data.gate.io/api2/1/ticker/"
API_json_gate="last"
API_error_gate="message"
API_error_value_gate="null"
#luno
API_luno="https://api.mybitx.com/api/1/ticker?pair="
API_json_luno="last_trade"
API_error_luno="error"
API_error_value_luno="null"
# file path to config
FilePath=''