The primary object in the OpenSea API is the asset, which represents a unique digital item whose ownership is managed by the blockchain. The below CryptoSaga hero is an example of an asset shown on OpenSea.
Here's an overview of some of the fields contained in an asset:
The token ID of the NFT
An image for the item. Note that this is the cached URL we store on our end. The original image url is
The background color to be displayed with the item
Name of the item
External link to the original website for the item
A list of traits associated with the item (see traits section)
When this item was last sold (null if there was no last sale)
see Collection Model
see Account Model
deprecated - use 'top_ownerships' instead
array of Accounts (see Account Model)
ERC721: returns current owner
Contains rarity data for the asset. See Rarity Data below.
Only contains data if the creator has enabled rarity (check field is_rarity_enabled on the Collection model), else null.
Traits are special properties on the item, that can either be numbers or strings. Below is an example of how OpenSea displays the traits for a specific item.
Here are some of the fields contained in a trait:
The name of the trait (for example color)
string or number
The value of this trait (can be a string or number)
How this trait will be displayed (options are
Rarity data contains the calculated rarity information of an asset within a collection. This data is stored on the asset model under the field
The rarity strategy string identifier. Current value will be "openrarity”.
The version of the strategy.
For “openrarity”, this will be the python package version of the OpenRarity library used to calculate the returned score and rank.
The rank of the asset within the collection, calculated using the rarity strategy defined by strategy_id and strategy_version.
The rarity score of the asset, calculated using the rarity strategy defined by strategy_id and strategy_version.
The time we calculated rarity data at, as a timestamp in UTC.
Note: This may not equal the time a creator has uploaded or changed metadata.
The maximum rank in the collection. Ranking for an asset should be considered the out of <max_rank>.
Typically max_rank will be equal to collection supply if all assets have been fully revealed with metadata loaded into opensea system, and every asset has unique ranks.
Before reveal is complete, rarity_data.max_rank < collection.stats.total_supply.
The total tokens in the collection that have non-null traits and was used to calculate rarity data.
This will equal collection.stats.total_supply once Opensea has the revealed trait data for all assets in the collection.