Submit listing#
This interface is used submit ordinals listings to OKX platform. Listing including BRC-20 and BTC NFT are possible. Psbt would require UTXO of the inscription which you can obtain from this interface query UTXO.
Request address#
POST https://web3.okx.com/api/v5/mktplace/nft/ordinals/okx/make-orders
Request param#
| Parameter | Type | Required | Description | 
|---|---|---|---|
| nftId | String | Yes | The unique identifier for the ordinal NFT that is listing | 
| inscriptionId | String | Yes | Inscription ID | 
| orderType | Integer | Yes | Type of this order. Use 2 to create ordinal listing | 
| unitPrice | BigDecimal | Yes | BRC-20 unit price/price of one NFT. Unit: satoshi | 
| isBrc20 | Boolean | No | If the respective listing is BRC-20, then true otherwise false. Default to true | 
| psbt | String | Yes | Partially signed Bitcoin transaction. Only base64 encoded PSBT is accepted | 
| totalPrice | BigDecimal | Yes | Total Price to be listed on the platform. Unit: satoshi | 
Response param#
| Parameter | Type | Description | 
|---|---|---|
| nftId | String | The unique NFT ID for this request | 
| success | Boolean | If it is successful, it will be true otherwise it will be false | 
| errorMsg | String | Detail error message for the failure of the request | 
Code request example#
shell
curl --location 'https://web3.okx.com/api/v5/mktplace/nft/ordinals/okx/make-orders' \
--header 'OK-ACCESS-KEY: your api key' \
--header 'OK-ACCESS-PASSPHRASE: your passphrase' \
--header 'Content-Type: application/json' \
--data '{
  "brc20": false,
  "items": [
    {
      "inscriptionId": "02ecbe7ef5143...3f3de87a7c6e64409883f66f4e3036i0",
      "nftId": 20824...473273458, // get this data part 1 step 2 by mapping it to inscriptionId
      "orderType": 2,
      "totalPrice": 100000,  // this price should match part 3 step 1
      "unitPrice": 100000, // this price will varies for BRC20 or btc NFT.  Check out NOTE on unitPrice
      "psbt": "cHNidP8BAP0GAQIAAAADAAAAAAAA...ZUDTZKgR6mGJSkBSJuPsgb2gGCekW+W04EtAAAAAA=",
    }
  ]
}
'
Json response example#
200
{
      "result": [
          {
              "nftID": 20824...473273458,
              "errorMsg": "",
              "success": true,
          }
      ]
  }
