Marketplace API
获取交易历史

获取交易历史#

该接口用于获取合集下的成交数据(最近成交价、数量),支持通过runesid获取指定项目成交事件。

请求地址#

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

请求参数#

字段名类型是否必传说明
runesIdsString代币唯一标识,如果多个以英文逗号(,)分隔,不超过20个,空串会查询所有代币的交易历史
cursorString指向要检索的排序序号的游标
limitInteger分页大小(默认值 10,最大100)。返回最大的交易历史数
startTimeLong交易动态的起始时间(单位:秒)
endTimeLong交易动态的截止时间(单位:秒)

返回参数#

参数类型参数说明
runesIdStringrunesId
nameString代币名称
txHashString交易hash
typeNameStringactivity-类型名称(SALE、TRANSFER等)
amountString代币数量
fromStringfrom地址
toStringto地址
createOnDate创建时间
platformNameLong平台名称
currencyString总价 - 币种
currencyUrlString总价 - 币种 url
satPriceBigDecimal总价 - sat 价格
priceBigDecimal总价 - btc 价格
usdPriceBigDecimal总价 - usd 价格
currencyString单价 - 币种
currencyUrlString单价 - 币种 url
satPriceBigDecimal单价 - sat 价格
priceBigDecimal单价 - btc 价格
usdPriceBigDecimal单价 - usd 价格
statusInteger状态,1:成功,2:pending

请求示例#

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'

返回示例#

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