6. Creating Orders
Orders are requests to exchange a certain amount of one asset for a different amount of another asset. This typically refers to a listing or an offer in the world of NFTs.
Where are the orders?
Once an order is created, it will be added to the Zecrey NFT Marketplace. They will be recorded on Zecrey NFT Marketplace to be viewed and available to all participants for trading.
Zecreymarket SDK
Initialize SDK
You need to initialize the SDK in order to use it.
Create a listing
Parameters needed:
Parameter
Parameter usage and meaning
Required or not
accountName
The account name used to initialize the client
✅
seed
The user's L2 seed used to initialize the client
✅
assetType
Specify the asset type used to purchase the NFT
✅
AssetAmount
The asset amount needed to purchase the NFT
✅
nftId
Id of the NFT to be sold
✅
📚SDK REFERENCE
Example
Create an order to list the NFT with
NftId
= 14Initialize the client
Create a listing
Example result
Make an offer
Parameters needed:
Parameter | Parameter usage and meaning | Required vs Optional |
accountName | The account name used to initialize the client | ✅ |
seed | The user's L2 seed used to initialize the client | ✅ |
assetType | Specify the asset type used to purchase the NFT | ✅ |
AssetAmount | The asset amount needed to purchase the NFT | ✅ |
nftId | The Id of the NFT to be purchased | ✅ |
📚SDK REFERENCE
Example
Make an offer to the NFT with
NftId
= 14Initiate the client
Create an offer
Example result
Cancel an order
To cancel a previous offer/listing order, you can use the
cancelOffer
request.
📚SDK REFERENCE
Example
Cancel offer/order with
offerId
= 22Initialize the client
Cancel the offer/order
Example result
Last updated