-
Notifications
You must be signed in to change notification settings - Fork 0
P2P Market
Sampli edited this page Jul 13, 2021
·
7 revisions
For more specifics on listings, visit the Listings Page
- Returns total value of the Skincrib marketplace.
-
Note: This method only works if
reconnect
is set totrue
.
- Returns the price of the most expensive item on the Skincrib marketplace.
-
Note: This method only works if
reconnect
is set totrue
.
- Returns an array of all listings from memory.
-
Note: If
reconnect
is set tofalse
, this method will always return a[]
.
- Returns all active deposits of one client.
-
Note: This method only works if
reconnect
is set totrue
.
- Returns all active withdraws of one client.
-
Note: This method only works if
reconnect
is set totrue
.
- Fetch all listings currently on skincrib market from the server.
- This route only needs to be called once if
reconnect
is set totrue
. -
Note: If
reconnect
is set totrue
, this event will log the array received to memory.
- Fetch all active deposits of one client.
-
steamid
- Required. -
Note: If
reconnect
is set tofalse
, this method will always returnnull
.
- Fetch all active withdraws of one client.
-
steamid
- Required. -
Note: If
reconnect
is set tofalse
, this method will always returnnull
.
-
options
- Required.-
steamid
- Client's SteamID64. -
apiKey
- Client's Steam API-Key. -
tradeUrl
- Client's Steam TradeURL. -
items
- Array of item objects
-
-
Note: Because this method allows multiple items to be listed at once, the method will always return an object of errors (Formatted
{'assetid': 'message'}
) and an array of successfully listen items. - An array of items will create a separate listing for each item, Skincrib does not support "bundles" of items.
Example:
market.createListings({steamid: '', apiKey: '', tradeUrl: '', items: [{
assetid: "22668188708",
price: 21666,
percentIncrease: 0
}, ...])
.then((errors, listed)=>{
if(Object.keys(errors).length > 0){
Object.keys(errors).forEach(assetid => console.log(`Error: ${assetid}-${errors[assetid]}`));
}
if(listed.length > 0){
console.log(listed);
}
}, (error)=>{ //single error message is received if the whole function call errors
console.error(error);
});
-
options
- Required. -
steamid
- Client's SteamID64. -
ids
- An array of listing IDs to cancel. -
Note: Because this method allows multiple items to be listed at once, the method will always return an object of errors (Formatted
{'assetid': 'message'}
) and an array of successfully listen items.
Example:
market.cancelListings({steamid: '', ids: ['1ad12692-60d8-4968-b2d4-7b29bbf98dfa', ...]})
.then((errors, cancelled)=>{
if(Object.keys(errors).length > 0){
Object.keys(errors).forEach(assetid => console.log(`Error: ${assetid}-${errors[assetid]}`));
}
if(cancelled.length > 0){
console.log(cancelled);
}
}, (error)=>{ //single error message is received if the whole function call errors
console.error(error);
});
-
options
- Required. -
steamid
- Client's SteamID64. -
id
- Listing ID to confirm.
Example
market.confirmListing({steamid: '', id: '1ad12692-60d8-4968-b2d4-7b29bbf98dfa'})
.then((data)=>{
console.log(data);
}, (err)=>{
console.error(err);
});