Collections
To every NFT, a collection belongs. Thus, Collections have a great importance in the NFT ecosystem. The following endpoints allow to query for specific collection data.
The Collection model
The collection model contains all the information about the collections, such as their token Id, main image, filetype, and much more. It also contains a reference to NFTs.
Properties
- Name
name
- Type
- string
- Description
The name of the collection.
- Name
tokenId
- Type
- string
- Description
The token Id of the collection.
- Name
collectionImage
- Type
- string
- Description
The collection Image URL.
- Name
floorPrice
- Type
- int
- Description
The floor price, if available.
- Name
lastTraded
- Type
- timestamp
- Description
Timestamp of when the collection was last traded.
- Name
lastTradedPriceHbar
- Type
- int
- Description
Timestamp of what price the collection was traded for.
Retrieve Collection Data
This endpoint allows you to retrieve a single collection and its details.
Request
curl -G https://hashguild.xyz/api/v1/collection/<tokenId> \
-H "Authorization: Bearer {token}" \
Response
{
"name": "GPPG Collection - Gen 02",
"tokenId": "0.0.817779",
"collectionImage": "https://storage.googleapis.com/prod_nft_images/bafybeifipe5vpcwqqrksxsvfeattplkqtpbyhdvts6wra3vq6ot76o37ym/199.png",
"floorPrice": 3000,
"lastTraded": "2022-10-06T17:36:53.186Z",
"lastTradedPriceHbar": 2069
}
Collection Data for Listed NFTs
This endpoint allows you to retrieve for listed NFTs, their count, floor price and other stats. For retrieving specific NFT data, please go to the NFT Endpoints
Request
curl -G https://hashguild.xyz/api/v1/collection/<tokenId>/listed \
-H "Authorization: Bearer {token}" \
Response
{
"floorPrice": 3000,
"nftsListed": 3,
"lastTraded": "2022-10-06T17:36:53.186Z",
"lastTradedPriceHbar": 2069
}