NFTs
NFTs are a core part of HashGuild — assets, or NFTs, are the main reason of existence of HashGuild. On this page, we'll dive into the different assets endpoints you can use to query assets programmatically.
The NFT model
The NFT model contains the relevant data of NFTs, including the token id, name, the filetype, if the nft is for sale as well as a cloudstorage link - optimized - to the file.
Properties
- Name
tokenId
- Type
- string
- Description
The token ID for the NFT.
- Name
serialNumber
- Type
- string
- Description
The serial number for the NFT.
- Name
name
- Type
- string
- Description
The name for the NFT.
- Name
fileType
- Type
- string
- Description
The filetype of the NFT. This comes with the MIME.
- Name
isForSale
- Type
- string
- Description
A flag, if this NFT is for sale.
- Name
stringifiedAttributes
- Type
- string
- Description
A string of the attributes of the NFT.
- Name
imageUrl
- Type
- string
- Description
A image url of the NFT.
- Name
originalImageUrl
- Type
- string
- Description
The original image url of the NFT.
- Name
listingPrice
- Type
- int
- Description
The price of the NFT if listed.
- Name
lastListedDate
- Type
- dateTime
- Description
The last listed date of the NFT.
- Name
owner
- Type
- Object
- Description
Nested object, containing the account id of the owner.
Get NFT Information
This endpoint allows you to retrieve specific data for a NFT.
Request
curl -G https://hashguild.xyz/api/v1/nft/<tokenId>/<serialNo> \
-H "Authorization: Bearer {token}"
Response
{
"token": "0.0.817779",
"serialNo": 82,
"name": "Guilty Panda #82 - Gen 02",
"fileType": "image/png",
"isForSale": false,
"stringifiedAttributes": "[{\"trait_type\":\"Body\",\"value\":\"body_tiger\"},{\"trait_type\":\"Hands\",\"value\":\"hand_standard\"},{\"trait_type\":\"Background - Color\",\"value\":\"red\"},{\"trait_type\":\"Background - Fire\",\"value\":\"fire\"},{\"trait_type\":\"Background - Accessoire\",\"value\":\"no_bg_accessoire\"},{\"trait_type\":\"Background - Bars\",\"value\":\"no_bars\"},{\"trait_type\":\"Uniform\",\"value\":\"gppglogo\"},{\"trait_type\":\"Badge\",\"value\":\"hedera\"},{\"trait_type\":\"Glasses\",\"value\":\"no_glasses\"},{\"trait_type\":\"Head\",\"value\":\"tacticalhelmet\"},{\"trait_type\":\"Encounter\",\"value\":\"cuts\"}]",
"imageUrl": "https://storage.googleapis.com/prod_nft_images/bafybeifipe5vpcwqqrksxsvfeattplkqtpbyhdvts6wra3vq6ot76o37ym/82.png",
"originalImageUrl": null,
"listingPrice": 4700,
"lastListedDate": "2022-07-26T17:47:00.102Z",
"owner": {
"accountId": "0.0.635713"
}
}
Get Listed NFTs for Collection
This endpoint allows you to retrieve specific data a listed NFTs per collection. The collection is identified with the token ID as an unique identifier.
Request
curl -G https://hashguild.xyz/api/v1/nftslisted/<tokenId> \
-H "Authorization: Bearer {token}"
Response
[
{
"token": "0.0.817779",
"serialNo": 104,
"name": "Guilty Panda #104 - Gen 02",
"fileType": "image/png",
"isForSale": true,
"stringifiedAttributes": "[{\"trait_type\":\"Body\",\"value\":\"body_tiger\"},{\"trait_type\":\"Hands\",\"value\":\"lefthand_handcuffs\"},{\"trait_type\":\"Background - Color\",\"value\":\"green\"},{\"trait_type\":\"Background - Fire\",\"value\":\"no_fire\"},{\"trait_type\":\"Background - Accessoire\",\"value\":\"golden_gate_bridge\"},{\"trait_type\":\"Background - Bars\",\"value\":\"bars_black\"},{\"trait_type\":\"Uniform\",\"value\":\"uniform\"},{\"trait_type\":\"Badge\",\"value\":\"jailgate\"},{\"trait_type\":\"Glasses\",\"value\":\"no_glasses\"},{\"trait_type\":\"Head\",\"value\":\"gasmask_black\"},{\"trait_type\":\"Encounter\",\"value\":\"no_damage\"}]",
"imageUrl": "https://storage.googleapis.com/prod_nft_images/bafybeifipe5vpcwqqrksxsvfeattplkqtpbyhdvts6wra3vq6ot76o37ym/104.png",
"originalImageUrl": null,
"listingPrice": 4700,
"lastListedDate": "2022-07-26T17:47:00.102Z",
"owner": {
"accountId": "0.0.635713"
}
},
{
"token": "0.0.817779",
"serialNo": 185,
"name": "Guilty Panda #185 - Gen 02",
"fileType": "image/png",
"isForSale": true,
"stringifiedAttributes": "[{\"trait_type\":\"Body\",\"value\":\"body_rainbow\"},{\"trait_type\":\"Hands\",\"value\":\"hand_standard\"},{\"trait_type\":\"Background - Color\",\"value\":\"grey\"},{\"trait_type\":\"Background - Fire\",\"value\":\"no_fire\"},{\"trait_type\":\"Background - Accessoire\",\"value\":\"no_bg_accessoire\"},{\"trait_type\":\"Background - Bars\",\"value\":\"no_bars\"},{\"trait_type\":\"Uniform\",\"value\":\"wagmi_hoodie\"},{\"trait_type\":\"Badge\",\"value\":\"corporal\"},{\"trait_type\":\"Glasses\",\"value\":\"no_glasses\"},{\"trait_type\":\"Head\",\"value\":\"no_head\"},{\"trait_type\":\"Encounter\",\"value\":\"eyepatch\"}]",
"imageUrl": "https://storage.googleapis.com/prod_nft_images/bafybeifipe5vpcwqqrksxsvfeattplkqtpbyhdvts6wra3vq6ot76o37ym/185.png",
"originalImageUrl": null,
"listingPrice": 5000,
"lastListedDate": "2022-07-26T17:47:00.102Z",
"owner": {
"accountId": "0.0.635713"
}
},
{...}
]
Get listed NFTs by a User
This endpoint allows you to retrieve a list of NFTs listed by a user. By default, 10 NFTs are shown.
Optional attributes
- Name
limit
- Type
- integer
- Description
Limit the number of NFTs returned.
Request
curl -G https://hashguild.xyz/api/v1/user/<accountId>/listed \
-H "Authorization: Bearer {token}"
Response
[
{
"token": "0.0.879332",
"serialNo": 16,
"name": "HELD NFTS | ORDER 66 | ✨ FREE AIRDROP - APRIL 2022 🛩 | 1/66 | HBAR HOODLIM DERIVATIVE",
"fileType": "image/png",
"isForSale": true,
"stringifiedAttributes": null,
"imageUrl": "https://storage.googleapis.com/prod_nft_images/QmWhrQdFjYo4a9QpBuYZCEPfZ4uineSaw92vJGHaFvNaRS/APRIL ORDER 66 AIRDROP.png",
"originalImageUrl": null,
"listingPrice": 200000,
"lastListedDate": null,
"owner": {
"accountId": "0.0.635713"
}
},
{
"token": "0.0.959773",
"serialNo": 12,
"name": "HELD NFTS | FIGHT CLUB PASS | MEMORIAL DAY WEEKEND (MAY 27 - 30, 2022) | 1/100",
"fileType": "image/png",
"isForSale": true,
"stringifiedAttributes": null,
"imageUrl": "https://storage.googleapis.com/prod_nft_images/QmeCE2ALz48MhcsUbufzAMnMhXdaEVdndV37UggZQYDBew/FIGHT CLUB PASS - MEMORIAL DAY WEEKEND - HELD.png",
"originalImageUrl": null,
"listingPrice": 200000,
"lastListedDate": null,
"owner": {
"accountId": "0.0.635713"
}
},
{...}
]
Get Full Order Book
This endpoint allows you to retrieve a list of NFTs listed - sorted by the last listed date. By default, 20 NFTs are shown.
Optional params
- Name
limit
- Type
- integer
- Description
Limit the number of NFTs returned. Default 20 and a maximum of 20.
- Name
offset
- Type
- integer
- Description
Paginate and move ahead by the offset parameter. Used for pagination. Default 0.
Request
curl -G https://hashguild.xyz/api/v1/orderbook?limit=<limit>&offset=<offset> \
-H "Authorization: Bearer {token}"
Response
[
{
"token": "0.0.879332",
"serialNo": 16,
"name": "HELD NFTS | ORDER 66 | ✨ FREE AIRDROP - APRIL 2022 🛩 | 1/66 | HBAR HOODLIM DERIVATIVE",
"fileType": "image/png",
"isForSale": true,
"stringifiedAttributes": null,
"imageUrl": "https://storage.googleapis.com/prod_nft_images/QmWhrQdFjYo4a9QpBuYZCEPfZ4uineSaw92vJGHaFvNaRS/APRIL ORDER 66 AIRDROP.png",
"originalImageUrl": null,
"listingPrice": 200000,
"lastListedDate": null,
"owner": {
"accountId": "0.0.635713"
}
},
{
"token": "0.0.959773",
"serialNo": 12,
"name": "HELD NFTS | FIGHT CLUB PASS | MEMORIAL DAY WEEKEND (MAY 27 - 30, 2022) | 1/100",
"fileType": "image/png",
"isForSale": true,
"stringifiedAttributes": null,
"imageUrl": "https://storage.googleapis.com/prod_nft_images/QmeCE2ALz48MhcsUbufzAMnMhXdaEVdndV37UggZQYDBew/FIGHT CLUB PASS - MEMORIAL DAY WEEKEND - HELD.png",
"originalImageUrl": null,
"listingPrice": 200000,
"lastListedDate": null,
"owner": {
"accountId": "0.0.635713"
}
},
{...}
]