List NFTs

Listing NFTs is key of HashGuild and to every marketplace - the following endpoints show what data needs to be displayed to receive well-built transactions, confirm transactions and what to show endusers.


POST/v1/add

Add and Check if NFT is already existing

This endpoint allows you to post the HashGuild API and see if the NFT is already existing. If not, the NFT is being created. This step should be done prior listing the NFT with the API Call below, as an issue in the NFT fetching will lead to errors.

Required attributes

  • Name
    accountId
    Type
    string
    Description

    The account id of the user wishing to list the NFT.

  • Name
    tokenId
    Type
    string
    Description

    The token id of the NFT to be listed.

  • Name
    serialNo
    Type
    integer
    Description

    The serial number of the NFT to be listed.

Request

POST
/v1/add
curl -X https://hashguild.xyz/api/v1/add \
  -H "Authorization: Bearer {token}" 
   -d "{
        "accountId": "<accountId>",
        "tokenId": "<tokenId>",
        "serialNo": "<serialNumber>", 
   }" 

Response

{
 result: "OK"
}

POST/v1/list/hashpack

Retrieve NFT Listing Transaction - Hashpack

This endpoint allows you to post the HashGuild API and retrieve a Hashpack transaction string to direct to the Hashpack extension.

Required attributes

  • Name
    accountId
    Type
    string
    Description

    The account id of the user wishing to list the NFT.

  • Name
    tokenId
    Type
    string
    Description

    The token id of the NFT to be listed.

  • Name
    serialNo
    Type
    integer
    Description

    The serial number of the NFT to be listed.

  • Name
    listingPrice
    Type
    integer
    Description

    The listing price the NFT should be listed for - in HBAR.

You can find a sample integration of this endpoint in the minting application - open source.

Request

POST
/v1/list/hashpack
curl -X https://hashguild.xyz/api/v1/list/hashpack \
  -H "Authorization: Bearer {token}" 
   -d "{
        "accountId": "<accountId>",
        "tokenId": "<tokenId>",
        "serialNo": "<serialNumber>", 
        "listingPrice": "<listingPriceInHbar>"
   }" 

Response

{
    "byteArray": "CsICKr8CCtQBChsKDAj2ntadBhCk8pDBAhIJCAAQABiUmrAQGAASBggAEAAYAxiAwtcvIgIIeDJPTGlzdGluZyBORlQgd2l0aCAwLjAuNDkxMzk0OTggYW5kIFNlcmlhbCBOdW1iZXIgMSBmb3IgMjAwIEhCQVIgb24gSGFzaEd1aWxkLnh5enJTCigKEgoJCAAQABih55wQEP/ZxAkYAAoSCgkIABAAGJSasBAQgNrECRgAEicKCQgAEAAYqp63FxoaCgkIABAAGJSasBASCQgAEAAYoeecEBgBIAASZgpkCiBU2pWm+80uY3j0QRo5jGHMi0dC0CAdWflAzJ1kLKmbLhpA8ZM0gV1eXLYg85BZk5jqNUQG55tPvjs6uZHY+NUqZt/BMjlChw25FmUWz7lr/oquvol3sdCFB8lMb+J8/UwkAQ==",
    "metadata": {
        "accountToSign": "0.0.34344212",
        "returnTransaction": false
    }
}

POST/v1/comingsoon

Post NFT Success after Transaction was signed

Coming soon