Marketplace API
Query listing

Query listing#

This endpoint is used to fetch the set of active listings on a given NFT for the Seaport contract.

Request address#

GET https://www.okx.com/api/v5/mktplace/nft/markets/listings

Request param#

ParameterTypeRequiredDescription
chainStringYesChain name refer to Supported blockchains for details
collectionAddressStringNoAddress of the contract for an NFT
tokenIdStringNoThe token for an NFT
makerStringNoFilter by the order makers wallet address
createAfterStringNoOnly show orders listed after this timestamp; seconds since the UNIX epoch
createBeforeStringNoOnly show orders listed before this timestamp; seconds since the UNIX epoch
updateAfterStringNoOnly show orders updated before this timestamp; seconds since the UNIX epoch
updateBeforeStringNoOnly show orders updated before this timestamp; seconds since the UNIX epoch
statusStringNoFilter by the order status; the options are active, inactive, cancelled, and sold
platformStringNoFor supported platform, refer to Integrated markets
sortStringNoHow to sort the orders: can be create_time_desc for when they were made, or price_desc to see the highest-priced orders first or price_asc to see the lowest-priced orders first; the default sort is in positive order
limitStringNoNumber of listings to retrieve. The default value is 50
cursorStringNoA cursor to be supplied as a query param to retrieve a specified page

Response param#

An array of OKX order model

ParameterTypeDescription
orderIdStringID of order
createTimeLongThe date order was created
updateTimeLongThe date order was updated
listingTimeLongThe date order was listed
expirationTimeLongThe endTime indicates the block timestamp at which the order expires
statusStringThe order status, includes active, cancelled, sold, and inactive
orderHashStringThe order hash
protocolDataStringThe parameters of order (JSON)
protocolAddressStringThe contract address for fulfilling the order
chainStringChain name refer to Supported blockchains for details
makerStringThe wallet address initiating the order
orderTypeStringOffer indicates offer; BuyNow indicates listings
priceStringUnit price of NFT for the order
currencyAddressStringAddress of the currency for paying the order
collectionAddressStringAddress of the contract for an NFT
tokenIdStringThe token for an NFT
amountStringCount of NFT for the order

Request example#

An array of OKX Order Model

shell
curl -X GET "https://www.okx.com/api/v5/mktplace/nft/markets/listings?{REQUEST PARAMS}" \
  -H 'OK-ACCESS-KEY: XXX' \
  -H 'OK-ACCESS-TIMESTAMP: XXX' \
  -H 'OK-ACCESS-PASSPHRASE: XXX' \
  -H 'OK-ACCESS-SIGN: XXX' \

Response example#

200
{
  "code": 0,
  "data": {
    "cursor": "NjE5MTQ0MTM5",
    "data": [
      {
        "amount": "1",
        "chain": "OKTC",
        "collectionAddress": "0xe4c0578279269c4f0265bc486c199509566fe863",
        "createTime": 1672828395,
        "updateTime": 1672828395,
        "status": "active",
        "currencyAddress": "0x382bb369d343125bfb2117af9c149795c6c65c50",
        "expirationTime": 1673433171,
        "listingTime": 1672828387,
        "maker": "0x5164370b3ba971474d10da1d409ce8872cb8ca97",
        "orderHash": "0x5bdaa259cb76ace593f3e631099319f955b48397482e7e4d45c008d985b61ade",
        "orderType": "BuyNow",
        "price": "1000000000000000",
        "protocolAddress": "0x34df5c035e31c0edfd104f3ea83d9548f108df56",
        "protocolData": {
          "parameters": {
            "conduitKey": "0x618Cf13c76c1FFC2168fC47c98453dCc6134F5c8888888888888888888888888",
            "consideration": [
              {
                "endAmount": "1000000000000000",
                "identifierOrCriteria": "0",
                "itemType": 1,
                "recipient": "0x5164370b3ba971474d10da1d409ce8872cb8ca97",
                "startAmount": "1000000000000000",
                "token": "0x382bb369d343125bfb2117af9c149795c6c65c50"
              }
            ],
            "counter": 0,
            "endTime": 1673433171,
            "offer": [
              {
                "endAmount": "1",
                "identifierOrCriteria": "17230",
                "itemType": 2,
                "startAmount": "1",
                "token": "0xe4c0578279269c4f0265bc486c199509566fe863"
              }
            ],
            "offerer": "0x5164370b3ba971474d10da1d409ce8872cb8ca97",
            "orderType": 2,
            "salt": "27454607645473204",
            "startTime": 1672828387,
            "totalOriginalConsiderationItems": 1,
            "zone": "0xa472fAd4B6cAdFDEd63f7aE5BFEe6eCf4F08Ae95",
            "zoneHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
          },
          "signature": "0x"
        },
        "tokenId": "17230"
      }
    ]
  },
  "msg": ""
}