瀏覽代碼

add depro price

Rony 3 年之前
父節點
當前提交
b2d0c57399
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      bsc_token_price.py

+ 6 - 0
bsc_token_price.py

@@ -16,6 +16,9 @@ TOKENPRICE = 'TOKENPRICE'
 TOKENPRICEDICT = 'TOKENPRICEDICT'
 TOKENWITHDRAW = 'TOKENWITHDRAW'
 
+DEPROCONTRACT = '0x9984086CB9d93dbe47C4e70890aAD5454bBc2518'
+DEPROPRICE = 0.01
+
 #dev ali
 #r = RedisCluster(host="r-bp1ps6my7lzg8rdhwxpi.redis.rds.aliyuncs.com", port=6379, password='Wqsd@2019', decode_responses=True, skip_full_coverage_check=True)
 
@@ -30,6 +33,7 @@ r = RedisCluster(host=REDIS_ONLINE, port=6379, decode_responses=True, skip_full_
 def getTokenList():
     l = []
     with open('/home/sh/token.txt') as f:
+    #with open('token.txt') as f:
         for line in f:
             l.append(line.strip())
     return l
@@ -62,6 +66,7 @@ def getAllPrice():
         l.append(info)
         bnbPrice = bnb
     l.append({'contract':BNBCONTRACT, 'usdPrice':bnbPrice})
+    l.append({'contract':DEPROCONTRACT, 'usdPrice':DEPROPRICE})
     r.set(TOKENPRICE, json.dumps({'tokenPrice':l}))
     return l
 
@@ -69,6 +74,7 @@ def getWithdrawFees():
     l = []
     priceList = getAllPrice()
     for i in priceList:
+       print(i)
        contract = i['contract']
        withdrawFeeCount = round(WITHDRAWFEEUSD/i['usdPrice'], 18)
        withdrawMinCount = withdrawFeeCount * WITHDRAWCOUNTBYFEE