Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Fetches all offers for a specific collectible This hook retrieves a list of active offers made on a specific collectible, including offer details like price, expiry, and maker information. Results can be filtered and paginated as needed.
args
const { data: marketplaceConfig, isLoading: isMarketplaceConfigLoading } = useMarketplaceConfig(); const collection = marketplaceConfig?.market.collections[0]; const chainId = collection?.chainId as number; const collectionAddress = collection?.itemsAddress as Address; const collectibleId = "0"; const { data, isLoading } = useListOffersForCollectible({ chainId, collectionAddress, collectibleId, }); if (isLoading) return <div>Loading offers...</div>; return ( <div> <h3>{data?.offers.length || 0} offers</h3> {data?.offers.map((offer) => ( <OfferCard key={offer.orderId} offer={offer} /> ))} </div> );
const { data } = useListOffersForCollectible({ chainId: 1, collectionAddress: collectionAddress, collectibleId: tokenId, page: { page: 1, pageSize: 20, }, sort:[{column: "price_usd", order: SortOrder.DESC}] }); // Show highest offers first const topOffers = data?.offers.slice(0, 3);
const { address } = useAccount(); const { data } = useListOffersForCollectible({ chainId, collectionAddress, collectibleId, filter: { createdBy: [String(userAddress)], }, }); const hasUserOffer = (data?.offers.length || 0) > 0;
Was this page helpful?