IMarketplaceReader
interface, implemented by MarketplaceReader
.
The IMarketplaceReader interface has IntelliSense summaries to help you understand what each method is used for, but, we’ll call out a few of them here as well.
ListCollectibleListingsWithLowestPricedListingsFirst
is used to get the listings associated with a given contract address. The listings will be ordered with the lowest priced listings first. In addition, only the lowest priced listing for each collectible (i.e. each token id) will be returned.CollectiblesFilter
to apply filters on your query.
This request uses pagination. If you’re dealing with a rather small collection and don’t want to deal with pagination, you can use the ListAllCollectibleListingsWithLowestPricedListingsFirst
helper function; this will handle the pagination for you and continue to make requests until all the relevant CollectibleOrder
s have been retrieved.
You can also optionally subscribe to the OnListCollectibleOrdersReturn
and OnListCollectibleOrdersError
events in order to handle the responses elsewhere.
GetLowestPriceListingForCollectible
and GetHighestPriceListingForCollectible
can be used to fetch the lowest and highest priced listing for a collectible respectively.OrderFilter
to apply filters on your query.
Additionally, you have the option to subscribe to the OnGetCollectibleOrderReturn
and OnGetCollectibleOrderError
events in order to handle the response elsewhere.
ListListingsForCollectible
is used to get all of the listings for a given Collectible.OrderFilter
to apply filters on your query.
This request uses pagination. If you’re dealing with a rather small set of listings and don’t want to deal with pagination, you can use the ListAllListingsForCollectible
helper function; this will handle the pagination for you and continue to make requests until all the relevant Order
s have been retrieved.
Additionally, you have the option to subscribe to the OnListCollectibleListingsReturn
and OnListCollectibleListingsError
events in order to handle the response elsewhere.
ListAllPurchasableListings
is a convenience helper method that can be used to ListAllCollectibleListingsWithLowestPricedListingsFirst
, filtering for listings not created by purchasableBy
. Then, using a ChainIndexer
for the configured Chain to fetch purchasableBy
’s token balances and removing any listings they cannot afford to purchase without swapping.CollectibleOrder
s have been fetched. Be careful to use it on collections with a small amount of listings (as with other helper methods that handle pagination for you) so that you do not use too much memory. This method’s implementation can also serve as an example for how you can work with the Indexer in conjunction with the peer to peer marketplaces.
ListCollectibleOffersWithHighestPricedOfferFirst
is used to get the offers associated with a given contract address. The listings will be ordered with the highest priced offer first. In addition, only the highest priced offer for each collectible (i.e. each token id) will be returned.CollectiblesFilter
to apply filters on your query.
This request uses pagination. If you’re dealing with a rather small collection and don’t want to deal with pagination, you can use the ListAllCollectibleOffersWithHighestPricedOfferFirst
helper function; this will handle the pagination for you and continue to make requests until all the relevant CollectibleOrder
s have been retrieved.
You can also optionally subscribe to the OnListCollectibleOrdersReturn
and OnListCollectibleOrdersError
events in order to handle the responses elsewhere.
GetLowestPriceOfferForCollectible
and GetHighestPriceOfferForCollectible
can be used to fetch the lowest and highest priced offer for a collectible respectively.OrderFilter
to apply filters on your query.
Additionally, you have the option to subscribe to the OnGetCollectibleOrderReturn
and OnGetCollectibleOrderError
events in order to handle the response elsewhere.
ListOffersForCollectible
is used to get all of the offers for a given Collectible.OrderFilter
to apply filters on your query.
This request uses pagination. If you’re dealing with a rather small set of offers and don’t want to deal with pagination, you can use the ListAllOffersForCollectible
helper function; this will handle the pagination for you and continue to make requests until all the relevant Order
s have been retrieved.
Additionally, you have the option to subscribe to the OnListCollectibleOffersReturn
and OnListCollectibleOffersError
events in order to handle the response elsewhere.
ListAllSellableOffers
is a convenience helper method that can be used to ListAllCollectibleOffersWithHighestPricedOfferFirst
, filtering for offers not created by sellableBy
and where sellableBy
has at least one of the collectibles being requested.CollectibleOrder
s have been fetched. Be careful to use it on collections with a small amount of offers (as with other helper methods that handle pagination for you) so that you do not use too much memory. This method’s implementation can also serve as an example for how you can work with CollectiblesFilter
s.
ListCollectibleListingsWithLowestPricedListingsFirst
and ListCollectibleOffersWithHighestPricedOfferFirst
methods and CollectiblesFilter
for querying/filtering listings and orders respectively, with the remaining methods being primarily useful during the checkout process.