Marketplace API
Create listing

Create listing#

This API is used to list a single Runes inscription on the OKX platform. Before listing, you can get wallet assets (get the holding information of a specific token in the wallet) to first get the list of Runes inscriptions you hold.

Request address#

POST https://www.okx.com/api/v5/mktplace/nft/runes/make-order

Request param#

ParameterTypeRequiredDescription
runesIdStringYesrunes token's unique identifier, e.g., 840000:3
walletAddressStringYesWallet address holding the above runesId inscription
utxoStringYesUTXO where the rune token is located, format: txHash:vout, e.g., d578a0967605257f75be625cbdc2506f2a52f9135f56f302badab6a3da54e0d4:0
unitPriceBigDecimalYesListing unit price of the inscription, in Satoshis
totalPriceBigDecimalYesListing total price of the inscription, in BTC
psbtStringYesSigned listing PSBT, currently only accepts base64-encoded PSBT. The UTXO containing the inscription must be placed in the input at index=1, and the receiving address and amount must be placed in the corresponding output at index=1

Response param#

ParameterTypeDescription
codeIntegerResponse result code, code=0 indicates success, other values indicate failure
dataObjectResponse result body, specific fields refer to response example
msgStringResult message, refer to this when code is not 0

Request example#

shell
curl --location 'https://www.okx.com/api/v5/mktplace/nft/runes/make-order' \
--header 'OK-ACCESS-KEY: your apikey' \
--header 'OK-ACCESS-PASSPHRASE: your passphrase' \
--header 'Content-Type: application/json' \
--data '{
"runesId": "840000:3",
"walletAddress": "bc1pud5f80a06y6jcwlllt2t5vdq24sd8d24f39jccay24dqhqmgelkq9dqghx",
"utxo": "c1dd6736a19d7744353731c85f7f3b7fb9908041e03a1fe66507102e5af930ec:2",
"unitPrice": 130000,
"totalPrice": 1300000,
"psbt": "j2li1jlkjsalkdfjsalkjdo"
}'

Response example#

200
{
  "code": 0,    // code=0 indicates success, other values indicate failure
  "data": {
  "assetId": "1",   // asset id of the listing
},
  "msg": ""
}