Update Listing

How to update an existing NFT listing price on the Wayup Marketplace

Introduction

This guide demonstrates how to update an existing NFT listing's price on the Wayup Marketplace using the API. This allows sellers to adjust their asking prices without having to unlist and re-list their NFTs.

Requirements

  • Find your profile listings via the get-profile-listings endpoint. See Get Profile Listings

  • The Policy ID of the NFT you've listed

  • The txHashIndex of your existing listing

  • UTXOs from your wallet to fund the transaction. See Select UTXOs

  • Your change address to receive 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 update
const POLICY_ID = "6fb0ce0d80bce539333b0b16f4a29a0d40c786249f86850d3a36fa01";
const TX_HASH_INDEX = "4baa167631a62343cc4f37f9313ee05d6149b1fda39fd563e12832c8dd49fac9#0"; // Format: txHash#outputIndex

// Wallet address to receive change
const SELLER_CHANGE_ADDRESS = "addr1qx33ycd2ymg02dxh6vnnf8dsk54l8ranr9cfjk9qrlj3309c69jc4n8h3uvnczncaqu2sm03pl99h99n75uvtl3mhv0q3z8s8m";

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

// New listing price in ADA (minimum 5 ADA)
const NEW_PRICE_ADA = 10; // Update to your desired price

Type Definitions

Implementation

Step 1: Identify the NFT Listing

First, identify the NFT listing you want to update:

Step 2: Prepare the Update Payload

Next, prepare the payload with your listing information and new price:

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: update-listing.tsarrow-up-right

chevron-rightupdate-listing.tshashtag

Best Practices

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

  2. Price Validation: The new price must be different from the current price and should be a minimum of 5 ADA.

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

  4. Listing Status: Check that your listing appears with the updated price using the get-collection-assets endpoint.

End-to-End Flow

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

  2. Build an update transaction via /build-tx with the update 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 listed with the new price on the marketplace

Last updated

Was this helpful?