1
0
mirror of https://github.com/Llewellynvdm/CoinRate.git synced 2024-11-24 19:37:32 +00:00

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 2 = [shapeshift] shapeshift.io
3 = [bitfinex] bitfinex.com 3 = [bitfinex] bitfinex.com
4 = [gate] gate.io 4 = [gate] gate.io
5 = [luno] luno.com
-x Hide API name from message -x Hide API name from message
Basic options Basic options

View File

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

View File

@ -55,6 +55,7 @@ Getting Coin Value in Fiat Currency at set price
2 = [shapeshift] shapeshift.io 2 = [shapeshift] shapeshift.io
3 = [bitfinex] bitfinex.com 3 = [bitfinex] bitfinex.com
4 = [gate] gate.io 4 = [gate] gate.io
5 = [luno] luno.com
-x Hide API name from message -x Hide API name from message
Basic options 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 elif (( "$OPTARG" == 4 )); then
API_target="gate" API_target="gate"
API_urlname="gate.io" API_urlname="gate.io"
elif (( "$OPTARG" == 5 )); then
API_target="luno"
API_urlname="luno.com"
fi fi
;; ;;
x) x)

View File

@ -93,6 +93,11 @@ API_gate="https://data.gate.io/api2/1/ticker/"
API_json_gate="last" API_json_gate="last"
API_error_gate="message" API_error_gate="message"
API_error_value_gate="null" 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 # file path to config
FilePath='' FilePath=''