Task A

mail@pastecode.io avatar
unknown
python
3 years ago
358 B
2
Indexable
Never
#!/usr/bin/python
# Get NFT1 holders
import requests
chainid=1
NFT1="0xd21a23606D2746f086f6528Cd6873bAD3307b903"
URL = "https://api.covalenthq.com/v1/"+str(chainid)+"/tokens/"+NFT1+"/token_holders/?&key=ckey_80d0aba5413a4a5a8e0d2d315f6";

r = requests.get(url = URL)

data = r.json()
for item in data['data']['items']:
    print(item['address'])