new Trade(trade, auth, tasks, settings, logger)
A class to handle all trade functions to be done on behalf of the bot account
Parameters:
Name | Type | Description |
---|---|---|
trade |
||
auth |
||
tasks |
||
settings |
||
logger |
- Source:
Methods
confirmOutstandingTrades()
Confirm (not accept) all outstanding trades that were sent out, regardless of trade target via the two-factor authenticator.
- Source:
confirmTradesFromUser(steamID, acceptedTradesCallback)
Confirm (not accept) all sent trades associated with a certain SteamID via the two-factor authenticator.
Parameters:
Name | Type | Description |
---|---|---|
steamID |
SteamID | SteamID to use for lookup of inventory |
acceptedTradesCallback |
acceptedTradesCallback | Inventory details (refer to inventoryCallback for more info.) |
- Source:
createOffer(steamid, callback) → {*}
Create a trade offer with the recipient
Parameters:
Name | Type | Description |
---|---|---|
steamid |
SteamID id any form (SteamID2, SteamID3, SteamID64, or Tradeurl) | |
callback |
- Source:
Returns:
- Type
- *
getInventory(appid, contextid, tradableOnly, inventoryCallback)
Retrieve account inventory based on filters
Parameters:
Name | Type | Description |
---|---|---|
appid |
Integer | appid by-which to fetch inventory based on. |
contextid |
Integer | contextid of lookup (1 - Gifts, 2 - In-game Items, 3 - Coupons, 6 - Game Cards, Profile Backgrounds & Emoticons) |
tradableOnly |
Boolean | Items retrieved must be tradable |
inventoryCallback |
inventoryCallback | Inventory details (refer to inventoryCallback for more info.) |
- Source:
getUserInventory(steamID, appid, contextid, tradableOnly, inventoryCallback)
Retrieve account inventory based on filters and provided steamID
Parameters:
Name | Type | Description |
---|---|---|
steamID |
SteamID | SteamID to use for lookup of inventory |
appid |
Integer | appid by-which to fetch inventory based on. |
contextid |
Integer | contextid of lookup (1 - Gifts, 2 - In-game Items, 3 - Coupons, 6 - Game Cards, Profile Backgrounds & Emoticons) |
tradableOnly |
Boolean | Items retrieved must be tradableOnly |
inventoryCallback |
inventoryCallback | Inventory details (refer to inventoryCallback for more info.) |
- Source: