Marketplace API
Retrieve Ordinals activities

Retrieve Ordinals activities#

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.

Request address#

POST https://www.okx.com/api/v5/mktplace/nft/ordinals/trade-history

Request param#

ParameterTypeRequiredDescription
slugStringNoThe collection‘s slug, which is the unique identifier of the collection.
cursorStringNoFor pagination. A cursor pointing to the page to retrieve.
limitStringNoFor pagination. The maximum number of collections to return. The default value is 10, and the max is 100.
sortStringNoTrade history is sorted by default in descending order desc by time, with an option for ascending order asc.
isBrc20BooleanNoRetrieve the list of BTC NFT or Brc20 trade activities, the default is Yes

Response param#

An array of Ordinals Activities Model

ParameterTypeDescription
fromAddressStringFrom address in the transaction
inscriptionIdStringInscription number
priceStringPrice of the transaction
timestampLongTransaction timestamp
toAddressStringTo address in the transaction
unitPriceStringOrder unit price, priced in BTC
amountStringNumber of inscriptions in the order
isBrc20BooleanUsed to distinguish Ordinals inscription types: Brc20 or BTC NFT

Request example#

shell
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"

Response example#

200
{
    "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"
            }
        ]
    },
    "msg": ""
}