Unlist Listing

How to remove an NFT listing from the Wayup Marketplace

Introduction

This guide demonstrates how to remove (unlist) an existing NFT listing from the Wayup Marketplace using the API. This returns the NFT to the seller's wallet and removes it from sale on the marketplace.

Requirements

  • The Policy ID of the NFT you've listed

  • The txHashIndex of your existing listing

  • UTXOs from your wallet to fund the transaction

  • Your change address to receive the unlisted NFT and any change

API Request Structure

Configuration

// API endpoint for Wayup Marketplace
const BASE_URL = "https://prod.api.ada-anvil.app/marketplace/api";

// NFT listing to unlist
const POLICY_ID = "6fb0ce0d80bce539333b0b16f4a29a0d40c786249f86850d3a36fa01";
const TX_HASH_INDEX = "4baa167631a62343cc4f37f9313ee05d6149b1fda39fd563e12832c8dd49fac9#0"; // Format: txHash#outputIndex

// Wallet address to receive change and the unlisted NFT
const SELLER_ADDRESS = "addr1qx33ycd2ymg02dxh6vnnf8dsk54l8ranr9cfjk9qrlj3309c69jc4n8h3uvnczncaqu2sm03pl99h99n75uvtl3mhv0q3z8s8m";

// UTXOs from your wallet to fund the transaction
const SELLER_UTXOS = [
  "828258204baa167631a62343cc4f37f9313ee05d6149b1fda39fd563e12832c8dd49fac90182583901a31261aa26d0f534d7d327349db0b52bf38fb319709958a01fe518bcb8d1658accf78f193c0a78e838a86df10fca5b94b3f538c5fe3bbb1e821a001344eea1581c6fb0ce0d80bce539333b0b16f4a29a0d40c786249f86850d3a36fa01a24f4646506f776572436f72657336323901504646506f776572436f7265733132343801",
  "828258204baa167631a62343cc4f37f9313ee05d6149b1fda39fd563e12832c8dd49fac90282583901a31261aa26d0f534d7d327349db0b52bf38fb319709958a01fe518bcb8d1658accf78f193c0a78e838a86df10fca5b94b3f538c5fe3bbb1e1a005b1fe1",
  "82825820daac1d3b80dcab8817c2f02f2d43ab2b33a4e74419679939eb8aa5f70b03f35c0182583901a31261aa26d0f534d7d327349db0b52bf38fb319709958a01fe518bcb8d1658accf78f193c0a78e838a86df10fca5b94b3f538c5fe3bbb1e821a007a089da1581c6fb0ce0d80bce539333b0b16f4a29a0d40c786249f86850d3a36fa01a1504646506f776572436f7265733137323001"
];

Type Definitions

Implementation

Step 1: Identify the NFT Listing to Unlist

First, identify the NFT listing you want to remove:

Step 2: Prepare the Unlist Payload

Next, prepare the payload with your listing information:

Step 3: Build the Transaction

Send the request to the build-tx endpoint:

Step 4: Process the Response

Process the response to get the transaction hex:

Running the Example

Example Output

The Complete File

See our examples repository for the complete file: unlist-listing.tsarrow-up-right

chevron-rightunlist-listing.tshashtag

Best Practices

  1. Verify Listing Ownership: Always ensure you are the owner of the listing you're unlisting.

  2. Transaction Confirmation: After submitting the signed transaction, verify it was confirmed on the blockchain.

  3. NFT Return Verification: Check your wallet to confirm the NFT has been returned after the transaction confirms.

  4. Listing Status: Verify that the NFT no longer appears in your active listings using the get-profile-listings endpoint with the appropriate filters.

End-to-End Flow

  1. Identify the NFT listing to unlist (Policy ID and txHashIndex)

  2. Build an unlist transaction via /build-tx with the unlist property

  3. Sign the transaction with your wallet. See Signing Transactionsarrow-up-right

  4. Submit the transaction via /submit. See Submit Transactions

  5. Wait for confirmation; your NFT will be returned to your wallet address

  6. Verify the NFT is in your wallet and no longer listed on the marketplace

Last updated

Was this helpful?