1.0.7 • Published 6 years ago
steam-p2p v1.0.7
Steam P2P trade wrapper
BETA - there may be bugs
This is a quick example of a p2p system, i will continue to improve it overtime with better error handling
Installation
Install it from npm:
npm install steam-p2pConstructor(options)
optionsAn object containing any or all of the following options -Optionaloptions.pollPolling rate in milliseconds - Minimum10000- Default20000-Optionaloptions.proxiesArray of proxies - Default[]-Optional
Methods
watchTrade(payload)
payloadA single object or array containing trade details -Requiredpayload.idAn id to assign to the trade -Requiredpayload.senderThe senders steam64ID -Requiredpayload.senderApiKeyThe senders steam API Key -Requiredpayload.itemsAn array of assetids -Requiredpayload.expireUnix timestamp when offer will expire - - Default10 minutes-Optional
cancelTrade(tradeID)
tradeIDThe tradeID that was assign -Required
Events
accepted
tradeIDID of the trade
removed
tradeIDID of the trade