This interface is used to get all active listings for a given collection.
POST https://www.okx.com/api/v5/mktplace/nft/ordinals/listings
Parameter | Type | Required | Description |
---|---|---|---|
slug | String | No | The collection‘s slug, which is the unique identifier of the collection. |
cursor | String | No | For pagination. A cursor pointing to the page to retrieve. |
limit | String | No | For pagination. The maximum number of collections to return. The default value is 10, and the max is 100. |
sort | String | No | Order 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. |
isBrc20 | Boolean | No | Retrieve the list of BTC NFT or Brc20 listings, the default is ‘Yes’ |
An array of Ordinals Order Model
Parameter | Type | Description |
---|---|---|
inscriptionId | String | Inscription number |
listingTime | Long | Listing time |
listingUrl | String | Link to the page |
ownerAddress | String | Owner address |
price | String | Price of an order |
unitPrice | String | Order unit price, priced in BTC |
amount | String | Number of inscriptions in the order |
isBrc20 | Boolean | Used to distinguish Ordinals inscription types: Brc20 or BTC NFT |
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"
{
"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": ""
}