Web API: NFT
The NFT API provides endpoints for retrieving information about non-fungible tokens, including NFT details, ownership, transfer history, and marketplace listings.
Base URL
/api/nft/
Endpoints
List NFTs
GET /api/nft/
Returns a paginated list of NFTs with filtering and search capabilities.
Query Parameters:
search
: Search by NFT name or identifierordering
: Order results (e.g.,-created_at
,name
)owner
: Filter by owner addresscollection
: Filter by collection smart contract
Response:
{
"count": 75000,
"next": "http://localhost:8000/api/nft/?page=2",
"previous": null,
"results": [
{
"identifier": "NFT123...",
"name": "Digital Artwork #1",
"description": "A beautiful piece of digital art",
"owner_address": "Rx1234567890abcdef...",
"creator_address": "Rx9876543210fedcba...",
"collection": "Cool Art Collection",
"image_url": "https://media.vfx.io/nft/image123.png",
"thumbnail_url": "https://media.vfx.io/nft/thumb123.png",
"mint_date": "2024-01-01T12:00:00Z",
"last_sale_price": "150.0",
"attributes": [
{
"trait_type": "Background",
"value": "Blue"
}
]
}
]
}
Get NFTs by Multiple Addresses
GET /api/nft/addresses/{addresses}/
Returns NFTs owned by multiple addresses (comma-separated).
Parameters:
addresses
(string): Comma-separated list of VFX addresses
Get Listed NFT Identifiers
GET /api/nft/listed/{owner_address}/
Returns identifiers of NFTs currently listed for sale by an owner.
Parameters:
owner_address
(string): The owner's VFX address
Response:
{
"results": [
"NFT123...",
"NFT456...",
"NFT789..."
]
}
Get NFT Details
GET /api/nft/{identifier}/
Returns detailed information about a specific NFT.
Parameters:
identifier
(string): The NFT identifier
Response:
{
"identifier": "NFT123...",
"name": "Digital Artwork #1",
"description": "A beautiful piece of digital art",
"owner_address": "Rx1234567890abcdef...",
"creator_address": "Rx9876543210fedcba...",
"collection": {
"name": "Cool Art Collection",
"smart_contract_uid": "SC456..."
},
"metadata": {
"image": "https://media.vfx.io/nft/image123.png",
"animation_url": "https://media.vfx.io/nft/animation123.mp4",
"external_url": "https://example.com/nft123"
},
"attributes": [
{
"trait_type": "Background",
"value": "Blue",
"rarity": "15%"
},
{
"trait_type": "Style",
"value": "Abstract",
"rarity": "8%"
}
],
"mint_transaction": {
"hash": "tx123...",
"block_height": 12345,
"timestamp": "2024-01-01T12:00:00Z"
},
"royalty_info": {
"percentage": 5.0,
"recipient": "Rx9876543210fedcba..."
},
"listing": {
"price": "200.0",
"currency": "VFX",
"marketplace": "VFX Marketplace",
"expires_at": "2024-02-01T12:00:00Z"
}
}
Get NFT History
GET /api/nft/{identifier}/history/
Returns the complete transaction history for an NFT.
Parameters:
identifier
(string): The NFT identifier
Response:
{
"num_pages": 1,
"page": 1,
"count": 5,
"results": [
{
"type": "mint",
"hash": "tx123...",
"from_address": null,
"to_address": "Rx9876543210fedcba...",
"amount": null,
"timestamp": "2024-01-01T12:00:00Z",
"block_height": 12345
},
{
"type": "transfer",
"hash": "tx456...",
"from_address": "Rx9876543210fedcba...",
"to_address": "Rx1234567890abcdef...",
"amount": "150.0",
"timestamp": "2024-01-15T14:30:00Z",
"block_height": 12678
},
{
"type": "sale",
"hash": "tx789...",
"from_address": "Rx1234567890abcdef...",
"to_address": "Rx5555666677778888...",
"amount": "200.0",
"timestamp": "2024-01-20T16:45:00Z",
"block_height": 12890
}
]
}
Verify NFT Ownership
POST /api/nft/verify-ownership/
Verifies ownership of an NFT using cryptographic signature.
Request:
{
"signature": "signature_data_here...",
"message": "I own this NFT",
"nft_identifier": "NFT123...",
"address": "Rx1234567890abcdef..."
}
Response:
{
"verified": true,
"owner_address": "Rx1234567890abcdef...",
"nft_identifier": "NFT123...",
"verification_timestamp": "2024-01-01T12:00:00Z"
}
Field Descriptions
NFT Data
identifier
: Unique NFT identifier/token IDname
: Human-readable name of the NFTdescription
: Detailed description of the NFTowner_address
: Current owner's VFX addresscreator_address
: Original creator's VFX addresscollection
: Collection information or nameimage_url
: URL to the main NFT imagethumbnail_url
: URL to a smaller preview image
Metadata
image
: Main image URLanimation_url
: URL for animated/video contentexternal_url
: Link to external website or marketplace
Attributes
trait_type
: Category/type of the attributevalue
: The actual attribute valuerarity
: How rare this attribute is within the collection
Transaction History
type
: Transaction type (mint, transfer, sale, burn)hash
: Transaction hashfrom_address/to_address
: Sender and recipient addressesamount
: Sale price (if applicable)timestamp
: When the transaction occurred
Transaction Types
mint
: NFT was created/mintedtransfer
: NFT was transferred between addressessale
: NFT was sold (transfer with payment)burn
: NFT was destroyed/burnedmisc
: Other smart contract interactions
Notes
- NFT identifiers are unique within the VFX ecosystem
- Images and metadata may be stored on IPFS for decentralization
- Rarity percentages are calculated within each collection
- Royalty information defines creator earnings on secondary sales
- Listing information shows current marketplace availability
- Ownership verification uses VFX's cryptographic signature system