Skip to main content

Marketplace.buyoutListing() method

Purchase NFTs

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 contract.buyoutListing(listingId, quantityDesired);

Signature:

buyoutListing(listingId: BigNumberish, quantityDesired?: BigNumberish, receiver?: string): Promise<TransactionResult>;

Parameters

ParameterTypeDescription
listingIdBigNumberishthe listing ID of the listing you want to buy
quantityDesiredBigNumberish(Optional) the quantity that you want to buy (for ERC1155 tokens)
receiverstring(Optional) optional receiver of the bought listing if different from the connected wallet (for direct listings only)

Returns:

Promise<TransactionResult>

Remarks

Buy a Direct or Auction listing on your marketplace.