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 Get List of Ordinals
  • Get List of Ordinals
  1. MarketPlace API

Get List of Ordinals

This end point returns a list of ordinals. By default it returns all ordinals available for sale. The returned list of ordinals can also be filtered by status. The following status values are available:

'Sold', // Ordinals that have been sold
'Active', // Ordinals still available for sale
'Inactive', // Ordinals that have been marked as not available for sale by admin
'Pending Buyer Confirmation', // Ordinals where buyer has initiated purchase but not completed the sign and broadcast part of the process
'Pending Seller Confirmation', // Ordinals where seller has initiated listing but not completed the sign and save part of the process

Pagination and sorting options can be specified by adding itemsPerPage , page and sort values in the request body. By default results are sorted by listing time. Response provides an array of ordinals as well as information on current page and total ordinals for the specified search filter. Response structure:

{
      results: [{},{},{},{}], // array of Ordinal listings
      count: 0, // number of Ordinals in the current results array
      currentPage: page, // current page number
      totalPages: 0, // total pages that can be returned for the current search results
      totalItems: 0 // total items in the database for the current search results
}

Here's an example of a call to get the 3rd page of all sold Ordinals sorted by time:

      

  const LISTING_STATUS = {
    sold: 'Sold',
    active: 'Active',
    inactive: 'Inactive',
    pending_buyer_confirmation: 'Pending Buyer Confirmation',
    pending_seller_confirmation: 'pending Seller Confirmation',
  }


      // Call /get-listing end point to get all Ordinals available for sale
      // by default only available ordinals are returned
      const { data } = await axios({
        method: 'post'
        url: 'https://api.ordinalsbot.com/marketplace/get-listing',
        headers: {
        'x-api-key': API_KEY,
      });


      // Call /get-listing end point to get all Ordinals that have been sold
      const { data } = await axios({
        method: 'post'
        url: 'https://api.ordinalsbot.com/marketplace/get-listing',
        data: {
          filter: {
            status: LISTING_STATUS.sold
          },
        page: 3,
        itemsPerPage: 50,
        sort: "time"
        }
        headers: {
        'x-api-key': API_KEY,
      });

POST Get List of Ordinals

Get List of Ordinals

POST https://api.ordinalsbot.com/marketplace/get-listing

API Key is required in the header:

headers: { 'x-api-key': '<YOUR_API_KEY>', ...otherHeaders }

Request Body

Name
Type
Description

filter

Object

An object with status or any other fields to filter example { "status":"Sold" }

page

Number

The page number in the list of pages to return by default the first page is returned

itemsPerPage

Number

The number of Ordinals to return in each page, this defaults to 100

sort

String

The sort field. This can be 'time' or 'date' to sort by listing time. this can also by any other field in the Ordinal data like 'price' or 'sellerPaymentAddress' etc

{
      results: [
                {
                    "_id": "7354826c46a5856b972795d7",
                    "ordinalId": "8dc4e.....6ce70260i0",
                    "price": 12345,
                    "sellerPaymentAddress": "3Ny......yc4q",
                    "sellerOrdinalPublicKey": "4fa4.....118fad4e476541",
                    "status": "Active",
                    "sellerOutputValue": 21111,
                    "ordinalUtxoTxId": "3362....61449ef",
                    "ordinalUtxoVout": 0,
                    "marketPlaceMakerFee": 0,
                    "marketPlaceTakerFee": 0,
                    "platformMakerFee": 1000,
                    "platformTakerFee": 1000,
                    "__v": 0,
                    "signedListingPSBT": "cHNid......1rARj61OR2VBAAA="
                },
                {
                    "_id": "1835526c46a5856b972795d7",
                    "ordinalId": "1dc4e.....6ce70260i0",
                    "price": 12345,
                    "sellerPaymentAddress": "3Ny......yc2a",
                    "sellerOrdinalPublicKey": "4fa4.....118fad4e476541",
                    "status": "Active",
                    "sellerOutputValue": 21111,
                    "ordinalUtxoTxId": "3362....61449ef",
                    "ordinalUtxoVout": 0,
                    "marketPlaceMakerFee": 0,
                    "marketPlaceTakerFee": 0,
                    "platformMakerFee": 1000,
                    "platformTakerFee": 1000,
                    "__v": 0,
                    "signedListingPSBT": "cHNid......1rARj61OR2VBAAA="
                },
            ],
      count: 2, // number of Ordinals in the current results array
      currentPage: 3, // current page number
      totalPages: 3, // total pages that can be returned for the current query
      totalItems: 102 // total items for the current search query
}

{
    status: 'error',
    error: 'error reason'
}

Last updated 10 days ago