-
Notifications
You must be signed in to change notification settings - Fork 828
/
Copy pathK.sh.dist
110 lines (110 loc) · 6.75 KB
/
K.sh.dist
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/usr/bin/env sh
# █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
# ▓ ████ ███ Usage? use current filename of THIS file: █
# ▒ ████ ███ $ ./K.sh --help █
# ▓███▀█▄ !Feel free to copy/move/rename THIS file. █
# ▒ ▒▓██ ███ !Feel free to un/comment any examples but █
# ▓ ░▒▓█ ███ do not define multiple times a variable. █
# █ configurable! executable! K.sh initialization file █
# █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀▄▄██▄▌ ▌▐ ▐▄██▄▄▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
# █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄▀▀▀▀▀▌▄ ▄▐▀▀▀▀▀▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
# █▌ Today, is a beautiful day.▐▌.btw, on THIS file.. ▐█
# ██ I. Define another file to wrap and run.... F F ██
# ██ II. Define hardcoded optional arguments.... E R ██
# ██ III. Define super secret API credentials.... E E ██
# ██ IV. Run a file (I) until CTRL+C or kill -9. L E ██
# ██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄.▄!▄!▄██
# ▌___ .
# ▌ I ▐________________________________________________.
# ▌¯¯¯ .
# █ K_BINARY_FILE .
# ██ - Allows one executable file available on any PATH.
# ██ .
#K_BINARY_FILE="K-+portfolios"
#K_BINARY_FILE="K-hello-world"
#K_BINARY_FILE="K-scaling-bot"
#K_BINARY_FILE="K-stable--bot"
K_BINARY_FILE="K-trading-bot"
# ██ .
# ██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
# ▌____ .
# ▌ II ▐_______________________________________________.
# ▌¯¯¯¯ .
# █ OPTIONAL_ARGUMENTS .
# ██ - Allows a list of arguments (see usage at --help).
# ██ (to avoid to write it always in the command-line).
# ██ .
#OPTIONAL_ARGUMENTS="--colors --autobot --port 3000"
OPTIONAL_ARGUMENTS="--colors --naked --heartbeat"
# ██ .
# ██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
# ▌_____ .
# ▌ III ▐______________________________________________.
# ▌¯¯¯¯¯ .
# █ API_EXCHANGE .
# ██ - Allows only one of the following exchanges below.
# ██ .
#API_EXCHANGE="COINBASE"
#API_EXCHANGE="BINANCE"
#API_EXCHANGE="BINANCE_US"
#API_EXCHANGE="KRAKEN"
#API_EXCHANGE="BITMEX"
#API_EXCHANGE="KUCOIN"
#API_EXCHANGE="BITFINEX"
#API_EXCHANGE="BITFINEX_MARGIN"
#API_EXCHANGE="ETHFINEX"
#API_EXCHANGE="ETHFINEX_MARGIN"
#API_EXCHANGE="GATEIO"
#API_EXCHANGE="HITBTC"
#API_EXCHANGE="BEQUANT"
#API_EXCHANGE="POLONIEX"
# ▌____________________________________________________.
# █ API_CURRENCY .
# ██ - Allows any currency pair (with format "AAA/ZZZ").
# ██ (see the website of the exchange for all symbols).
# ██ .
#API_CURRENCY="BTC/EUR"
# ▌____________________________________________________.
# █ API_KEY .
# ██ - Allows any valid API KEY (never share!) .
# ██ (see the website of the exchange please) .
# ██ (on COINBASE is called API KEY NAME, and .
# ██ is only visible while creating the keys) .
# ██ .
#API_KEY="cdp_exampleapikey"
# ▌____________________________________________________.
# █ API_SECRET .
# ██ - Allows any valid API SECRET (never share!) .
# ██ (see the website of the exchange thank you) .
# ██ (must be one line, as UUID or EC PKEY cert) .
# ██ .
#API_SECRET="-----BEGIN EC PRIVATE KEY-----\nexampleapisecret\n-----END EC PRIVATE KEY-----\n"
# ▌____________________________________________________.
# █ API_KEY_ID .
# ██ - Allows any valid API KEY ID (never share!) .
# ██ (only COINBASE/KUCOIN must have API_KEY_ID) .
# ██ (can be safely ignored for all other exchanges) .
# ██ (see the website of COINBASE/KUCOIN for + info) .
# ██ (from COINBASE it can be copy&pasted anytime, but.
# ██ on KUCOIN is named PASSPHRASE because of reasons).
# ██ .
#API_KEY_ID="exampleapikeyid"
# ██ .
# ██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
# ▌____ .
# ▌ IV ▐______________________________________________ .
# ▌¯¯¯¯ .
`#gdb -ex run --args` `#valgrind` \
$K_BINARY_FILE \
--title ${0##*/} \
--exchange ${API_EXCHANGE:-""} \
--currency ${API_CURRENCY:-""} \
--apikey ${API_KEY:-""} \
--secret "${API_SECRET:-""}" \
--apikeyid ${API_KEY_ID:-""} \
$OPTIONAL_ARGUMENTS "$@" ;
# ▌ ___________________________________________________.
# █ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯.
# ██ - That's all. To create multiple *.sh files: .
# ██ $ cp etc/K.sh.dist X.sh && chmod +x X.sh .
# ██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄:wq