Introduction to Inscription Assets
Inscription assets, including BTC NFTs and BRC-20 tokens, represent a new frontier in blockchain-based digital collectibles. This guide explains how to use the Ordinals API to fetch valid inscriptions from specified wallet addresses.
API Endpoint Specifications
Request URL
POST `https://web3.okx.com/api/v5/mktplace/nft/ordinals/get-valid-inscriptions`Required and Optional Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | String | Yes | Collection slug identifier |
cursor | String | No | Pagination cursor |
limit | String | No | Items per page (default: 10, max: 100) |
sort | String | No | Sorting method (see below) |
isBrc20 | Boolean | No | Filter by BRC-20 status (default: true) |
walletAddress | String | Yes | Target wallet address |
Sorting Options
listing_time_desc: Newest listings firstlisting_time_asc: Oldest listings firstprice_desc: Highest price firstprice_asc: Lowest price firstunit_price_desc: Highest unit price firstunit_price_asc: Lowest unit price first
Response Structure
Successful responses return structured inscription data:
| Field | Type | Description |
|---|---|---|
inscriptionId | String | Unique inscription identifier |
cursor | String | Current pagination marker |
nftId | String | NFT-specific identifier |
ticker | String | Token symbol |
tickerId | String | Token identifier |
amount | String | Quantity held |
Implementation Best Practices
- Pagination Handling: Always check for a
cursorvalue in responses to manage large datasets. - Rate Limiting: Implement appropriate request throttling.
- Error Handling: Prepare for HTTP status codes (429 for rate limits, 500 for server errors).
👉 Explore advanced Ordinals API techniques
Frequently Asked Questions
What's the difference between BTC NFTs and BRC-20 tokens?
BTC NFTs are unique digital assets on the Bitcoin blockchain, while BRC-20 tokens represent fungible assets using the same inscription technology.
How do I find my collection's slug?
Collection slugs appear in marketplace URLs and API documentation. Contact the platform's support if unsure.
Can I filter by multiple wallet addresses?
The current API version only accepts single-address queries per request.
What's the maximum historical data available?
Most implementations provide 6-12 months of historical inscription data by default.
How frequently is the inscription data updated?
Listings typically refresh every 15-30 minutes, depending on blockchain confirmation times.
👉 Learn about wallet security for inscription assets
Conclusion
This API provides comprehensive access to Bitcoin-based digital assets. For optimal results:
- Combine with marketplace APIs for complete trading functionality
- Implement client-side caching for frequently accessed wallets
- Monitor API changelogs for new features
Remember to always verify wallet addresses and implement proper error handling in your applications.