For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

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

    ✅

Example

  • Create an order to list the NFT with NftId = 14

    1. Initialize the client

    2. Create a listing

Example result

Example

  • Create an order to list the NFT with NftId = 14

    1. Initialize the client

    2. Create a listing

With the private key:

With the wallet:

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 = 14

    1. Initiate the client

    2. Create an offer

Example result

Example

  • Make an offer to the NFT with NftId = 14

    1. Initiate the client

    2. Create an offer

With the private key:

With the wallet:

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 = 22

    1. Initialize the client

    2. Cancel the offer/order

Example result

Example

  • Cancel offer/order with offerId = 22

    1. Initialize the client

    2. Cancel the offer/order

With the private key:

With the wallet:

Example result

Last updated

Was this helpful?