bitmart优化完成

This commit is contained in:
Administrator
2025-12-16 10:13:00 +08:00
parent 2fcadd424e
commit b44b70ef59
5 changed files with 10 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -190,7 +190,7 @@ class WeexTransaction:
'unit': '30',
'resolution': 'M',
'contractID': '2',
'offset': '340',
'offset': '1',
'endTime': str(int(time.time())),
}
@@ -198,7 +198,7 @@ class WeexTransaction:
try:
res = self.session.get(
'https://contract-v2.bitmart.com/v1/ifcontract/quote/kline',
params=params, timeout=5
params=params, timeout=15
)
datas = []
@@ -322,9 +322,9 @@ class WeexTransaction:
self.pbar.refresh()
# 必须是整点或半点及前 5 分钟
if minute not in [0, 1, 2, 3, 4, 5, 30, 31, 32, 33, 34, 35]:
time.sleep(8)
return
# if minute not in [0, 1, 2, 3, 4, 5, 30, 31, 32, 33, 34, 35]:
# time.sleep(8)
# return
# 时间重复跳过
if self.time_start == self.get_half_hour_timestamp():
@@ -398,4 +398,8 @@ class WeexTransaction:
if __name__ == '__main__':
WeexTransaction(tge_id=196495).action()
while True:
try:
WeexTransaction(tge_id=196495).action()
except:
time.sleep(5)