6. Creating Orders
Last updated
Was this helpful?
Last updated
Was this helpful?
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.
Once an order is created, it will be added to the . They will be recorded on Zecrey NFT Marketplace to be viewed and available to all participants for trading.
You need to in order to use it.
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
= 14
Initialize the client
Create a listing
Example result
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
✅
Example
Make an offer to the NFT with NftId
= 14
Initiate the client
Create an offer
Example result
To cancel a previous offer/listing order, you can use the cancelOffer
request.
Example
Cancel offer/order with offerId
= 22
Initialize the client
Cancel the offer/order
Example result