获取合集交易信息#
此 API 用于获取 NFT 销售历史信息,如收藏地址,平台,价格,买家和卖家。
请求地址#
GET https://web3.okx.com/api/v5/mktplace/nft/markets/trades
请求参数#
| 参数 | 类型 | 必传 | 描述 | 
|---|---|---|---|
| chain | 是 | String | 链名称,详情见已支持的网络 | 
| collectionAddress | 是 | String | 合集的合同地址 | 
| platform | 否 | String | 目标挂单平台,详情见已经接入的市场,默认值为所有平台 | 
| limit | 否 | String | 每页记录数。最大为 50,最小为1。如果输入大于50或者没有输入,那么就会默认为50。 | 
| tokenId | 否 | String | NFT 的 Token ID。如果为空,它将查询所有 NFT 的 Token ID。 | 
| cursor | 否 | String | 指向要检索的页面的游标。 | 
| startTime | 否 | String | 要查询的销售历史记录的起始时间范围。 | 
| endTime | 否 | String | 要从中查询的销售历史记录的结束时间范围。 | 
响应参数#
| 参数 | 类型 | 描述 | 
|---|---|---|
| cursor | String | 指向要检索的页面的游标。将此游标用作下一个查询的输入 | 
| amount | Integer | 此交易历史中交易的 NFT 数量 | 
| chain | String | 链名称,详情见已支持的网络 | 
| collectionAddress | String | 合集的合同地址 | 
| currencyAddress | String | 此交易的支付地址 | 
| from | String | 卖家地址 | 
| to | String | 买家地址 | 
| platform | String | 目标挂单平台,详情见已经接入的市场,默认值为所有平台 | 
| price | BigDecimal | 每个 NFT 的价格 | 
| timestamp | Long | 交易时间戳 | 
| tokenId | String | NFT 的 Token ID | 
| txHash | String | 交易的 Hash | 
请求示例#
shell
curl --location 'https://beta.okex.org/api/v5/mktplace/nft/markets/trades?chain=ethereum&collectionAddress=0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d' \
--header 'OK-ACCESS-KEY: your api access key' \
--header 'OK-ACCESS-PASSPHRASE: your api passphrase' \
响应示例#
200
{
  "code": 0,
  "data": {
  "cursor": "MTcxOTk0NDQ0NzoweDRiYjNhZjY1MDQwOTdkMjBkY2QxMzAxZDg0NTdjOGVkNzEzMzQ3OGY2NjFiODdhN2M4YzdlNTk4OTIxMjcwNDktMTU4",
  "data": [
{
  "amount": 1,
  "chain": "Ethereum",
  "collectionAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
  "currencyAddress": "0x0000000000000000000000000000000000000000",
  "from": "0xf15c93562bc3944a68e938ef75d2a3360d98ca57",
  "platform": "Blur",
  "price": 9.71,
  "timestamp": 1720113467,
  "to": "0xeb0abe3e9f38fc74ed900f118744275af3a99618",
  "tokenId": "4382",
  "txHash": "0x11b30e98235053d2749a41249db60c895ca8bac1942b526a993f3c4be058a0b4"
},
{
  "amount": 1,
  "chain": "Ethereum",
  "collectionAddress": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
  "currencyAddress": "0x0000000000a39bb272e79075ade125fd351887ac",
  "from": "0x29469395eaf6f95920e59f858042f0e28d98a20b",
  "platform": "Blur",
  "price": 9.45,
  "timestamp": 1720110203,
  "to": "0x0f2bbce1fcb6702a4d9ab30e5c68868f82af3d41",
  "tokenId": "3854",
  "txHash": "0xe34400d02d0330cd7b4cbbdd3d2d2e458e4fd702ef768ab6de73591bc2060906"
}
  ],
  "next": true,
  "total": 10000
},
  "msg": ""
}
