市场 API

查询挂单#

该接口用于查询指定 NFT 的有效欧易 Seaport 协议挂单。

请求地址#

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

请求参数#

参数类型必传描述
chainString链名称,详情见已支持的网络
collectionAddressStringNFT 合约地址
tokenIdStringNFT 的 tokenId
makerString根据订单发起人钱包地址过滤
createAfterString只展示此时间戳之后的创建订单,单位为秒
createBeforeString只展示此时间戳之前的创建订单,单位为秒
updateAfterString只展示此时间戳之后的更新订单,单位为秒
updateBeforeString只展示此时间戳之前的更新订单,单位为秒
statusString根据订单状态过滤,包括(active、inactive、cancelled、sold)
platformString目标挂单平台,详情见已经接入的市场,默认值为 okx
sortString订单排序规则,create_time_desc 代表根据订单创建时间倒序排序,update_time_desc 代表根据订单更新时间倒序排序,price_desc 代表根据价格倒序排序,price_asc 代表根据价格正序排序。排序规则默认为根据时间正序排序
limitString单页条数限制,默认值为 50
cursorString查询指定订单页的游标参数

响应参数#

一个欧易订单模型的对象数组

参数类型描述
orderIdString订单 ID
createTimeLong订单创建日期
updateTimeLong订单更新日期
listingTimeLong订单挂单时间
expirationTimeLong订单有效期,结束时间
statusString订单状态,包括 (active、cancelled、sold、inactive)
orderHashString订单 hash
protocolDataString订单参数 (json)
protocolAddressString订单交易合约地址
chainString链名称,详情见已支持的网络
makerString订单发起人的地址
orderTypeString订单类型,Offer 代表出价单,BuyNow 代表挂单
priceString订单对应的每个 NFT 单价
currencyAddressString订单对应的代币地址
collectionAddressStringNFT 合约地址
tokenIdStringNFT Token ID
amountString订单对应的 NFT 数量

请求示例#

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' \

响应示例#

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": ""
}