Docs

Marketplace

When using the Marketplace smart contract, additional top-level functionality is available to use.

You will be able to access the DirectListings, EnglishAuctions, and Offers properties of the Marketplace object.

Contract contract = sdk.GetContract("0x...");
Marketplace marketplace = contract.Marketplace;

DirectListings

Interact with direct listings in the marketplace.

GetAll

Retrieve all direct listings.

var listings = await marketplace.DirectListings.GetAll(filters);

GetAllValid

Retrieve all valid direct listings.

var validListings = await marketplace.DirectListings.GetAllValid(filters);

GetListing

Retrieve a specific direct listing by ID.

var listing = await marketplace.DirectListings.GetListing(listingID);

GetTotalCount

Retrieve the total count of direct listings.

var count = await marketplace.DirectListings.GetTotalCount();

IsBuyerApprovedForListing

Check if a buyer is approved for a reserved listing.

var isApproved = await marketplace.DirectListings.IsBuyerApprovedForListing(listingID, buyerAddress);

IsCurrencyApprovedForListing

Check if a currency is approved for a listing.

var isApproved = await marketplace.DirectListings.IsCurrencyApprovedForListing(listingID, currencyContractAddress);

ApproveBuyerForReservedListing

Approve a buyer for a reserved listing.

var result = await marketplace.DirectListings.ApproveBuyerForReservedListing(listingID, buyerAddress);

BuyFromListing

Buy from a listing.

var result = await marketplace.DirectListings.BuyFromListing(listingID, quantity, walletAddress);

CancelListing

Cancel a listing.

var result = await marketplace.DirectListings.CancelListing(listingID);

CreateListing

Create a new listing.

var result = await marketplace.DirectListings.CreateListing(input);

RevokeBuyerApprovalForReservedListing

Revoke buyer approval for a reserved listing.

var result = await marketplace.DirectListings.RevokeBuyerApprovalForReservedListing(listingId, buyerAddress);

RevokeCurrencyApprovalForListing

Revoke currency approval for a listing.

var result = await marketplace.DirectListings.RevokeCurrencyApprovalForListing(listingId, currencyContractAddress);

UpdateListing

Update a listing.

var result = await marketplace.DirectListings.UpdateListing(listingId, listing);

EnglishAuctions

Interact with English auctions in the marketplace.

GetAll

Retrieve all English auctions.

var auctions = await marketplace.EnglishAuctions.GetAll(filters);

GetAllValid

Retrieve all valid English auctions.

var validAuctions = await marketplace.EnglishAuctions.GetAllValid(filters);

GetAuction

Retrieve a specific English auction by ID.

var auction = await marketplace.EnglishAuctions.GetAuction(auctionId);

GetBidBufferBps

Retrieve the bid buffer basis points for an auction.

var bidBufferBps = await marketplace.EnglishAuctions.GetBidBufferBps(auctionId);

GetMinimumNextBid

Retrieve the minimum next bid for an auction.

var minimumNextBid = await marketplace.EnglishAuctions.GetMinimumNextBid(auctionId);

GetTotalCount

Retrieve the total count of English auctions.

var count = await marketplace.EnglishAuctions.GetTotalCount();

GetWinner

Retrieve the winner of an auction.

var winner = await marketplace.EnglishAuctions.GetWinner(auctionId);

GetWinningBid

Retrieve the winning bid for an auction.

var winningBid = await marketplace.EnglishAuctions.GetWinningBid(auctionId);

IsWinningBid

Check if a bid is the winning bid.

var isWinningBid = await marketplace.EnglishAuctions.IsWinningBid(auctionId, bidAmount);

BuyoutAuction

Buyout an auction.

var result = await marketplace.EnglishAuctions.BuyoutAuction(auctionId);

CancelAuction

Cancel an auction.

var result = await marketplace.EnglishAuctions.CancelAuction(auctionId);

CloseAuctionForBidder

Close an auction for the bidder.

var result = await marketplace.EnglishAuctions.CloseAuctionForBidder(auctionId);

CloseAuctionForSeller

Close an auction for the seller.

var result = await marketplace.EnglishAuctions.CloseAuctionForSeller(auctionId);

CreateAuction

Create a new auction.

var result = await marketplace.EnglishAuctions.CreateAuction(input);

ExecuteSale

Execute the sale for an auction.

var result = await marketplace.EnglishAuctions.ExecuteSale(auctionId);

MakeBid

Make a bid on an auction.

var result = await marketplace.EnglishAuctions.MakeBid(auctionId, bidAmount);

Offers

Interact with offers in the marketplace.

GetAll

Retrieve all offers.

var offers = await marketplace.Offers.GetAll(filters);

GetAllValid

Retrieve all valid offers.

var validOffers = await marketplace.Offers.GetAllValid(filters);

GetOffer

Retrieve a specific offer by ID.

var offer = await marketplace.Offers.GetOffer(offerID);

GetTotalCount

Retrieve the total count of offers.

var count = await marketplace.Offers.GetTotalCount();

AcceptOffer

Accept an offer.

var result = await marketplace.Offers.AcceptOffer(offerID);

CancelOffer

Cancel an offer.

var result = await marketplace.Offers.CancelOffer(offerID);

MakeOffer

Make a new offer.

var result = await marketplace.Offers.MakeOffer(input);