|
@@ -3,6 +3,9 @@ import time
|
|
|
from rediscluster import RedisCluster
|
|
|
import requests
|
|
|
import json
|
|
|
+import datetime
|
|
|
+
|
|
|
+print(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
|
|
|
|
|
|
BNBCONTRACT = '0x0000000000000000000000000000000000000000'
|
|
|
WITHDRAWFEEUSD = 0.5 #提现手续费,标的是usdt单位
|
|
@@ -44,7 +47,6 @@ def getPrice(contract):
|
|
|
response = requests.get(f'https://deep-index.moralis.io/api/v2/erc20/{contract}/price', headers=headers,
|
|
|
params=params)
|
|
|
result = response.json()
|
|
|
- print(result)
|
|
|
usdPrice = result['usdPrice']
|
|
|
bnbPrice = int(result['nativePrice']['value'])/1000000000000000000
|
|
|
priceOfBnb = usdPrice/bnbPrice
|
|
@@ -78,3 +80,4 @@ getWithdrawFees()
|
|
|
|
|
|
print(r.get(TOKENPRICE))
|
|
|
print(r.get(TOKENWITHDRAW))
|
|
|
+print(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
|