Market Interaction - Skincrib/skincrib-client GitHub Wiki

Methods

getActiveListings()

createListings(items)

  • items - Required.
    • An array of item objects that you wish to be listed.

Example:

market.createListings([{
 assetid: "22668188708",
 price: 21666,
 percentIncrease: 0
}, ...])
.then((listed)=>{
  if(listed.length > 0){
   console.log(listed);
  }
}, (error)=>{ //single error message is received if the whole function call errors
 console.error(error);
});

cancelListings(ids)

  • ids - Required.
    • An array of listing IDs that you wish to cancel.

Example:

market.cancelListings(['1ad12692-60d8-4968-b2d4-7b29bbf98dfa', ...])
.then((cancelled)=>{
  if(cancelled.length > 0){
   console.log(cancelled);
  }
}, (error)=>{ //single error message is received if the whole function call errors
 console.error(error);
});

confirmListing(id)

  • id - Required.
    • The ID of the listing you wish to confirm.

Example

market.confirmListing('1ad12692-60d8-4968-b2d4-7b29bbf98dfa')
.then((data)=>{
  console.log(data);
}, (err)=>{
  console.error(err);
});