Retrieve valid inscriptions#
This interface is used to get the valid inscription data respectively to the given wallet address.
Request address#
POST https://web3.okx.com/api/v5/mktplace/nft/ordinals/get-valid-inscriptions
Request param#
| 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 | Yes | For pagination. The maximum number of collections to return. The default value is 10, and the max is 100 | 
| sort | String | No | Order sorting rules: ‘listing_time_desc’ means sorting in descending order based on the order creation time, while ‘listing_time_asc’ means sorting in ascending order based on the order update time, ‘price_desc’ means default sorting of order prices from high to low, ‘price_asc’ means default sorting of order prices from low to high; ‘unitprice_desc’ means default sorting of order unit prices from low to high, and ‘unitprice_asc’ means default sorting of order unit prices from high to low. The default sorting rule is to sort in descending order by time | 
| isBrc20 | Boolean | No | Retrieve the list of BTC NFT or BRC 20 listings, the default is ‘Yes’ | 
| walletAddress | String | Yes | The wallet address which querying for the valid inscriptions | 
Response param#
An array of ordinals inscription information.
| Parameter | Type | Description | 
|---|---|---|
| inscriptionId | String | Inscription ID | 
| cursor | String | To retrieve next page on the request, add this cursor value into the next request | 
| nftId | String | NFT ID for that inscription | 
| ticker | String | Ticker for the BRC-20 token | 
| tickerId | String | ID for that ticker | 
| amount | String | Number of inscriptions in the order | 
Code request example#
shell
curl --location 'https://web3.okx.com/api/v5/mktplace/nft/ordinals/get-valid-inscriptions' \
--header 'OK-ACCESS-KEY: your API key' \
--header 'OK-ACCESS-PASSPHRASE: your passphrase' \
--header 'Content-Type: application/json' \
--data '{
    "slug": "BTC Ordinals",
    "walletAddress": "bc1qek.....27zgdgqfawx",
    "limit": "10",
    "isBrc20": false
}'
Response example#
200
{
      "code": 0,
      "data": {
          "cursor": "MTY5N.......WZhd3g=",
          "inscriptionInfos": [
              {
                  "amount": "1",
                  "inscriptionId": "6218a48de6039b1e...fdce171601083961f45a326856dd30ffi0",
                  "nftId": "208249...3273458",
                  "ticker": "",
                  "tickerId": ""
              },
              {
                  "amount": "1",
                  "inscriptionId": "caf70bcc595389...a1ccb4ec81fa0a0612a95f2e8402a10710a373i0",
                  "nftId": "20793046...2400114",
                  "ticker": "",
                  "tickerId": ""
              },
              {
                  "amount": "1",
                  "inscriptionId": "ad14bd7fa6afee2bc37681f6...9b949746d258e0c8133c259a94198febf66bi0",
                  "nftId": "17407619...517490",
                  "ticker": "",
                  "tickerId": ""
              },
              {
                  "amount": "1",
                  "inscriptionId": "6f776f43d119094...37ce8abab7aea902a4455fc7b8b319122880f71a1ci0",
                  "nftId": "16635...80929138",
                  "ticker": "",
                  "tickerId": ""
              },
              {
                  "amount": "1",
                  "inscriptionId": "e0ae7e1ee159...d836fe692b1fb6b25911f9f6edec666da9fb090fdffe4i0",
                  "nftId": "166355152...29586",
                  "ticker": "",
                  "tickerId": ""
              }
          ]
      },
      "msg": ""
  }
