Marketplace API
Retrieve Ordinals listings

Retrieve Ordinals listings#

This interface is used to get all active listings for a given collection.

Request address#

POST https://www.okx.com/api/v5/mktplace/nft/ordinals/listings

Request param#

ParameterTypeRequiredDescription
slugStringNoThe collection‘s slug, which is the unique identifier of the collection.
cursorStringNoFor pagination. A cursor pointing to the page to retrieve.
limitStringNoFor pagination. The maximum number of collections to return. The default value is 10, and the max is 100.
sortStringNoOrder sorting rules:
listing_time_desc: Listings sorted by newest creation time first
listing_time_asc: Listings sorted by oldest creation time first
price_desc: Listings with the highest price first
price_asc: Listings with the lowest price first
unit_price_desc: Listings with the highest unit price first
unit_price_asc: Listings with the lowest unit price first
Default sorting is by the newest creation time first.
isBrc20BooleanNoRetrieve the list of BTC NFT or Brc20 listings, the default is ‘Yes’

Response param#

An array of Ordinals Order Model

ParameterTypeDescription
inscriptionIdStringInscription number
listingTimeLongListing time
listingUrlStringLink to the page
ownerAddressStringOwner address
priceStringPrice of an order
unitPriceStringOrder unit price, priced in BTC
amountStringNumber of inscriptions in the order
isBrc20BooleanUsed to distinguish Ordinals inscription types: Brc20 or BTC NFT

Request example#

shell
curl -X POST "https://www.okx.com/api/v5/mktplace/nft/ordinals/listings" \
  -H 'OK-ACCESS-KEY: XXX' \
  -H 'OK-ACCESS-TIMESTAMP: XXX' \
  -H 'OK-ACCESS-PASSPHRASE: XXX' \
  -H 'OK-ACCESS-SIGN: XXX' \
  -d "slug=sats" \
  -d "limit=1" \
  -d "sort=unit_price_asc"

Response example#

200
{
      "code": 0,
      "data": {
          "cursor": "MC4wOjMxNDIwNjY5MTE=",
          "data": [
              {
                  "amount": "100",
                  "inscriptionId": "8c9c19c9c2f54a7c3f19848a79f360746431d80bc2fa376146ab61743e4a514ai0",
                  "isBrc20": true,
                  "listingTime": 1701075376,
                  "listingUrl": "https://www.okx.com/web3/marketplace/nft/asset/btc/8c9c19c9c2f54a7c3f19848a79f360746431d80bc2fa376146ab61743e4a514ai0",
                  "ownerAddress": "bc1p8a0ndtmczmmyvjv52280hf7zpl3qzml427eyfw6cjdjhc7ys4yxsvder0w",
                  "price": "0.002",
                  "slug": "sats",
                  "unitPrice": "0"
              }
          ]
      },
      "msg": ""
  }