getAllValidListings

Retrieves all valid direct listings based on the provided options.

Example

import { getAllValidListings } from "thirdweb/extensions/marketplace";
const validListings = await getAllValidListings({
contract,
start: 0,
count: 10,
});
function getAllValidListings(
): Promise<Array<DirectListing>>;

Parameters

The options for retrieving the valid listing.

Type

Returns

let returnType: {
asset: NFT;
assetContractAddress: Address;
creatorAddress: Address;
currencyContractAddress: Address;
currencyValuePerToken: GetBalanceResult;
endTimeInSeconds: bigint;
id: bigint;
isReservedListing: boolean;
pricePerToken: bigint;
quantity: bigint;
startTimeInSeconds: bigint;
status: ListingStatus;
tokenId: bigint;
type: "direct-listing";
};

A promise that resolves to the direct listings array.