Skip to main content
GET
/
v1
/
nft
/
{collectionAddress}
/
asset
/
{tokenId}
cURL
curl --request GET \
  --url 'https://api.coinstats.app/v1/nft/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/asset/108' \
  --header 'X-API-KEY: <api-key>'
import requests

url = "https://api.coinstats.app/v1/nft/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/asset/108"

headers = {"X-API-KEY": "<api-key>"}

response = requests.request("GET", url, headers=headers)

print(response.json())
const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};

fetch('https://api.coinstats.app/v1/nft/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/asset/108', options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coinstats.app/v1/nft/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/asset/108",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"io"
"net/http"
)

func main() {

url := "https://api.coinstats.app/v1/nft/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/asset/108"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-KEY", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.get("https://api.coinstats.app/v1/nft/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/asset/108")
.header("X-API-KEY", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.coinstats.app/v1/nft/{collectionAddress}/asset/{tokenId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'

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"
}
5 credits per request

  • collectionAddress: Path parameter. NFT collection contract address.
  • tokenId: Path parameter. Identifier of the asset within the collection.

Authorizations

X-API-KEY
string
header
required

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.

Path Parameters

collectionAddress
string
required

The address of the NFT collection

Example:

"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"

tokenId
string
required

The Token ID of the NFT asset

Example:

"108"

Response

Get single asset

address
string
required

The contract address of the NFT

Example:

"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"

blockchain
string
required

The blockchain network where the NFT exists

Example:

"ethereum"

tokenId
string
required

The unique token ID of the NFT within the collection

Example:

"0"

attributes
object[]
required

Array of NFT attributes/traits with detailed metadata

Example:
[
{
"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
string
required

Unique identifier for the NFT collection

Example:

"e1d92f9a882dd4db91feabe806a326af"

name
string | null
required

Name of the NFT (can be null for some NFTs)

Example:

null

previewUrl
string
required

URL for the preview/thumbnail image of the NFT

Example:

"https://img.reservoir.tools/images/v2/mainnet/7%2FrdF%2Fe%2F0iXY8HduhRCoIehkmFeXPeOQQFbbmIPfjCZeLloToqp073iyCX%2FAT3E6uYDqjoHHp1CsuC3u6gJ%2BxixS6XKRAFdBaJMUefz4QR69ZDW9ItgF7Bv047qTmFku0Hxt5Ib2RmfppbDYaFxKWQ%3D%3D"

rarityRank
number
required

Rarity rank of the NFT within its collection (lower numbers indicate higher rarity)

Example:

2673

rarityScore
number
required

Numerical rarity score calculated based on trait distribution

Example:

75.409

source
string
required

Data source provider for the NFT information

Example:

"reservoir"

standard
string
required

NFT token standard (ERC721, ERC1155, etc.)

Example:

"ERC721"

url
string
required

Full-resolution image URL of the NFT

Example:

"https://img.reservoir.tools/images/v2/mainnet/i9YO%2F4yHXUdJsWcTqhqvf%2BytcG2XMhnD4zz%2BhMYH9%2FZK%2FhVtu%2B3gYAAVBBdL1dsMoZPY79XY4AQ%2FN91VDNlxaLilzKrcVKu%2FcHUBfdHr%2BSM%3D"

lastSaleDate
string<date-time>

Date of the last sale transaction for this NFT

Example:

"2024-01-15T10:30:00.000Z"

lastSalePrice
number

Price of the last sale transaction for this NFT

Example:

15.75

listSource
object

Source platform where the NFT is currently listed

Example:

"opensea"

listPrice
number

Current listing price of the NFT if it is for sale

Example:

20.5