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