typescript-sdk

Home > @3rdweb/sdk > MarketplaceModule > getWinningBid

MarketplaceModule.getWinningBid() method

Get Highest Bid

Signature:

getWinningBid(listingId: BigNumberish): Promise<Offer | undefined>;

Parameters

Parameter Type Description
listingId BigNumberish  

Returns:

Promise<Offer | undefined>

Remarks

Get the current highest bid of an active auction.

Example

// The listing ID of the auction that closed
const listingId = 0;

module
  .getWinningBid(listingId)
  .then((offer) => console.log(offer))
  .catch((err) => console.error(err));