Marketplace
Listing Items

Listing an Item for Sale

Like buying an item, listing an item for sale is a multi-step process. First, you need to generate a sell transaction, then prompt the user to sign the transaction, and finally, you can optionally check if the user has approved the transaction.

💡

Read Sign Transaction page to learn how to sign a transaction payload using Fractal Account.

Selling Item

To generate a sell transaction that the user can sign, you need to send a request to the /sdk/v1/marketplace/solana/token/sell (opens in a new tab) GET

The following query parameters are required and need to be passed as part of the URL:

AttributeContent
tokenIdThe token id of the item to be sold.
walletIdThe public key of the seller.
priceThe price of the item in SOL.
quantityThe quantity of the item to be sold.
curl --request GET \
     --url 'https://api.fractal.is/sdk/v1/marketplace/solana/token/sell?tokenId=<token_to_sell>&walletId=<public_key_of_seller>&price=<price_in_sol>&quantity=1' \
     --header 'Accept: application/json'
Response

This will return a base58 encoded transaction you can sign and verify using Fractal Account or other wallet providers.

{
    "transaction": "<BASE58_TRANSACTION_PAYLOAD>"
}

Cancel Listing

To cancel a listing, you need to send a request to the /sdk/v1/marketplace/solana/token/cancel_sell (opens in a new tab) GET

The following query parameters are required and need to be passed as part of the URL:

AttributeContent
tokenIdThe token id of the item to be sold.
walletIdThe public key of the seller.
quantityThe quantity of the item to be sold.
curl --request GET \
     --url 'https://api.fractal.is/sdk/v1/marketplace/solana/token/cancel_sell?tokenId=<token_to_sell>&walletId=<public_key_of_seller>&quantity=1' \
     --header 'Accept: application/json'
Response

Same as above, this will return a base58 encoded transaction you can sign and verify using Fractal Account or other wallet providers.