Peer to Peer Trading - Intro
Peer to Peer Trading is facilitated by our Marketplace API.
Users will be able to purchase and sell ERC721/1155s between one another via the marketplace SDK in Unity; paying in cryptocurrency (with currency abstraction enabled by default) or via credit card where available (coming soon!).
Installation
The V4 version of our SDK is currently in beta and maintained on a separate branch. We are eagerly looking for feedback on this new major update for the SDK, so please get in touch with us!
Please install via Package Manager with Git URL:
https://github.com/0xsequence/sequence-unity.git?path=/Packages/Sequence-Unity#v4-beta
If you already have the Sequence Unity SDK installed in your project, you will likely need to remove it.
Understanding the Basics
Before diving into the details behind the marketplace, let's first establish an understanding of some basic concepts.
Orders
There are two basic types of Orders: listings and offers.
Listings indicate an intent to sell a given amount of a collectible (where a collectible is the combination of a Chain, contract address, and token id) at a certain price per collectible in a given Currency. Once created, listings can be queried and bought by another user. Offers indicate an intent to purchase a given amount of a collectible at a certain price per collectible in a given Currency. Once created, offers can be queried and sold by another user.
In order to create, fill, or cancel an Order, you must use the appropriate Generate_Method_Transaction call based on which method you are using. This will give you a Step[]
that can be submitted as a transaction in order to perform the desired action. More on this in the Filling Orders section of the docs.
Currencies
A Currency is an ERC20 token or native token that has been whitelisted for a given project and Chain for use in the marketplace. You can add a new currency to the whitelist for you project by adding it as a custom currency when creating a white-label marketplace in the Sequence Builder. Please see this guide. All orders must be priced in whitelisted currencies or they will be ignored by the API.
Collections
A Collection is a group of Collectibles, identified by an ERC721 or ERC1155 contract address.
Collectibles
A Collectible is a specific instance of a Collection, identified by the ERC721/ERC1155 contract address and the token id.