getListing

Retrieves a direct listing based on the provided options.

Example

import { getListing } from "thirdweb/extensions/marketplace";
const listing = await getListing({ contract, listingId: 1n });
function getListing(
): Promise<DirectListing>;

Parameters

The options for retrieving the 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 listing.