Rony 3 gadi atpakaļ
vecāks
revīzija
43fe23d19c
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      bsc_token_price.py

+ 2 - 0
bsc_token_price.py

@@ -51,6 +51,7 @@ 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
     try:
@@ -65,6 +66,7 @@ def getAllPrice():
     bnbPrice = 0
     tokenList = getTokenList()
     for i in tokenList:
+        time.sleep(1)
         info, bnb = getPrice(i)
         l.append(info)
         if bnb != 0: