This interface is used to return all transaction records under a specific collection, including details such as the From and To addresses for the transactions, the time of each transaction, and the transaction prices. By default, records are sorted in descending order by transaction time.
POST https://www.okx.com/api/v5/mktplace/nft/ordinals/trade-history
Parameter | Type | Required | Description |
---|---|---|---|
slug | String | Yes | The collection‘s slug, which is the unique identifier of the collection. |
cursor | String | No | For pagination. A cursor pointing to the page to retrieve. |
limit | String | No | For pagination. The maximum number of collections to return. The default value is 10, and the max is 100. |
sort | String | No | Trade history is sorted by default in descending order desc by time, with an option for ascending order asc . |
isBrc20 | Boolean | No | Retrieve the list of BTC NFT or Brc20 trade activities, the default is Yes |
orderSourceList | Integer[] | No | Retrieve orders for certain platforms, please fill in the code, such as [34,54] (34-OKX 54-Magic Eden 55-OrdinalsWallet 57-Unisat). |
tradeWalletAddress | String | No | The wallet address involved in the transaction. |
type | String | No | Transaction type, multiple separated by commas (SALE, LIST, TRANSFER, CANCEL_LIST, UPDATE_PRICE). Default return Sale data. |
An array of Ordinals Activities Model
Parameter | Type | Description |
---|---|---|
fromAddress | String | From address in the transaction |
inscriptionId | String | Inscription number |
price | String | Price of the transaction |
timestamp | Long | Transaction timestamp |
toAddress | String | To address in the transaction |
unitPrice | String | Order unit price, priced in BTC |
amount | String | Number of inscriptions in the order |
isBrc20 | Boolean | Used to distinguish Ordinals inscription types: Brc20 or BTC NFT |
orderSource | Integer | Order source |
orderSourceName | String | The name of the source of the order |
type | String | Transaction type |
curl -X POST "https://www.okx.com/api/v5/mktplace/nft/ordinals/trade-history" \
-H 'OK-ACCESS-KEY: XXX' \
-H 'OK-ACCESS-TIMESTAMP: XXX' \
-H 'OK-ACCESS-PASSPHRASE: XXX' \
-H 'OK-ACCESS-SIGN: XXX' \
-d "slug=xxx" \
-d "limit=1"
{
"code": 0,
"data": {
"cursor": "MTcwMTE1NTM5MDo5OTZkYzdmMjljMzM1ODJhZjEwNDhjN2ZlMDgyZTU4Y2NhMTQ0ZDA3MzY0YTdkODc4NjUyYjhkM2ZhNGI2MTc3LTAtMjMzNTc5NTYzMDUxOTUxMjI=",
"data": [
{
"amount": "10000000000",
"fromAddress": "bc1q8nvhsrn7k7ltp2p4qm65wd7yxgypv0rvlam2h9",
"inscriptionId": "0bd89dfef32761d8465055bbf4ccfcdac8bbd56d28032a01833c8b41ff3025b1i0",
"isBrc20": true,
"price": "0.03698",
"slug": "sats",
"timestamp": 1701155390,
"toAddress": "bc1phlcxss2jumzm5rskhcfnzpxnsg8d7jn24h97umk7qceal55k600spaczp4",
"unitPrice": "0.000000000003698",
"orderSource": 34,
"orderSourceName": "okx",
"type": "SALE"
}
]
},
"msg": ""
}