forked from polymathdanny/liquidityBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathliquidityProvider.sh
executable file
·53 lines (46 loc) · 1.1 KB
/
liquidityProvider.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
. ./api.config
spread=
base=
stock=
baseexposure=
stockexposure=
basemax=
stockmax=
count=0
for i in "$@"; do
case $1 in
--spread=*) shift
spread="${i#*=}"
;;
--baseexposure=* | -be=*) shift
baseexposure="${i#*=}"
;;
--stockexposure=* | -be=*) shift
stockexposure="${i#*=}"
;;
--basemax=* | -be=*) shift
basemax="${i#*=}"
;;
--stockmax=* | -be=*) shift
stockmax="${i#*=}"
;;
--base=* | -b=*) shift
base="${i#*=}"
;;
--stock=* | -s=*) shift
stock="${i#*=}"
;;
--numorders=*) shift
numorders="${i#*=}"
;;
*) echo "invalid option passed in: $1"
exit 1
esac
let count=count+1
done
if [ $count -lt 8 ]; then
echo -e "\n Error: Not enough arguments provided; Please make sure you have read the documentation \n"
exit 1
fi
node ./src/main.js --apiKey=$apiKey --apiSecret=$apiSecret --spread=$spread --base=$base --stock=$stock --baseexposure=$baseexposure --stockexposure=$stockexposure --basemax=$basemax --stockmax=$stockmax --numorders=$numorders &> logs/$stock.$base.log &