typescript-sdk

Home > @3rdweb/sdk > MarketplaceModule > buyoutDirectListing

MarketplaceModule.buyoutDirectListing() method

Buy Listing

Signature:

buyoutDirectListing(_buyout: {
        listingId: BigNumberish;
        quantityDesired: BigNumberish;
    }): Promise<void>;

Parameters

Parameter Type Description
_buyout { listingId: BigNumberish; quantityDesired: BigNumberish; }  

Returns:

Promise<void>

Remarks

Buy a specific direct listing from the marketplace.

Example

// The listing ID of the asset you want to buy
const listingId = 0;
// Quantity of the asset you want to buy
const quantityDesired = 1;

await module.buyoutDirectListing({ listingId, quantityDesired });