forked from rfkinline/BTC-Dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
257 lines (245 loc) · 3.99 KB
/
config.py
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
from tkinter import *
version = "v2.3.1"
### Default refresh time in seconds (change to your liking) ###
default_refresh = 10
### Trend Indicators and Color Controls ###
# Display tresholds (change color if value increased/decreased more than x%).
disppricebtc1hrchangediff = 2 # checked once / hr
dispmarketcap24h = 2 # checked once / day
disphashrate24hrdiff = 1 # checked every 5 minutes
dispmempooldiff = 5 # checked every 5 minutes
dispaverage_transaction_fee_usd_24hdiff = 10 # checked every 5 minutes
### GUI Variables ###
root = Tk()
splash = Toplevel()
width_value = 0
height_value = 0
### API Call Variables ###
try:
refreshtime
except NameError:
if default_refresh < 1 or default_refresh > 86400:
default_refresh = 10
refreshtime = default_refresh * 1000
else:
refreshtime = default_refresh * 1000
try:
new_refreshtime
except NameError:
new_refreshtime = refreshtime
### Alternative API Variables ###
alterror = 0
alte1 = ""
alte2 = ""
try:
fearindex
except NameError:
fearindex = ""
try:
fearindexvalue
except NameError:
fearindexvalue = 0
### Bitstamp API Variables ###
bserror = 0
bs1 = ""
bs2 = ""
try:
pricebtc
except NameError:
pricebtc = 0
try:
satsusd
except NameError:
satsusd = 0
### BlockChair API Variables ###
bcerror = 0
bc1 = ""
bc2 = ""
try:
average_transaction_fee_sats_24h
except NameError:
average_transaction_fee_sats_24h = 0
try:
average_transaction_fee_usd_24h
except NameError:
average_transaction_fee_usd_24h = 0
try:
blocks_24h
except NameError:
blocks_24h = 0
try:
hashrate24hr
except NameError:
hashrate24hr = 0
try:
hodling_addresses
except NameError:
hodling_addresses = 0
try:
market_dominance_percentage
except NameError:
market_dominance_percentage = 0
try:
median_transaction_fee_sats_24h
except NameError:
median_transaction_fee_sats_24h = 0
try:
median_transaction_fee_usd_24h
except NameError:
median_transaction_fee_usd_24h = 0
try:
mempool_total_fee_usd
except NameError:
mempool_total_fee_usd = 0
try:
mempool_tps
except NameError:
mempool_tps = 0
try:
next_retarget_time_estimate
except NameError:
next_retarget_time_estimate = 0
try:
timechain_size
except NameError:
timechain_size = 0
try:
total_outputs
except NameError:
total_outputs = 0
try:
total_transactions
except NameError:
total_transactions = 0
try:
volume_24h
except NameError:
volume_24h = 0
### CoinGecko API Variables ###
cgerror = 0
cg1 = ""
cg2 = ""
try:
ath
except NameError:
ath = 0
try:
athdate
except NameError:
athdate = "2009-01-03"
try:
circulating_supply
except NameError:
circulating_supply = 0
try:
high24h
except NameError:
high24h = 0
try:
low24h
except NameError:
low24h = 0
try:
marketcap24h
except NameError:
marketcap24h = 0
try:
marketcapbtc
except NameError:
marketcapbtc = 0
try:
pricebtc1hrchange
except NameError:
pricebtc1hrchange = 0
try:
pricebtc24hrchange
except NameError:
pricebtc24hrchange = 0
### Mempool API Variables ###
mempoolerror = 0
mp1 = ""
mp2 = ""
try:
blocks
except NameError:
blocks = 0
try:
mempool
except NameError:
mempool = 0
try:
highfee
except NameError:
highfee = 0
try:
mediumfee
except NameError:
mediumfee = 0
try:
lowfee
except NameError:
lowfee = 0
try:
currenthashrate
except NameError:
currenthashrate = 0
try:
currentdifficulty
except NameError:
currentdifficulty = 0
try:
diffadj
except NameError:
diffadj = 0
try:
oldblock
except NameError:
oldblock = 0
try:
newBlock
except NameError:
newBlock = 0
try:
timestamp
except NameError:
timestamp = 0
try:
lasthash
except NameError:
lasthash = 0
try:
node_connected
except NameError:
node_connected = 0
try:
ip_url
except NameError:
ip_url = "http://192.168.1.2:3006/"
### ML1 API Variables ###
mlerror = 0
mle1 = ""
mle2 = ""
try:
LNDCap
except NameError:
LNDCap = 0
try:
lnodes
except NameError:
lnodes = 0
try:
lnchannels
except NameError:
lnchannels = 0
try:
lndcap_chg
except NameError:
lndcap_chg = 0
try:
lnodes_chg
except NameError:
lnodes_chg = 0
try:
lnchannels_chg
except NameError:
lnchannels_chg = 0