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:

Field name

Description

token_id

The token ID of the ERC721 asset

image_url

An image for the item

background_color

The background color to be displayed with the item

name

Name of the item

external_link

External link to the original website for the item

asset_contract

Dictionary of data on the contract itself (see asset contract section)

owner

Dictionary of data on the owner (see account section)

traits

A list of traits associated with the item (see traits section)

last_sale

When this item was last sold (null if there was no last sale)

Traits

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:

trait_type

The name of the trait (for example color)

value

The value of this trait (can be a string or number)

display_type

How this trait will be displayed (options are number, boost_percentage, boost_number, and date). See the adding metadata section for more details

Asset contracts

Asset contracts contain data about the contract itself, such as the CryptoKitties contract or the CryptoFighters contract. Here are the field associated with an asset contract:

address

Address of the asset contract

name

Name of the asset contract

symbol

Symbol, such as CKITTY

image_url

Image associated with the asset contract

description

Description of the asset contract

external_link

Link to the original website for this contract