This guide provides detailed instructions on how to submit Ordinals listings (including BRC-20 tokens and BTC NFTs) to the OKX platform using their API interface.
Understanding Ordinals Listings on OKX
The OKX platform allows users to list various types of Ordinals assets, including:
- BRC-20 tokens
- Bitcoin NFTs (Non-Fungible Tokens)
Before creating a listing, you'll need to gather necessary information about your inscription, including its UTXO details.
👉 Learn how to query UTXO information
API Endpoint for Listing Submission
Request Address
POST https://web3.okx.com/api/v5/mktplace/nft/ordinals/okx/make-ordersRequired Parameters for Listing Submission
| Parameter | Type | Required | Description |
|---|---|---|---|
| nftId | String | Yes | Unique identifier for the ordinal NFT |
| inscriptionId | String | Yes | Inscription ID |
| orderType | Integer | Yes | Use value 2 for ordinal listing |
| unitPrice | BigDecimal | Yes | Price per unit (in satoshis) |
| isBrc20 | Boolean | No | Set to true for BRC-20 (default: true) |
| psbt | String | Yes | Base64 encoded PSBT |
| totalPrice | BigDecimal | Yes | Total listing price (in satoshis) |
Understanding the Response
After submitting your listing, you'll receive a response with the following parameters:
| Parameter | Type | Description |
|---|---|---|
| nftId | String | Unique NFT ID |
| success | Boolean | Request success status |
| errorMsg | String | Detailed error message (if any) |
Best Practices for Successful Listings
- Verify Inscription Details: Double-check your inscription ID and NFT details before submission.
- Price Accuracy: Ensure your pricing (both unit and total) accurately reflects your intended listing.
- PSBT Preparation: Make sure your PSBT is properly encoded and includes all necessary signatures.
👉 Get expert tips for successful NFT listings
FAQ Section
What types of Ordinals can I list on OKX?
You can list both BRC-20 tokens and Bitcoin NFTs through the OKX platform.
How do I obtain the required UTXO information?
You can query UTXO information through OKX's dedicated interface before creating your listing.
What happens if my listing submission fails?
The API will return an error message explaining the reason for failure, which could include invalid parameters, insufficient funds, or other validation errors.
Can I modify a listing after submission?
Currently, listings cannot be modified after submission. You would need to cancel the existing listing and create a new one.
How long does it take for a listing to become active?
Listings typically become active immediately upon successful submission, though blockchain confirmation times may affect visibility.
What's the difference between unitPrice and totalPrice?
Unit price refers to the price per individual token (for fungible BRC-20), while total price represents the complete amount for the entire listing.
Troubleshooting Common Issues
- Invalid PSBT: Ensure your PSBT is base64 encoded and properly signed.
- Price Mismatch: Verify that your unitPrice and totalPrice calculations are correct.
- Inscription Not Found: Double-check your inscriptionId and nftId for accuracy.
Remember that successful Ordinals listings require attention to detail and proper preparation of all required parameters.