Skip to main content

Marketplace.getActiveListings() method

Get all active listings

Example

const listings = await contract.getActiveListings();
const priceOfFirstActiveListing = listings[0].price;

Signature:

getActiveListings(filter?: MarketplaceFilter): Promise<(AuctionListing | DirectListing)[]>;

Parameters

ParameterTypeDescription
filterMarketplaceFilter(Optional) optional filter parameters

Returns:

Promise<(AuctionListing | DirectListing)[]>

Remarks

Fetch all the active listings from this marketplace contract. An active listing means it can be bought or bid on.