Accessing accurate and up-to-date information about NFT collections is essential for developers, investors, and market analysts navigating the Web3 ecosystem. The Collection API enables users to retrieve comprehensive details about individual NFT collections, including real-time metrics such as floor prices, ownership data, and collection metadata. This powerful tool is part of the broader Marketplace API suite under OKX’s Web3 API platform, designed to support seamless integration into decentralized applications (dApps), portfolio trackers, and analytics dashboards.
Whether you're building an NFT marketplace aggregator or analyzing market trends, this API delivers reliable, structured data that empowers informed decision-making in the fast-moving world of digital assets.
Understanding the Collection API Endpoint
The primary function of this endpoint is to fetch detailed information about a specific NFT collection using its unique identifier. By sending a simple GET request, developers can access rich metadata and live performance statistics—crucial for dynamic display and analysis.
API Request Overview
- HTTP Method:
GET - Endpoint URL:
https://web3.okx.com/api/v5/mktplace/nft/collection/detail
This endpoint requires only one parameter to return a full dataset, making it both efficient and easy to integrate.
👉 Discover how to integrate real-time NFT data into your dApp today.
Required Request Parameters
To successfully retrieve collection data, you must include the following parameter in your request:
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | String | Yes | The unique identifier (slug) of the NFT collection |
The slug typically corresponds to a URL-friendly version of the collection name and is used across platforms to reference specific collections. For example, a collection named "CryptoPunks" might have the slug cryptopunks.Response Data Structure
Upon a successful request, the API returns a JSON object containing detailed information about the specified collection. Below is a breakdown of the key fields returned in the response.
Core Collection Metadata
These fields provide foundational details about the NFT project:
name: The official name of the collection.des: A brief description outlining the theme, purpose, or story behind the NFTs.image: Direct URL to the collection's logo image.backgroundImage: URL pointing to the background banner image associated with the collection.slug: The unique identifier used in the request—useful for cross-referencing or caching.certificateFlag: Boolean value indicating whether the collection has been verified or certified by the platform.
External Links and Community Presence
NFT projects thrive on community engagement. This section includes links to official communication channels:
officialWebsite: Official project website.instagramUrl,discordUrl,mediumUrl,twitterUrl: URLs to social media profiles where users can follow updates, join discussions, and verify authenticity.
These links help users validate legitimacy and stay connected with project developments—key factors in combating scams and misinformation in the NFT space.
Categorization and Contracts
For technical integration and filtering capabilities:
categoryList: Array of categories assigned to the collection (e.g., Art, Gaming, PFP).assetContracts: An array of associated smart contracts, each containing:- Contract address
- Blockchain protocol standard (e.g., ERC-721, ERC-1155)
- Owner address
- Support status for royalty standard ERC-2981
This information is vital for developers who need to interact directly with contracts or assess compliance with industry standards.
Real-Time Collection Statistics
The stats object delivers actionable insights through key performance indicators:
- Total trading volume (historical and time-bound)
- Current floor price (in native cryptocurrency)
- Number of owners
- Listed supply vs. total supply
These metrics are updated in real time, enabling accurate valuation and trend tracking across market cycles.
👉 Start fetching live NFT floor prices and stats instantly.
Practical Use Cases
1. NFT Portfolio Trackers
Developers can use this API to enhance wallet dashboards by displaying verified collection names, images, and current floor prices—giving users a clearer picture of their holdings’ market value.
2. Market Aggregators
Platforms comparing listings across multiple marketplaces can leverage real-time stats to highlight undervalued assets or emerging trends based on volume spikes.
3. Due Diligence Tools
Including verification flags and official links helps users distinguish authentic projects from impersonators—a critical feature in fraud prevention.
4. Analytics & Research Platforms
Researchers analyzing NFT market dynamics can pull certified data directly from the API for reports, visualizations, and predictive modeling.
Integration Best Practices
When implementing this API into your application:
- Cache responses when possible to reduce redundant calls and improve load times.
- Validate slugs against known collections or use autocomplete features to prevent errors.
- Handle missing fields gracefully, as some collections may not have all optional data (e.g., missing Discord link).
- Monitor rate limits to ensure consistent uptime and avoid throttling during high-traffic periods.
Frequently Asked Questions (FAQ)
Q: What is a 'slug' in the context of NFT collections?
A: A slug is a URL-safe string that uniquely identifies an NFT collection. It's often derived from the collection name but formatted without spaces or special characters (e.g., "BoredApeYachtClub" becomes boredapeyachtclub).
Q: Can I retrieve data for any NFT collection using this API?
A: Yes, provided the collection is supported within OKX’s marketplace ecosystem and has a valid slug. Unsupported collections will return an error or empty response.
Q: Is the floor price updated in real time?
A: Yes, the stats object reflects live market conditions, including current floor price based on active listings.
Q: How can I verify if a collection is authentic?
A: Check the certificateFlag field—when true, it indicates platform verification. Also cross-reference official links like officialWebsite and twitterUrl.
Q: Does this API support multiple blockchains?
A: Yes, collections built on various chains (e.g., Ethereum, Polygon) are supported. The assetContracts field specifies the chain via protocol standards like ERC-721.
Q: Are there usage limits or authentication requirements?
A: While this guide focuses on public data access, production use may require API keys and adherence to rate-limiting policies. Refer to OKX’s full Web3 API documentation for details.
With robust metadata, real-time analytics, and verified project information, the Collection API serves as a foundational tool for anyone building or researching in the NFT ecosystem.
👉 Unlock real-time NFT insights and enhance your platform now.