LogoLogo
Back to AppHelp Center
  • Getting Started
    • Welcome
  • OrdinalsBot API
    • Overview
    • Libraries
    • Template-App
    • Signet
    • Testnet
    • Fractal
    • Getting Prices
      • Getting Prices (Legacy)
    • Create a Direct Inscription Order
    • Create a Managed Inscription Order
    • Get Order Status
    • Create a Collection
    • Create a Collection Order
    • Create Text Inscription Order
    • Search Inscriptions
    • Check Rare Sats Inventory
    • Referral Scheme
    • Transaction Accelerator
    • Burning Assets
    • Webhooks
    • Order States
    • Order Types
  • Runes
    • Etch
    • Mint
    • Launchpad
      • Create
      • Mint
      • Get Launchpad
    • Airdrop
  • Token Pay
    • What is TokenPay?
    • API Docs
      • API reference
        • Order
        • Create payment psbt
        • Create burn rune psbt
        • Validate burn rune tx
        • Create burn inscription psbt
        • Utils
          • Checktx
          • Submittx
          • Finalize psbt
        • User
          • Withdrawal
          • Order
            • Rune
          • Account
            • Withdraw
            • Balance
      • Specification
  • Marketplace
    • User Guide: Pre-Inscribed Launchpad API
    • API Docs
    • Editions Launchpad
  • Launchpad API
    • Create Marketplace
    • Create a new Launchpad
    • Retrieve Launch PSBT
    • Confirm Launch
    • Check Allocation
    • Check for Padding Outputs
    • Setup Padding Outputs
    • Create buy offer
    • Confirm buy offer
    • Get Launch Info
  • Sat Scanner API
    • Find Special Ranges
    • Find Special Ranges UTXO
    • Supported Satributes
  • Sat Extractor
    • Extract
  • BRC20 API
    • OPI API
  • SNS API
    • SNS API
  • Mempool API
    • Mempool API
  • TAP PROTOCOL
    • Tap Reader API
  • UTXO
    • Split
  • User Guide
    • Inscribe your first Ordinal
    • Receiving Payments
  • Knowledge Base
    • Ordinals
      • What is an Ordinal?
      • Satoshi Rarity
      • What are BRC-20 Tokens?
      • Image Optimisation
      • Pixel Art
    • Bitcoin
      • Unspent Transaction Output (UTXO)
  • Official Links
    • Twitter
    • Discord
Powered by GitBook
On this page
  • POST Update a Listing
  • Update a marketplace listing
  1. MarketPlace API

Update Listing

Update an existing marketplace listing

An API Key is required to interact with MarketPlace APIs. Please contact us to get an API Key and get started.

This endpoint updates an existing marketplace listing with a new price. Calling the endpoint returns a psbt which needs to be signed by the seller's ordinal wallet address. Once signed the signed psbt needs to be returned by calling /marketplace/confirm-relist. if confirm-relist is not called then the existing ordinal listing remains unchanged.

POST Update a Listing

Update a marketplace listing

POST https://api.ordinalsbot.com/marketplace/relist

Example using Xverse Wallet:

// XVerse Wallet example of creating a signing request 
// updating an ordinal by calling relist
// Create the relist PSBT by calling /marketplace/relist API
// This returns a base64 PSBT in string format which needs to be signed

const { data } = await axios({
  method: 'post',
  url: 'https://api.ordinalsbot.com/marketplace/relist',
  data: {
    ordinalId,
    price:1200,   // updated price
    sellerPaymentAddress,
    sellerOrdinalPublicKey
  },
  headers: {
  'x-api-key': API_KEY,
  }
});

// When using XVerse Wallet
// Create the payload for signing the seller transaction
const sellerInput = {
  address: ordinalsAddress, // Seller's ordinal wallet address
  signingIndexes: [0], // always [0] when listing/relisting
  // Specify sigHash type as SIGHASH_SINGLE | SIGHASH_ANYONECANPAY
  sigHash: bitcoin.Transaction.SIGHASH_SINGLE | bitcoin.Transaction.SIGHASH_ANYONECANPAY,
};
const payload = {
  network: { type: "Mainnet" },
  message: "Sign Seller Transaction",
  psbtBase64: data.psbt, // PSBT returned by the clear-listing API
  broadcast: false,
  inputsToSign: [sellerInput],
};

// Make signing request
await signTransaction({
  payload,
  onFinish: async (response) => {
    try {
      // signed succesffully

      // Save the relist PSBT by calling /marketplace/confirm-relist API
      // This saves the signed PSBT
      const saveResponse= await axios({
        method: 'post'
        url: 'https://api.ordinalsbot.com/marketplace/confirm-relist',
        data: {
          ordinalId,
          signedListingPSBT: response.psbtBase64
        },
        headers: {
        'x-api-key': API_KEY,
        }
    });
    } catch (Error) {
      // error handling
    }
  },
  onCancel: () => { /* User cancelled signing request */}
});

Request Body

Name
Type
Description

sellerOrdinalPublicKey

String

The public key for the wallet address that owns the ordinal

ordinalId*

String

Ordinal id to update

price

Number

The listing price for the ordinal

sellerPaymentAddress

String

Payment wallet address for the seller, this wallet address will receive the payment the ordinal is sold


{
{
    "psbt": "cHNidP1BAP15AQIAAAAE1K5...........", // base64 transaction to be signed
}
{
    status: 'error',
    error: 'error reason'
}

Last updated 10 days ago