Listing

export type ListingStatus = 'deleted' | 'cancelled' | 'active' | 'inactive' | 'sold';
export type ListingUpdateStatus = 'active' | 'inactive';

export type Listing = {
    listingId: string;
    assetId: string;
    collectionName: string;
    serial: number;
    liveTime: number;
    collectionId: string;
    slotId: string;
    appId: string;
    price: number;
    status: ListingStatus;
    seller: UserAlias;
    createdAt: number;
    updatedAt: number;
    currency?: string;
    currencyId?: string;
    txids?: ListingTXIDs;
    buyer?: UserAlias;
    soldTime?: number;
    cancelledTime?: number;
};
export type ListingTXIDs = {
    initial?: string;
    paid?: string;
    payment?: string;
}

export type ListingsCounts = { [collectionId: string]: number; };
export type ListingsStats = { [collectionId: string]: CollectionListingsStats; };
export type CollectionListingsStats = {
    count: number;
    lowest: number;
    highest: number;
    newest: number;
    newestDate: number;
    oldest: number;
    oldestDate: number;
};

export type CreateListingResponse = BasicResponse<{ listing: CreateListingResponseBody; }>;
export type CreateListingsResponse = BasicResponse<{ assetIds: string[]; }>;
type CreateListingResponseBody = {
    listingId: string;
    assetId: string;
    price: number;
    status: ListingStatus;
    liveTime: number;
    seller: UserAlias;
}

Last updated