Marketplace API

Retrieve Fractal 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/fractal-ordinals/trade-history

Request param#

ParameterTypeRequiredDescription
slugStringYesThe 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 Fractal NFT or Brc20 trade activities, the default is Yes
orderSourceListInteger[]NoRetrieve orders for certain platforms, please fill in the code, such as [34,54] (34-OKX 54-Magic Eden 55-OrdinalsWallet 57-Unisat).
tradeWalletAddressStringNoThe wallet address involved in the transaction.
typeStringNoTransaction type, multiple separated by commas (SALE, LIST, TRANSFER, CANCEL_LIST, UPDATE_PRICE). Default return Sale data.

Response param#

An array of Ordinals Activities Model

ParameterTypeDescription
fromAddressStringFrom address in the transaction
inscriptionIdStringInscription number
priceStringPrice of the transaction, priced in FB
timestampLongTransaction timestamp
toAddressStringTo address in the transaction
unitPriceStringOrder unit price, priced in FB
amountStringNumber of inscriptions in the order
isBrc20BooleanUsed to distinguish Ordinals inscription types: Brc20 or Fractal NFT
orderSourceIntegerOrder source
orderSourceNameStringThe name of the source of the order
typeStringTransaction type

Request example#

shell
curl -X POST "https://www.okx.com/api/v5/mktplace/nft/fractal-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": "3096",
                "fromAddress": "bc1pgnwyzfjl0fmw4n87tr4stv8hyeed3fc2qnavrpkgv2cqv4vywfjsm69w7n",
                "inscriptionId": "b4f9d43757afdc94b04738577cf4d8a6f1262cff4c6f489b641c614539d285bdi0",
                "inscriptionNumber": "119738160",
                "isBrc20": true,
                "price": "6.192",
                "slug": "people",
                "timestamp": 1728991566,
                "toAddress": "bc1p9xuw2vdtk0z5m3nv3x6ljr32m4eu30u69472x6yy4rj9zsyguy0qwdu8p7",
                "unitPrice": "2000000",
                "orderSource": 84,
                "orderSourceName": "okx",
                "type": "SALE"
            }
        ]
    },
    "msg": ""
}