Fetching Collectible Data

Once a collectible has been created in ORB, there are multiple ways and Queries to use in order to fetch information about it.

Fetch all collectibles under a specific collection

If you are looking to retrieve all the collectibles that have been created in a specific collection, together with information about them, you can use the following Query.

GetCollectionTokens
query GetCollectionTokens($collectionId: String!) {
  GetCollectionTokens(collectionId: $collectionId) {
    tokenId
    metadata
    maxEditions
    name
    offers
    owners
    totalBurned
    totalMinted
    totalSupply
  }
}
Input Variables
"collectionId" : "KT1SjwraTtii88ZaEs8ReU6wkUreTvM8qfaa"

Below is an explanation of the response fields.

Response Field

tokenId

The id of the collectible

imageUrl

The IPFS/Url that the image of the collectible is stored at.

metadata

The IPFS/JSON file which contains all the metadata of the collectible.

maxEditions

The maximum number of editions that were set when the collectible was created.

name

The name of the collectible.

offers

A list containing all the offers that have been made to this collectible.

owners

A list containing all the wallet addresses which own an edition of this collectible.

totalBurned

The total amount of editions of a collectible that have been burned.

totalMinted

The total amount of editions of a collectible that have been minted.

totalSupply

The total amount of editions of a collectible that have been set upon the creation of the collectible.

Fetch information about a specific collectible

Use the following Query to retrieve information about a specified collectible.

GetTokenInfo
query GetTokenInfo($collectionId: String!, $tokenId: String!) {
  GetTokenInfo(collectionId: $collectionId, tokenId: $tokenId) {
    balancesCount
    holdersCount
    maxEditions
    metadata
    standard
    tokenId
    orbInfusedAmount
    totalBurned
    totalMinted
    totalSupply
  }
}
Input Variables
"collectionId" : "KT1SjwraTtii88ZaEs8ReU6wkUreTvM8qfaa",
  "tokenId" : "0"
Sample Response
{
  "data": {
    "GetTokenInfo": {
      "balancesCount": 2,
      "holdersCount": 2,
      "maxEditions": 10,
      "metadata": {
        "name": "Honeyheart",
        "image": "http://test.com/img/SmileyBear1.png",
        "displayUri": "http://test.com/img/SmileyBear1.png",
        "artifactUri": "http://test.com/img/SmileyBear1.png",
        "description": "Part of the Smiley Bears game.",
        "thumbnailUri": "http://test.com/img/SmileyBear1.png"
      },
      "standard": "fa2",
      "tokenId": "0",
      "orbInfusedAmount": "5",
      "totalBurned": 1,
      "totalMinted": 6,
      "totalSupply": 5
    }
  }
}

Below is an explanation of the response fields.

Response Field

balancesCount

Number of editions of a collectible the wallet address currently has.

holdersCount

Number of wallet addresses who own editions of the collectible.

maxEditions

Total number of editions set upon the creation of the collectible.

metadata

The IPFS/JSON file containing the metadata of the collectible.

standard

The standard of the collectible (fa1.2 or fa2).

tokenId

The tokenId of the collectible.

totalBurned

The number of editions of the collectible that have been burned.

totalMinted

The number of editions of the collectible that have been minted.

totalSupply

Total number of existing editions of the collectible.

Last updated