Rony před 3 roky
rodič
revize
ad39404901
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      bsc_token_price.py

+ 4 - 1
bsc_token_price.py

@@ -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'))