|
@@ -51,6 +51,7 @@ def getPrice(contract):
|
|
response = requests.get(f'https://deep-index.moralis.io/api/v2/erc20/{contract}/price', headers=headers,
|
|
response = requests.get(f'https://deep-index.moralis.io/api/v2/erc20/{contract}/price', headers=headers,
|
|
params=params)
|
|
params=params)
|
|
result = response.json()
|
|
result = response.json()
|
|
|
|
+ print(result)
|
|
usdPrice = result['usdPrice']
|
|
usdPrice = result['usdPrice']
|
|
bnbPrice = int(result['nativePrice']['value'])/1000000000000000000
|
|
bnbPrice = int(result['nativePrice']['value'])/1000000000000000000
|
|
try:
|
|
try:
|
|
@@ -65,6 +66,7 @@ def getAllPrice():
|
|
bnbPrice = 0
|
|
bnbPrice = 0
|
|
tokenList = getTokenList()
|
|
tokenList = getTokenList()
|
|
for i in tokenList:
|
|
for i in tokenList:
|
|
|
|
+ time.sleep(1)
|
|
info, bnb = getPrice(i)
|
|
info, bnb = getPrice(i)
|
|
l.append(info)
|
|
l.append(info)
|
|
if bnb != 0:
|
|
if bnb != 0:
|