Marketplace API
Get sale activity

Get sale activity#

This API is used to get the transaction data under the collection (latest transaction price, quantity), supporting retrieving specific project transaction events by runesId.

Request address#

GET https://www.okx.com/api/v5/mktplace/nft/runes/trade-history

Request parameter#

ParameterTypeRequiredDescription
runesIdsStringNoUnique token identifier; if multiple, separate by commas (,) with a maximum of 20. An empty string will query the transaction history of all tokens.
cursorStringNoCursor pointing to the sorting sequence to retrieve
limitIntegerNoPagination size (default value 10, maximum 100). Returns the maximum number of transaction histories
startTimeLongNoStart time of the transaction activity (in seconds)
endTimeLongNoEnd time of the transaction activity (in seconds)

Response parameter#

ParameterTypeDescription
runesIdStringrunesId
nameStringToken name
txHashStringTransaction hash
typeNameStringActivity type name (SALE, TRANSFER, etc.)
amountStringToken amount
fromStringFrom address
toStringTo address
createOnDateCreation time
platformNameLongPlatform name
currencyStringTotal price - currency
currencyUrlStringTotal price - currency URL
satPriceBigDecimalTotal price in sat
priceBigDecimalTotal price in BTC
usdPriceBigDecimalTotal price in USD
currencyStringUnit price - currency
currencyUrlStringUnit price - currency URL
satPriceBigDecimalUnit price in sat
priceBigDecimalUnit price in BTC
usdPriceBigDecimalUnit price in USD
statusIntegerStatus (1: Success, 2: Pending)

Request example#

shell
curl --location --request GET 'https://beta.okex.org/api/v5/mktplace/nft/runes/trade-history?runesIds=840000:3&type=SALE&startTime=1713604337&endTime=1713607937' \
--header 'OK-ACCESS-KEY: XXXX' \
--header 'OK-ACCESS-PASSPHRASE: XXXX'

Response example#

200
{
  "code": 0,
  "data": {
  "activityList": [
{
  "amount": "3360",
  "createOn": 1714398184000,
  "from": "bc1p0a9xxqvh7c4l3xzcxuhdmsntlau69jnzu79jau20fza8676lfwmqnyy393",
  "name": "RSIC•GENESIS•RUNE",
  "platformName": "OKX",
  "runesId": "840000:28",
  "status": 1,
  "to": "bc1pnhukwhm2vmgsepkfxjyccgv2l0h2nu4fq0dchxdlkjpssmt2k45qkvnqjr",
  "totalPrice": {
  "currency": "BTC",
  "currencyUrl": "https://static.coinall.ltd/cdn/nft/4834651a-7c4e-4249-91c1-cf680af39dc0.png",
  "price": "0.00079968",
  "satPrice": "79968",
  "usdPrice": "49.54137552"
},
  "txHash": "6ef9a11965cd8771a383f6447a5cdf438832368c86a46fa465aee1cd59cc4ad7",
  "typeName": "SALE",
  "unitPrice": {
  "currency": "BTC",
  "currencyUrl": "https://static.coinall.ltd/cdn/nft/4834651a-7c4e-4249-91c1-cf680af39dc0.png",
  "price": "0.000000238",
  "satPrice": "23.8",
  "usdPrice": "0.014744457"
}
}
  ],
  "cursor": "MTMyMjM3MTEwNTQyMzM2MTE=",
  "hasNext": true
},
  "msg": ""
}