Skip to content
API
Marketplace
Listing assets

Listing an asset

In order to list an asset on behalf of a profile you need to give us some information about the listing.

const transaction = await beam.marketplace.listAsset('profile-seller-id', {
    marketplaceId": "64df956525e46b4d63ae37e9,
    quantity: 1 // You can list multiple 1155 assets from the same token, defaults to 1
    price: '1000', // Listing price in BEAM token
    sellType: 'FixedPrice' // AscendingAuction, DescendingAuction or FixedPrice
    currency: 'USDC' // Defaults to BEAM. Find all available options through the getCurrencies() method;
});
 
// {
//   "orderId": "651b0e3d01b1fcdb481dec8e",
// }

Different intricacies on the different selling types will be provided at a later date. To keep things simple, we advise you to start listing with the 'FixedPrice' sell type only.

Accessing listed items for your game

At the moment, we provide a method that allows you to retrieve all the listed items of a profile. Since we just listed an item, you can now verify whenever the item is actually for sale by calling getListedAssetsForProfile method.

const listings = await beam.marketplace.getListedAssetsForProfile(
  "profile-seller-id",
  {
    offset: 0, // optional, defaults to 0
    limit: 10, // optional, defaults to 10
  }
);
 
// {
//   "data": [
//     {
//       "marketplaceId": "string",
//       "price": "string",
//       "sellType": "string",
//       "startPrice": "string",
//       "endPrice": "string",
//       "platformFee": 0,
//       "royaltyFee": 0,
//       "currency": "string",
//       "startTime": "string",
//       "endTime": "string",
//       "quantityListed": 0,
//       "orderId": "string",
//       "expiresAt": "string",
//       "sellerAddress": "string",
//       "contractId": "string",
//       "nft": {
//         "marketplaceId": "string",
//         "name": "string",
//         "imageUrl": "string",
//         "assetType": "string",
//         "assetAddress": "string",
//         "assetId": "string"
//       }
//     }
//   ],
//   "pagination": {
//     "count": 0,
//     "limit": 10,
//     "offset": 0
//   }
// }