The PulsarSDK provides schemas for NFTs and NFT collections on various blockchains. These schemas are used to parse and represent the responses from the Pulsar API, enabling developers to build innovative NFT applications.

NFTItem

export class NFTItem {
  name: string;
  id: string;
  token_id: string;
  chain: string;
  traits: Record<string, string>;
  traits_hash: string | undefined;
  creator_address: string | undefined;
  owner_address: string | undefined;
  token: BaseToken | undefined;
  wallet: BaseWallet | undefined;
  collection: NFTCollection | undefined;
  description: string | undefined;
  avatar: string | undefined;
  video_avatar: string | undefined;
  price: string | undefined;
  url: string | undefined;
  urls: Record<string, string>;
  rarity_score: number | undefined;
  rank: number | undefined;
}
@dataclass
class NFTItem:
    name: str
    id: str
    token_id: str
    chain: str
    traits: dict[str, str]
    traits_hash: str | None
    creator_address: str | None
    owner_address: str | None
    token: BaseToken | None
    wallet: BaseWallet | None
    collection: NFTCollection | None
    description: str | None
    avatar: str | None
    video_avatar: str | None
    price: str | None
    url: str | None
    urls: dict[str, str]
    rarity_score: float | None
    rank: int | None

The NFTItem schema is a dataclass that holds information about a non-fungible token, such as its name, token ID, chain, traits, creator and owner address, as well as other metadata like description, avatar, video avatar, price, URL, rarity score and rank. It also includes references to related objects like the BaseToken, Wallet, and NFTCollection. The name and token_id attributes are optional, while the rest are required. The traits attribute holds a dictionary of additional traits about the NFT, while the traits_hash attribute holds a hash of the traits dictionary.


PaginatedNFTItem

export class PaginatedNFTItem {
  response: Array<NFTItem>;
  total: number;
}
@dataclass
class PaginatedNFTItem:
    response: list[NFTItem]
    total: int

The PaginatedNFTItem schema is a dataclass that holds a paginated list of NFTItem objects along with a total count. The response attribute holds a list of NFTItem objects, which represent a non-fungible token. The total attribute holds the total count of NFTItem objects.


NFTCollection

export class NFTCollection {
  id: string;
  address: string | undefined;
  chain: string;
  marketplaces: Array<NFTCollectionMarketplace>;
  number_of_assets: number | undefined;
  number_of_owners: number | undefined;
  available_traits: Array<string> | undefined;
  token: BaseToken | undefined;
  last_24h_change: string | undefined;
  last_24h_change_percentage: string | undefined;
  name: string | undefined;
  avatar: string | undefined;
  banner: string | undefined;
  description: string | undefined;
  volume: string | undefined;
  average_price: string | undefined;
  floor_price: string | undefined;
  market_cap: string | undefined;
  stats: NFTCollectionStats | undefined;
  low_volume: boolean;
  unknown_volume: boolean;
  is_fully_index: boolean;
}
@dataclass  
class NFTCollection:
    id: str
    address: str | None
    chain: str
    marketplaces: list[NFTCollectionMarketplace]
    number_of_assets: int | None
    number_of_owners: int | None
    available_traits: list[str | None]
    token: BaseToken | None
    last_24h_change: str | None
    last_24h_change_percentage: str | None
    name: str | None
    avatar: str | None
    banner: str | None
    description: str | None
    volume: str | None
    average_price: str | None
    floor_price: str | None
    market_cap: str | None
    stats: NFTCollectionStats | None
    low_volume: bool
    unknown_volume: bool
    is_fully_index: bool

The NFTCollection schema is used to represent information about an NFT collection. It includes the collection's ID, address, chain, available marketplaces, number of assets, traits, token, and various collection statistics. It is defined in the following dataclass:


PaginatedNFTCollection

export class PaginatedNFTCollection {
  response: Array<NFTCollection>;
  total: number;
}
@dataclass  
class PaginatedNFTCollection:  
    response: list[NFTCollection]  
    total: int

The PaginatedNFTCollection schema is used to represent a paginated list of NFT collections. It includes a list of NFTCollection objects and the total number of collections available. It is defined in the following dataclass: