Skip to main content

useWinningBid() function

This feature is currently in beta and may change based on feedback that we receive.

Use this to get a the winning bid for an auction listing from your marketplace contract.

Example

const { data: winningBid, isLoading, error } = useWinningBid(<YourMarketplaceContractInstance>, <listingId>);

Signature:

export declare function useWinningBid(
contract: RequiredParam<Marketplace>,
listingId: RequiredParam<BigNumberish>,
): import("@tanstack/react-query").UseQueryResult<
import("@thirdweb-dev/sdk/dist/browser").Offer | undefined,
unknown
>;

Parameters

ParameterTypeDescription
contractRequiredParam<Marketplace>an instance of a marketplace contract
listingIdRequiredParam<BigNumberish>the listing id to check

Returns:

import("@tanstack/react-query").UseQueryResult<import("@thirdweb-dev/sdk/dist/browser").Offer | undefined, unknown>

a response object that includes the that is winning the auction