Marketplace API

Get collection transaction history#

This API is used to get NFT sales history information such as collectionAddress, platform, price, buyer and seller.

Request address#

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

Request param#

ParameterTypeRequiredDescription
chainYesStringChain name refer to Supported blockchains for details.
collectionAddressYesStringThe unique collection address of the transaction history to query for.
platformNoStringFor supported platforms, refer to Integrated markets. If this is empty, it will query all platforms.
limitNoStringThe number of records displayed per page ranges from 1 to 50. If the input value exceeds 50 or is not provided, it will default to 50.
cursorNoStringThe cursor for pagination of the records.
startTimeNoStringThe starting time range of the sale history record you want to query from.
endTimeNoStringThe end time range of the sale history record you want to query from.

Response param#

ParameterTypeDescription
cursorStringThe cursor for pagination. Use this cursor as input for the next query.
amountIntegerThe number of nft being transacted in this transaction history.
chainStringChain name refer to Supported blockchains for details.
collectionAddressStringThe unique collection address of the transaction history to query for.
currencyAddressStringPayment token address of this transaction.
fromStringThe seller.
toStringThe buyer.
platformStringFor supported platforms, refer to Integrated markets.
priceBigDecimalThe unit price of each NFT.
timestampLongThe time that of the transaction occured.
tokenIdStringThe unique Token ID of the NFT.
txHashStringThe transaction hash of this record that is taken place.

Request example#

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

Response example#

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