curl --request POST \
--url https://api.coinstats.app/v1/nft/tokens/batch \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"tokens": [
{
"contractAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"tokenId": "1",
"blockchain": "ethereum"
}
]
}
'import requests
url = "https://api.coinstats.app/v1/nft/tokens/batch"
payload = { "tokens": [
{
"contractAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"tokenId": "1",
"blockchain": "ethereum"
}
] }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tokens: [
{
contractAddress: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d',
tokenId: '1',
blockchain: 'ethereum'
}
]
})
};
fetch('https://api.coinstats.app/v1/nft/tokens/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coinstats.app/v1/nft/tokens/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tokens' => [
[
'contractAddress' => '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d',
'tokenId' => '1',
'blockchain' => 'ethereum'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coinstats.app/v1/nft/tokens/batch"
payload := strings.NewReader("{\n \"tokens\": [\n {\n \"contractAddress\": \"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d\",\n \"tokenId\": \"1\",\n \"blockchain\": \"ethereum\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coinstats.app/v1/nft/tokens/batch")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tokens\": [\n {\n \"contractAddress\": \"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d\",\n \"tokenId\": \"1\",\n \"blockchain\": \"ethereum\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinstats.app/v1/nft/tokens/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tokens\": [\n {\n \"contractAddress\": \"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d\",\n \"tokenId\": \"1\",\n \"blockchain\": \"ethereum\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"blockchain": "ethereum",
"tokenId": "0",
"attributes": [
{
"key": "Background",
"kind": "string",
"value": "Orange",
"tokenCount": 1274,
"onSaleCount": 41,
"floorAskPrice": 10.5,
"topBidValue": 10,
"createdAt": "2024-01-27T07:15:58.523Z"
},
{
"key": "Clothes",
"kind": "string",
"value": "Striped Tee",
"tokenCount": 412,
"onSaleCount": 10,
"floorAskPrice": 10.72,
"topBidValue": null,
"createdAt": "2024-01-27T07:15:58.719Z"
}
],
"collectionId": "e1d92f9a882dd4db91feabe806a326af",
"name": null,
"previewUrl": "https://img.reservoir.tools/images/v2/mainnet/7%2FrdF%2Fe%2F0iXY8HduhRCoIehkmFeXPeOQQFbbmIPfjCZeLloToqp073iyCX%2FAT3E6uYDqjoHHp1CsuC3u6gJ%2BxixS6XKRAFdBaJMUefz4QR69ZDW9ItgF7Bv047qTmFku0Hxt5Ib2RmfppbDYaFxKWQ%3D%3D",
"rarityRank": 2673,
"rarityScore": 75.409,
"source": "reservoir",
"standard": "ERC721",
"url": "https://img.reservoir.tools/images/v2/mainnet/i9YO%2F4yHXUdJsWcTqhqvf%2BytcG2XMhnD4zz%2BhMYH9%2FZK%2FhVtu%2B3gYAAVBBdL1dsMoZPY79XY4AQ%2FN91VDNlxaLilzKrcVKu%2FcHUBfdHr%2BSM%3D",
"lastSaleDate": "2024-01-15T10:30:00.000Z",
"lastSalePrice": 15.75,
"listSource": "opensea",
"listPrice": 20.5
}
]{
"statusCode": 400,
"message": "Bad Request",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 401,
"message": "Unauthorized",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 403,
"message": "Forbidden",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 404,
"message": "Not Found",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 409,
"message": "Transactions not synced",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 503,
"message": "Service Unavailable. Please Contact Support"
}Get NFT Tokens Batch
Get up to 100 NFTs across chains in one request.
curl --request POST \
--url https://api.coinstats.app/v1/nft/tokens/batch \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"tokens": [
{
"contractAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"tokenId": "1",
"blockchain": "ethereum"
}
]
}
'import requests
url = "https://api.coinstats.app/v1/nft/tokens/batch"
payload = { "tokens": [
{
"contractAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"tokenId": "1",
"blockchain": "ethereum"
}
] }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tokens: [
{
contractAddress: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d',
tokenId: '1',
blockchain: 'ethereum'
}
]
})
};
fetch('https://api.coinstats.app/v1/nft/tokens/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coinstats.app/v1/nft/tokens/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tokens' => [
[
'contractAddress' => '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d',
'tokenId' => '1',
'blockchain' => 'ethereum'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coinstats.app/v1/nft/tokens/batch"
payload := strings.NewReader("{\n \"tokens\": [\n {\n \"contractAddress\": \"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d\",\n \"tokenId\": \"1\",\n \"blockchain\": \"ethereum\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coinstats.app/v1/nft/tokens/batch")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tokens\": [\n {\n \"contractAddress\": \"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d\",\n \"tokenId\": \"1\",\n \"blockchain\": \"ethereum\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinstats.app/v1/nft/tokens/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tokens\": [\n {\n \"contractAddress\": \"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d\",\n \"tokenId\": \"1\",\n \"blockchain\": \"ethereum\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"address": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"blockchain": "ethereum",
"tokenId": "0",
"attributes": [
{
"key": "Background",
"kind": "string",
"value": "Orange",
"tokenCount": 1274,
"onSaleCount": 41,
"floorAskPrice": 10.5,
"topBidValue": 10,
"createdAt": "2024-01-27T07:15:58.523Z"
},
{
"key": "Clothes",
"kind": "string",
"value": "Striped Tee",
"tokenCount": 412,
"onSaleCount": 10,
"floorAskPrice": 10.72,
"topBidValue": null,
"createdAt": "2024-01-27T07:15:58.719Z"
}
],
"collectionId": "e1d92f9a882dd4db91feabe806a326af",
"name": null,
"previewUrl": "https://img.reservoir.tools/images/v2/mainnet/7%2FrdF%2Fe%2F0iXY8HduhRCoIehkmFeXPeOQQFbbmIPfjCZeLloToqp073iyCX%2FAT3E6uYDqjoHHp1CsuC3u6gJ%2BxixS6XKRAFdBaJMUefz4QR69ZDW9ItgF7Bv047qTmFku0Hxt5Ib2RmfppbDYaFxKWQ%3D%3D",
"rarityRank": 2673,
"rarityScore": 75.409,
"source": "reservoir",
"standard": "ERC721",
"url": "https://img.reservoir.tools/images/v2/mainnet/i9YO%2F4yHXUdJsWcTqhqvf%2BytcG2XMhnD4zz%2BhMYH9%2FZK%2FhVtu%2B3gYAAVBBdL1dsMoZPY79XY4AQ%2FN91VDNlxaLilzKrcVKu%2FcHUBfdHr%2BSM%3D",
"lastSaleDate": "2024-01-15T10:30:00.000Z",
"lastSalePrice": 15.75,
"listSource": "opensea",
"listPrice": 20.5
}
]{
"statusCode": 400,
"message": "Bad Request",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 401,
"message": "Unauthorized",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 403,
"message": "Forbidden",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 404,
"message": "Not Found",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 409,
"message": "Transactions not synced",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 503,
"message": "Service Unavailable. Please Contact Support"
}Required
Required
- tokens: Body. Array of { blockchain, contractAddress, tokenId }, up to 100.
Authorizations
API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the X-API-KEY request header. Never expose your key in client-side code.
Body
Tokens to look up, up to 100, across any supported chains.
Show child attributes
Show child attributes
Response
Assets in request order; tokens that do not exist are null.
The contract address of the NFT
"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"
The blockchain network where the NFT exists
"ethereum"
The unique token ID of the NFT within the collection
"0"
Array of NFT attributes/traits with detailed metadata
Show child attributes
Show child attributes
[
{
"key": "Background",
"kind": "string",
"value": "Orange",
"tokenCount": 1274,
"onSaleCount": 41,
"floorAskPrice": 10.5,
"topBidValue": 10,
"createdAt": "2024-01-27T07:15:58.523Z"
},
{
"key": "Clothes",
"kind": "string",
"value": "Striped Tee",
"tokenCount": 412,
"onSaleCount": 10,
"floorAskPrice": 10.72,
"topBidValue": null,
"createdAt": "2024-01-27T07:15:58.719Z"
}
]
Unique identifier for the NFT collection
"e1d92f9a882dd4db91feabe806a326af"
Name of the NFT (can be null for some NFTs)
null
URL for the preview/thumbnail image of the NFT
"https://img.reservoir.tools/images/v2/mainnet/7%2FrdF%2Fe%2F0iXY8HduhRCoIehkmFeXPeOQQFbbmIPfjCZeLloToqp073iyCX%2FAT3E6uYDqjoHHp1CsuC3u6gJ%2BxixS6XKRAFdBaJMUefz4QR69ZDW9ItgF7Bv047qTmFku0Hxt5Ib2RmfppbDYaFxKWQ%3D%3D"
Rarity rank of the NFT within its collection (lower numbers indicate higher rarity)
2673
Numerical rarity score calculated based on trait distribution
75.409
Data source provider for the NFT information
"reservoir"
NFT token standard (ERC721, ERC1155, etc.)
"ERC721"
Full-resolution image URL of the NFT
"https://img.reservoir.tools/images/v2/mainnet/i9YO%2F4yHXUdJsWcTqhqvf%2BytcG2XMhnD4zz%2BhMYH9%2FZK%2FhVtu%2B3gYAAVBBdL1dsMoZPY79XY4AQ%2FN91VDNlxaLilzKrcVKu%2FcHUBfdHr%2BSM%3D"
Date of the last sale transaction for this NFT
"2024-01-15T10:30:00.000Z"
Price of the last sale transaction for this NFT
15.75
Source platform where the NFT is currently listed
"opensea"
Current listing price of the NFT if it is for sale
20.5
Was this page helpful?