web3-wizzard-lib 1.4.3__py3-none-any.whl → 1.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- web3_wizzard_lib/core/modules/debank_checker.py +2 -15
- web3_wizzard_lib/utils/__init__.py +0 -0
- web3_wizzard_lib/utils/debank_utils.py +19 -0
- {web3_wizzard_lib-1.4.3.dist-info → web3_wizzard_lib-1.5.0.dist-info}/METADATA +1 -1
- {web3_wizzard_lib-1.4.3.dist-info → web3_wizzard_lib-1.5.0.dist-info}/RECORD +8 -6
- {web3_wizzard_lib-1.4.3.data → web3_wizzard_lib-1.5.0.data}/data/requirements.txt +0 -0
- {web3_wizzard_lib-1.4.3.dist-info → web3_wizzard_lib-1.5.0.dist-info}/WHEEL +0 -0
- {web3_wizzard_lib-1.4.3.dist-info → web3_wizzard_lib-1.5.0.dist-info}/top_level.txt +0 -0
@@ -1,8 +1,8 @@
|
|
1
|
-
import requests
|
2
1
|
from sybil_engine.module.module import Module
|
3
2
|
from sybil_engine.utils.accumulator import add_accumulator, get_value
|
4
3
|
|
5
4
|
from web3_wizzard_lib.core.utils.statistic_utils import statistic_date_string, get_statistic_writer
|
5
|
+
from web3_wizzard_lib.utils.debank_utils import debank_request
|
6
6
|
|
7
7
|
TOTAL_USD = "TotalUSD"
|
8
8
|
DEBANK_ACC_NUM = "DEBANK_ACC_NUM"
|
@@ -34,7 +34,7 @@ class DebankChecker(Module):
|
|
34
34
|
]
|
35
35
|
|
36
36
|
def execute(self, account, statistic_write='GOOGLE'):
|
37
|
-
data =
|
37
|
+
data = debank_request(account)
|
38
38
|
|
39
39
|
job_name = f"debank_{statistic_date_string}"
|
40
40
|
statistics_writer = get_statistic_writer()
|
@@ -74,18 +74,5 @@ class DebankChecker(Module):
|
|
74
74
|
|
75
75
|
statistics_writer.write_row(job_name, cumulative_row)
|
76
76
|
|
77
|
-
def debank_request(self, account):
|
78
|
-
url = "https://pro-openapi.debank.com/v1/user/total_balance"
|
79
|
-
params = {
|
80
|
-
'id': account.address
|
81
|
-
}
|
82
|
-
headers = {
|
83
|
-
'accept': 'application/json',
|
84
|
-
'AccessKey': '6cd56a970242386fa2a57e380c39f00f10b31778'
|
85
|
-
}
|
86
|
-
response = requests.get(url, headers=headers, params=params)
|
87
|
-
data = response.json()
|
88
|
-
return data
|
89
|
-
|
90
77
|
def log(self):
|
91
78
|
return "Debank Checker"
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import requests
|
2
|
+
|
3
|
+
|
4
|
+
def debank_request(account):
|
5
|
+
url = "https://pro-openapi.debank.com/v1/user/total_balance"
|
6
|
+
params = {
|
7
|
+
'id': account.address
|
8
|
+
}
|
9
|
+
headers = {
|
10
|
+
'accept': 'application/json',
|
11
|
+
'AccessKey': '6cd56a970242386fa2a57e380c39f00f10b31778'
|
12
|
+
}
|
13
|
+
response = requests.get(url, headers=headers, params=params)
|
14
|
+
data = response.json()
|
15
|
+
return data
|
16
|
+
|
17
|
+
|
18
|
+
def debank_total_balance(account):
|
19
|
+
return debank_request(account).get('total_usd_value', 0)
|
@@ -102,7 +102,7 @@ web3_wizzard_lib/core/modules/claimer.py,sha256=zjlbckMB6YWOZ3NFZrYWIhZ0wMqV4Rdb
|
|
102
102
|
web3_wizzard_lib/core/modules/concrete_swap.py,sha256=nKhMX5Rlv4kqcNtfmEP8IFW9a4xnlAhjNkyTPrYby5s,3442
|
103
103
|
web3_wizzard_lib/core/modules/coredao_bridge.py,sha256=WPC8wZlu25s7Hb-Uj34HyapbBu2kkT-hP8xAeEqv9bw,1023
|
104
104
|
web3_wizzard_lib/core/modules/coredao_bridge_auto.py,sha256=lMKP07P5FuuSykN3eb3KN8R-MPBOdZHHN5IGkV8Zn8U,1447
|
105
|
-
web3_wizzard_lib/core/modules/debank_checker.py,sha256=
|
105
|
+
web3_wizzard_lib/core/modules/debank_checker.py,sha256=gBDjLORbbwUnPgMocd6n33ABQ0QJPwF-tsjATGU6uj4,2412
|
106
106
|
web3_wizzard_lib/core/modules/dmail.py,sha256=ox5sMMQ7OqpSnLdt3VSvS0eFEhK5Qy8JZB5MsmNkp9k,1703
|
107
107
|
web3_wizzard_lib/core/modules/erc20_balance.py,sha256=4mxd6QpOgnHHqUB0u6ya1Kh_xw3Mq7ObaILw8jgfVNk,1394
|
108
108
|
web3_wizzard_lib/core/modules/gmx_reward.py,sha256=tYKmDpSehpQLU7FFZALwXPnh_lY8pBDu1xq-uUjyNxA,1215
|
@@ -361,8 +361,10 @@ web3_wizzard_lib/resources/main/contracts.json,sha256=jGeEoEiys1Itg7s5WFIeVFKis9
|
|
361
361
|
web3_wizzard_lib/resources/main/networks.json,sha256=dmZLOsSaj2_CJwLqS4Deb4FgQrxPWpIQKGml6cXfKzI,6465
|
362
362
|
web3_wizzard_lib/resources/main/pairs.json,sha256=uvIFvY46Ctiw8hjGd9e-1WE0qLf_duo3MuZncRMLqGg,8262
|
363
363
|
web3_wizzard_lib/resources/main/tokens.json,sha256=AoZz_I6AVoZuecNdyX5L-SnGm6TREuPrsYd2i9PJr7U,5707
|
364
|
-
web3_wizzard_lib
|
365
|
-
web3_wizzard_lib
|
366
|
-
web3_wizzard_lib-1.
|
367
|
-
web3_wizzard_lib-1.
|
368
|
-
web3_wizzard_lib-1.
|
364
|
+
web3_wizzard_lib/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
365
|
+
web3_wizzard_lib/utils/debank_utils.py,sha256=9Sip0peXl66oDzEsITjOfrBoY7mIzebCTt0fNioLuwc,492
|
366
|
+
web3_wizzard_lib-1.5.0.data/data/requirements.txt,sha256=1yiy6f7m2XBGiXoYhSVTxI8SEsfimGGxBJU9708bYFE,20
|
367
|
+
web3_wizzard_lib-1.5.0.dist-info/METADATA,sha256=xo7NhClFz-8A6Cu6S2sZ4KA6-yYOvcUxkzHdldggxcw,428
|
368
|
+
web3_wizzard_lib-1.5.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
369
|
+
web3_wizzard_lib-1.5.0.dist-info/top_level.txt,sha256=8dD8S5HQo4dKtxogttWY_sh4n3yCVy0MwiTelYp6kug,28
|
370
|
+
web3_wizzard_lib-1.5.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|