> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequence.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Building a Marketplace

This doc will walk you through how we'd recommend using the Sequence SDK to build an on-chain collectibles marketplace for secondary sales.

<Tip>Before starting, don't forget to [configure your marketplace in the Builder](/solutions/payments/marketplace/hosted#launch-a-marketplace).</Tip>

## 1. Read Listings

First, you'll want to read listings from your marketplace to display to your user.

```
IMarketplaceReader reader = new MarketplaceReader(_chain);
ListCollectiblesReturn collectiblesReturn = await reader.ListCollectibleListingsWithLowestPricedListingsFirst(myCollectionContractAddress);
CollectibleOrder[] orders = collectiblesReturn.collectibles;
```

Optionally, you can provide a `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.

This will give you one `CollectibleOrder` for each Collectible, the lowest priced listing.

## 2. Display the Listings

Once you've retrieved your `CollectibleOrder[]` from step #1, you'll want to use the `TokenMetadata` returned in your `CollectibleOrder` to display the orders in your marketplace UI in some fashion.

We've provided a very basic example of how to display this information to your user in the Demo scene included in the SDK.

## 3. Checking Out

Once your user has selected a Collectible and amount in your UI, you'll want to initiate the checkout process. We recommend using our [Checkout UI](/sdk/unity/monetization/checkout-ui) and modifying it's appearing as needed.

In order to open the Checkout UI, you'll need an instance of `ICheckoutHelper` and `IFiatCheckout`. In this case, you'll want to use the `NftCheckout` and `SequenceCheckout` implementations respectively.

```
ICheckoutHelper checkoutHelper = new NftCheckout(wallet, collectibleOrder, collectibleSprite, amount);
```

Where collectibleOrder is the selected Collectible from the CollectibleOrder\[] showed in the UI. NftCheckout will fetch additional listings for the same collectible as needed to facilitate the amount (and will cap the amount purchased at what is available accross all listings)

```
IFiatCheckout fiatCheckout = new SequenceCheckout(wallet, chain, collectibleOrder, amount);
```
