Query
Get Tokens, NFTs or SFTs For Contract
Retrieve a paginated list of token (ERC20), NFT (ERC721) or SFT (ERC1155) metadata for a contract address.
Retrieve token (ERC20) metadata
A GET request to contracts/${contract_address}/tokens. Similar to the get token endpoint, except this will return paginated list.
const contract_address = '0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4' const url = `https://api.utiliti.ai/contracts/${contract_address}/tokens` const network_id = '1' // ethereum const query = `?contract_address=${contract_address}&network_id=${network_id}` const response = await fetch(url + query, { method: 'GET', headers: { 'Content-Type': 'application/json', 'X-API-key': '3fa85f64-5717-4562-b3fc-2c963f66afa6', //replace }, })
SDK coming soon...
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://api.utiliti.ai/contracts/0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4/tokens?contract_address=0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4&network_id=1"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "accept: application/json"); headers = curl_slist_append(headers, "X-API-key: <YOUR_API_KEY_HERE>"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
curl --request GET \ --url 'https://api.utiliti.ai/contracts/0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4/tokens?contract_address=0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4&network_id=1' \ --header 'X-API-key: <YOUR_API_KEY_HERE>' \ --header 'accept: application/json'
$python -m pip install requests --- import requests url = "https://api.utiliti.ai/contracts/0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4/tokens?contract_address=0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4&network_id=1" headers = { "accept": "application/json", "X-API-key": "<YOUR_API_KEY_HERE>" } response = requests.get(url, headers=headers) print(response.text)
Retrieve NFT (ERC721) metadata
A GET request to contracts/${contract_address}/nfts. Similar to the get NFT endpoint, except this will return paginated list.
const contract_address = '0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4' const url = `https://api.utiliti.ai/contracts/${contract_address}/nfts` const network_id = '1' // ethereum const query = `?contract_address=${contract_address}&network_id=${network_id}` const response = await fetch(url + query, { method: 'GET', headers: { 'Content-Type': 'application/json', 'X-API-key': '3fa85f64-5717-4562-b3fc-2c963f66afa6', //replace }, })
SDK coming soon...
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://api.utiliti.ai/contracts/0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4/nfts?contract_address=0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4&network_id=1"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "accept: application/json"); headers = curl_slist_append(headers, "X-API-key: <YOUR_API_KEY_HERE>"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
curl --request GET \ --url 'https://api.utiliti.ai/contracts/0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4/nfts?contract_address=0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4&network_id=1' \ --header 'X-API-key: <YOUR_API_KEY_HERE>' \ --header 'accept: application/json'
$python -m pip install requests --- import requests url = "https://api.utiliti.ai/contracts/0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4/nfts?contract_address=0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4&network_id=1" headers = { "accept": "application/json", "X-API-key": "<YOUR_API_KEY_HERE>" } response = requests.get(url, headers=headers) print(response.text)
Retrieve SFT (ERC1155) metadata
A GET request to contracts/${contract_address}/sfts. Similar to the get SFT endpoint, except this will return paginated list.
const contract_address = '0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4' const url = `https://api.utiliti.ai/contracts/${contract_address}/sfts` const network_id = '1' // ethereum const query = `?contract_address=${contract_address}&network_id=${network_id}` const response = await fetch(url + query, { method: 'GET', headers: { 'Content-Type': 'application/json', 'X-API-key': '3fa85f64-5717-4562-b3fc-2c963f66afa6', //replace }, })
SDK coming soon...
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://api.utiliti.ai/contracts/0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4/sfts?contract_address=0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4&network_id=1"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "accept: application/json"); headers = curl_slist_append(headers, "X-API-key: <YOUR_API_KEY_HERE>"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
curl --request GET \ --url 'https://api.utiliti.ai/contracts/0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4/sfts?contract_address=0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4&network_id=1' \ --header 'X-API-key: <YOUR_API_KEY_HERE>' \ --header 'accept: application/json'
$python -m pip install requests --- import requests url = "https://api.utiliti.ai/contracts/0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4/sfts?contract_address=0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4&network_id=1" headers = { "accept": "application/json", "X-API-key": "<YOUR_API_KEY_HERE>" } response = requests.get(url, headers=headers) print(response.text)