Query
Get Tokens, NFTs or SFTs For Wallet
Retrieve a paginated list of token (ERC20), NFT (ERC721) or SFT (ERC1155) metadata for a wallet address.
Depending on wether your contract is a token (ERC20), NFT (ERC721) or SFT (ERC1155) your query will change slightly.
Retrieve token metadata (ERC20)
Make a GET request to /wallet/{wallet_address}/tokens. Similar to the query tokens endpoint, except this will return paginated list.
const wallet_address = '0xb47D95141Be738F25ffbB546aD678D8fcEe71752' const url = `https://api.utiliti.ai/wallets/${wallet_address}/tokens` const contract_address = '0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4' 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': '<YOUR_API_KEY_HERE>', }, })
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/wallet/wallet_address/tokens?wallet_address=0xb47D95141Be738F25ffbB546aD678D8fcEe71752&contract_address=contract_address&network_id=network_id"); 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/wallet/wallet_address/tokens?wallet_address=0xb47D95141Be738F25ffbB546aD678D8fcEe71752&contract_address=contract_address&network_id=network_id' \ --header 'X-API-key: <YOUR_API_KEY_HERE>' \ --header 'accept: application/json'
$python -m pip install requests --- import requests url = "https://api.utiliti.ai/wallet/wallet_address/tokens?wallet_address=0xb47D95141Be738F25ffbB546aD678D8fcEe71752&contract_address=contract_address&network_id=network_id" headers = { "accept": "application/json", "X-API-key": "<YOUR_API_KEY_HERE>" } response = requests.get(url, headers=headers) print(response.text)
Retrieve NFT metadata (ERC721)
Make a GET request to /wallet/{wallet_address}/nfts. Similar to the query NFTs endpoint, except this will return paginated list.
const wallet_address = '0xb47D95141Be738F25ffbB546aD678D8fcEe71752' const url = `https://api.utiliti.ai/wallets/${wallet_address}/nfts` const contract_address = '0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4' 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': '<YOUR_API_KEY_HERE>', }, })
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/wallet/wallet_address/nfts?wallet_address=0xb47D95141Be738F25ffbB546aD678D8fcEe71752&contract_address=contract_address&network_id=network_id"); 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/wallet/wallet_address/nfts?wallet_address=0xb47D95141Be738F25ffbB546aD678D8fcEe71752&contract_address=contract_address&network_id=network_id' \ --header 'X-API-key: <YOUR_API_KEY_HERE>' \ --header 'accept: application/json'
$python -m pip install requests --- import requests url = "https://api.utiliti.ai/wallet/wallet_address/nfts?wallet_address=0xb47D95141Be738F25ffbB546aD678D8fcEe71752&contract_address=contract_address&network_id=network_id" headers = { "accept": "application/json", "X-API-key": "<YOUR_API_KEY_HERE>" } response = requests.get(url, headers=headers) print(response.text)
Retrieve SFT metadata (ERC1155)
Make a GET request to /wallet/{wallet_address}/sfts. Similar to the query SFTs endpoint, except this will return paginated list.
const wallet_address = '0xb47D95141Be738F25ffbB546aD678D8fcEe71752' const url = `https://api.utiliti.ai/wallets/${wallet_address}/sfts` const contract_address = '0xD77e17Ecc3942B6E83F67c56999C5230c70A85a4' 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': '<YOUR_API_KEY_HERE>', }, })
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/wallet/wallet_address/sfts?wallet_address=0xb47D95141Be738F25ffbB546aD678D8fcEe71752&contract_address=contract_address&network_id=network_id"); 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/wallet/wallet_address/sfts?wallet_address=0xb47D95141Be738F25ffbB546aD678D8fcEe71752&contract_address=contract_address&network_id=network_id' \ --header 'X-API-key: <YOUR_API_KEY_HERE>' \ --header 'accept: application/json'
$python -m pip install requests --- import requests url = "https://api.utiliti.ai/wallet/wallet_address/sfts?wallet_address=0xb47D95141Be738F25ffbB546aD678D8fcEe71752&contract_address=contract_address&network_id=network_id" headers = { "accept": "application/json", "X-API-key": "<YOUR_API_KEY_HERE>" } response = requests.get(url, headers=headers) print(response.text)